Java 25 packr JDK compatibility
This commit is contained in:
@@ -77,11 +77,6 @@ public class CampaignRulesDialog extends BaseDialog{
|
|||||||
if(!planet.clearSectorOnLose){
|
if(!planet.clearSectorOnLose){
|
||||||
check("@rules.clearsectoronloss", b -> rules.clearSectorOnLose = b, () -> rules.clearSectorOnLose);
|
check("@rules.clearsectoronloss", b -> rules.clearSectorOnLose = b, () -> rules.clearSectorOnLose);
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO: this is intentionally hidden until the new mechanics have been well-tested. I don't want people immediately switching to the old mechanics
|
|
||||||
if(planet.allowLegacyLaunchPads){
|
|
||||||
// check("@rules.legacylaunchpads", b -> rules.legacyLaunchPads = b, () -> rules.legacyLaunchPads);
|
|
||||||
}
|
|
||||||
}).growY();
|
}).growY();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -57,6 +57,8 @@ task dist(type: Jar, dependsOn: configurations.runtimeClasspath){
|
|||||||
|
|
||||||
manifest{
|
manifest{
|
||||||
attributes 'Main-Class': project.mainClassName
|
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 += "Dhttps.protocols=TLSv1.2,TLSv1.1,TLSv1"
|
||||||
args += "XX:+ShowCodeDetailsInExceptionMessages"
|
args += "XX:+ShowCodeDetailsInExceptionMessages"
|
||||||
|
args += "XX:+UseCompactObjectHeaders"
|
||||||
|
args += "enable-native-access=ALL-UNNAMED"
|
||||||
|
|
||||||
exec{
|
exec{
|
||||||
commandLine args.toList()
|
commandLine args.toList()
|
||||||
standardOutput = System.out
|
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"){
|
if(platform != "MacOS"){
|
||||||
copy{
|
copy{
|
||||||
into "build/packr/output/jre/"
|
into "build/packr/output/jre/"
|
||||||
@@ -158,7 +164,7 @@ platforms.each{ platform ->
|
|||||||
delete "build/packr/output/desktop.jar"
|
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{
|
}else{
|
||||||
copy{
|
copy{
|
||||||
into "build/packr/output/${appName}.app/Contents/"
|
into "build/packr/output/${appName}.app/Contents/"
|
||||||
@@ -169,6 +175,9 @@ platforms.each{ platform ->
|
|||||||
delete "build/packr/output/Contents/"
|
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")){
|
if((platform == "Windows64" || platform == "Windows32")){
|
||||||
|
|||||||
Reference in New Issue
Block a user