20
20
* SOFTWARE.
21
21
*/
22
22
23
+ import java.time.LocalDateTime
23
24
import java.time.format.DateTimeFormatter
24
25
25
26
plugins {
26
27
java
27
28
`maven- publish`
28
- id(" fabric-loom" ) version " 0.12 -SNAPSHOT"
29
- id(" org.cadixdev.licenser" ) version " 0.6.1"
29
+ id(" fabric-loom" ) version( " 1.0 -SNAPSHOT" )
30
+ id(" org.cadixdev.licenser" ) version( " 0.6.1" )
30
31
id(" io.github.juuxel.loom-quiltflower" ) version(" 1.7.3" )
31
32
}
32
33
34
+ val buildNumber = System .getenv(" BUILD_NUMBER" ) ? : " "
35
+ val prerelease = (System .getenv(" PRE_RELEASE" ) ? : " false" ) == " true"
36
+
33
37
val modId = project.property(" mod.id" ).toString()
34
38
val modVersion = project.property(" mod.version" ).toString()
35
39
val modName = project.property(" mod.name" ).toString()
@@ -50,16 +54,10 @@ java {
50
54
targetCompatibility = JavaVersion .VERSION_17
51
55
sourceCompatibility = JavaVersion .VERSION_17
52
56
57
+ withSourcesJar()
53
58
withJavadocJar()
54
59
}
55
60
56
- sourceSets {
57
- create(" gametest" ) {
58
- compileClasspath + = main.get().compileClasspath + main.get().output;
59
- runtimeClasspath + = main.get().runtimeClasspath + main.get().output;
60
- }
61
- }
62
-
63
61
loom {
64
62
accessWidenerPath.set(project.file(" src/main/resources/${modId} .accesswidener" ))
65
63
mixin {
@@ -71,21 +69,21 @@ loom {
71
69
sourceSet(sourceSets.main.get())
72
70
}
73
71
create(" gc-api-test" ) {
74
- sourceSet(sourceSets.getByName( " gametest " ))
72
+ sourceSet(sourceSets.test.get( ))
75
73
}
76
74
}
77
75
78
76
runs {
79
77
register(" gametest" ) {
80
78
server()
81
79
name(" Game Test" )
82
- source(sourceSets.getByName( " gametest " ))
80
+ source(sourceSets.test.get( ))
83
81
vmArgs(" -Dfabric-api.gametest" , " -Dfabric-api.gametest.report-file=${project.buildDir} /junit.xml" , " -ea" )
84
82
}
85
83
register(" gametestClient" ) {
86
84
server()
87
85
name(" Game Test Client" )
88
- source(sourceSets.getByName( " gametest " ))
86
+ source(sourceSets.test.get( ))
89
87
vmArgs(" -Dfabric-api.gametest" , " -Dfabric-api.gametest.report-file=${project.buildDir} /junit.xml" , " -ea" )
90
88
}
91
89
}
@@ -138,12 +136,14 @@ tasks.jar {
138
136
from(" LICENSE" )
139
137
manifest {
140
138
attributes(
141
- " Implementation-Title" to modName,
142
- " Implementation-Version" to " ${project.version} " ,
143
- " Implementation-Vendor" to " Team Galacticraft" ,
144
- " Implementation-Timestamp" to DateTimeFormatter .ISO_DATE_TIME ,
145
- " Maven-Artifact" to " ${project.group} :${modName} :${project.version} " ,
146
- " ModSide" to " BOTH"
139
+ " Specification-Title" to modName,
140
+ " Specification-Vendor" to " Team Galacticraft" ,
141
+ " Specification-Version" to modVersion,
142
+ " Implementation-Title" to project.name,
143
+ " Implementation-Version" to " ${project.version} " ,
144
+ " Implementation-Vendor" to " Team Galacticraft" ,
145
+ " Implementation-Timestamp" to LocalDateTime .now().format(DateTimeFormatter .ISO_DATE_TIME ),
146
+ " Built-On-Java" to " ${System .getProperty(" java.vm.version" )} (${System .getProperty(" java.vm.vendor" )} )"
147
147
)
148
148
}
149
149
}
@@ -185,9 +185,3 @@ license {
185
185
set(" company" , " Team Galacticraft" )
186
186
}
187
187
}
188
-
189
- tasks.named<ProcessResources >(" processGametestResources" ) {
190
- duplicatesStrategy = DuplicatesStrategy .WARN
191
- }
192
-
193
- tasks.getByName(" gametestClasses" ).dependsOn(" classes" )
0 commit comments