-
-
Notifications
You must be signed in to change notification settings - Fork 6
/
build.gradle
76 lines (57 loc) · 1.79 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
plugins {
id 'java-library'
id 'net.neoforged.gradle.userdev' version '7.0.157'
}
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)
jarJar.enable()
tasks.withType(JavaCompile).configureEach {
options.encoding = 'UTF-8' // Use the UTF-8 charset for Java compilation
}
runs {
configureEach {
systemProperty 'forge.logging.markers', 'REGISTRIES'
systemProperty 'forge.logging.console.level', 'debug'
modSource project.sourceSets.main
dependencies {
runtime 'com.fazecast:jSerialComm:2.7.0'
}
}
client {}
server {}
}
dependencies {
implementation 'net.neoforged:neoforge:21.1.2'
implementation 'com.fazecast:jSerialComm:2.7.0'
jarJar(group: 'com.fazecast', name: 'jSerialComm', version: '[2.7,2.8)') {
jarJar.pin(it, '2.7.0')
}
}
javadoc {
source sourceSets.main.allJava
}
tasks.register('copyModIntoFinalBuild', Copy) {
from('build/libs/')
include('mcreator_link-' + version + '-all.jar')
into('build/export/')
rename { "MCreator Link " + project.version + " [1.21.1].jar" }
}
tasks.named('copyModIntoFinalBuild').configure { dependsOn('jarJar') }
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
}