Java 25 packr JDK compatibility
This commit is contained in:
@@ -57,6 +57,8 @@ task dist(type: Jar, dependsOn: configurations.runtimeClasspath){
|
||||
|
||||
manifest{
|
||||
attributes 'Main-Class': project.mainClassName
|
||||
//note: this doesn't do anything when launched from the bundled JVM
|
||||
attributes 'Enable-Native-Access': 'ALL-UNNAMED'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -142,12 +144,16 @@ platforms.each{ platform ->
|
||||
|
||||
args += "Dhttps.protocols=TLSv1.2,TLSv1.1,TLSv1"
|
||||
args += "XX:+ShowCodeDetailsInExceptionMessages"
|
||||
args += "XX:+UseCompactObjectHeaders"
|
||||
args += "enable-native-access=ALL-UNNAMED"
|
||||
|
||||
exec{
|
||||
commandLine args.toList()
|
||||
standardOutput = System.out
|
||||
}
|
||||
|
||||
def outputJsonFile = platform != "MacOS" ? file("build/packr/output/Mindustry.json") : file("build/packr/output/${appName}.app/Contents/Resources/Mindustry.json")
|
||||
|
||||
if(platform != "MacOS"){
|
||||
copy{
|
||||
into "build/packr/output/jre/"
|
||||
@@ -158,7 +164,7 @@ platforms.each{ platform ->
|
||||
delete "build/packr/output/desktop.jar"
|
||||
}
|
||||
|
||||
file("build/packr/output/Mindustry.json").text = file("build/packr/output/Mindustry.json").text.replace("desktop.jar", "jre/desktop.jar")
|
||||
outputJsonFile.text = outputJsonFile.text.replace("desktop.jar", "jre/desktop.jar")
|
||||
}else{
|
||||
copy{
|
||||
into "build/packr/output/${appName}.app/Contents/"
|
||||
@@ -169,6 +175,9 @@ platforms.each{ platform ->
|
||||
delete "build/packr/output/Contents/"
|
||||
}
|
||||
}
|
||||
|
||||
//packr is broken and won't let me add one hyphen,so I have to do that myself later
|
||||
outputJsonFile.text = outputJsonFile.text.replace("-enable-native-access=ALL-UNNAMED", "--enable-native-access=ALL-UNNAMED")
|
||||
}
|
||||
|
||||
if((platform == "Windows64" || platform == "Windows32")){
|
||||
|
||||
Reference in New Issue
Block a user