File tree 2 files changed +10
-4
lines changed
groovy/net/fabricmc/loom/test/integration/neoforge
resources/projects/neoforge/12005
2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -35,11 +35,13 @@ import static org.gradle.testkit.runner.TaskOutcome.SUCCESS
35
35
class NeoForge1205Test extends Specification implements GradleProjectTestTrait {
36
36
@Unroll
37
37
def " build #mcVersion #neoforgeVersion #mappings" () {
38
+ if (Integer . valueOf(System . getProperty(" java.version" ). split(" \\ ." )[0 ] < 21 )) return // Do not run this test with Java 17
39
+
38
40
setup :
39
41
def gradle = gradleProject(project : " neoforge/12005" , version : DEFAULT_GRADLE )
40
42
gradle. buildGradle. text = gradle. buildGradle. text. replace(' @MCVERSION@' , mcVersion)
41
43
.replace(' @NEOFORGEVERSION@' , neoforgeVersion)
42
- .replace(' @ MAPPINGS@ ' , mappings)
44
+ .replace(' MAPPINGS' , mappings) // Spotless doesn't like the @'s
43
45
44
46
when :
45
47
def result = gradle. run(task : " build" )
Original file line number Diff line number Diff line change @@ -38,9 +38,13 @@ repositories {
38
38
dependencies {
39
39
// To change the versions see the gradle.properties file
40
40
minecraft " com.mojang:minecraft:$mcVersion "
41
- mappings loom. layered {
42
- it. mappings(@MAPPINGS@)
43
- it. mappings(rootProject. rootDir. toPath(). resolve(" 23w13a.tiny" ). toFile())
41
+ if (" @MAPPINGS@" . equals(" loom.officialMojangMappings()" )) {
42
+ mappings loom. officialMojangMappings();
43
+ } else {
44
+ mappings loom. layered {
45
+ it. mappings(MAPPINGS )
46
+ it. mappings(rootProject. rootDir. toPath(). resolve(" 23w13a.tiny" ). toFile())
47
+ }
44
48
}
45
49
46
50
neoForge " net.neoforged:neoforge:$neoforgeVersion "
You can’t perform that action at this time.
0 commit comments