Fix forge on Java 16 and higher.
This commit is contained in:
parent
95af7d7cb8
commit
d14c7c94aa
|
@ -4,4 +4,17 @@ dependencies {
|
|||
implementation(project(path = ":common")) { isTransitive = false }
|
||||
add("developmentForge", project(path = ":common")) { isTransitive = false }
|
||||
shadowC(project(path = ":common", configuration = "transformProductionForge")) { isTransitive = false }
|
||||
}; loom { useFabricMixin = true }
|
||||
}; loom {
|
||||
useFabricMixin = true
|
||||
if (JavaVersion.current().isJava9Compatible) {
|
||||
runs {
|
||||
val args: List<String> = listOf("--illegal-access=permit")
|
||||
if (JavaVersion.current() < JavaVersion.VERSION_17) {
|
||||
listOf("--add-exports java.base/sun.security.util=ALL-UNNAMED", "--add-opens java.base/java.util.jar=ALL-UNNAMED")
|
||||
}
|
||||
this.forEach {
|
||||
it.vmArgs(args)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue