-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathbuild.gradle
81 lines (64 loc) · 1.69 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
plugins {
id 'java-library'
id 'net.neoforged.moddev' version '2.0.72'
}
version = "1.3"
group = "net.mcreator.minecraft.link" // http://maven.apache.org/guides/mini/guide-naming-conventions.html
base.archivesName = "mcreator_link"
java.toolchain.languageVersion = JavaLanguageVersion.of(21)
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8' // Use the UTF-8 charset for Java compilation
}
neoForge {
version = "21.4.47-beta"
runs {
client {
client()
}
server {
server()
}
}
mods {
mcreatorlink {
sourceSet sourceSets.main
}
}
}
dependencies {
jarJar(implementation("com.fazecast:jSerialComm")) {
version {
strictly '[2.7, 2.8)'
prefer '2.7.0'
}
}
additionalRuntimeClasspath 'com.fazecast:jSerialComm:2.7.0'
}
javadoc {
source sourceSets.main.allJava
}
tasks.register('copyModIntoFinalBuild', Copy) {
def projectVersion = version
from('build/libs/')
include('mcreator_link-' + version + '.jar')
into('build/export/')
rename { "MCreator Link ${projectVersion} [1.21.4].jar" }
dependsOn jarJar
dependsOn build
}
tasks.register('exportArduinoLibrary', Zip) {
archiveFileName = "MCreator Link " + project.version + " Arduino Library.zip"
destinationDirectory = file('build/export/')
from(files('./arduino'))
}
tasks.register('exportJavadoc', Copy) {
from('build/docs/javadoc')
into('docs/')
dependsOn javadoc
group = 'mcreatorlink'
}
tasks.register('exportAll') {
group = 'mcreatorlink'
dependsOn copyModIntoFinalBuild
dependsOn exportArduinoLibrary
}