Skip to content

Commit 7d94ca4

Browse files
committed
fix: Move Manifold java compiler plugin to root project
1 parent 61e4a51 commit 7d94ca4

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

build.gradle.kts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,19 @@ allprojects {
8383
maven("https://raw.githubusercontent.com/Fuzss/modresources/main/maven/")
8484
mavenLocal()
8585
}
86+
87+
if (JavaVersion.current() != JavaVersion.VERSION_1_8 &&
88+
sourceSets.main.get().allJava.files.any {it.name == "module-info.java"}) {
89+
tasks.withType<JavaCompile>() {
90+
// if you DO define a module-info.java file:
91+
options.compilerArgs.addAll(listOf("-Xplugin:Manifold", "--module-path", classpath.asPath))
92+
}
93+
} else {
94+
tasks.withType<JavaCompile>() {
95+
// If you DO NOT define a module-info.java file:
96+
options.compilerArgs.addAll(listOf("-Xplugin:Manifold"))
97+
}
98+
}
8699
}
87100

88101
subprojects {

cobblegen/build.gradle.kts

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -324,16 +324,3 @@ tasks.jar {
324324
rename { "${it}_${base.archivesName.get()}" }
325325
}
326326
}
327-
328-
if (JavaVersion.current() != JavaVersion.VERSION_1_8 &&
329-
sourceSets.main.get().allJava.files.any {it.name == "module-info.java"}) {
330-
tasks.withType<JavaCompile>() {
331-
// if you DO define a module-info.java file:
332-
options.compilerArgs.addAll(listOf("-Xplugin:Manifold", "--module-path", classpath.asPath))
333-
}
334-
} else {
335-
tasks.withType<JavaCompile>() {
336-
// If you DO NOT define a module-info.java file:
337-
options.compilerArgs.addAll(listOf("-Xplugin:Manifold"))
338-
}
339-
}

0 commit comments

Comments
 (0)