3.16.13-windows64NewPackrTest

This commit is contained in:
yairm210
2021-09-10 12:39:15 +03:00
parent 2c8bf658ed
commit 19837c235a

View File

@ -68,6 +68,21 @@ for (platform in PackrConfig.Platform.values()) {
tasks.create("packr${platformName}") {
dependsOn(tasks.getByName("dist"))
// Needs to be here and not in doLast because the zip task depends on the outDir
val jarFile = "$rootDir/desktop/build/libs/${BuildConfig.appName}.jar"
val config = PackrConfig()
config.platform = platform
config.apply {
executable = "Unciv"
classpath = listOf(jarFile)
removePlatformLibs = config.classpath
mainClass = mainClassName
vmArgs = listOf("Xmx1G")
minimizeJre = "desktop/packrConfig.json"
outDir = file("packr")
}
doLast {
// https://gist.github.com/seanf/58b76e278f4b7ec0a2920d8e5870eed6
@ -89,20 +104,6 @@ for (platform in PackrConfig.Platform.values()) {
}
val jarFile = "$rootDir/desktop/build/libs/${BuildConfig.appName}.jar"
val config = PackrConfig()
config.platform = platform
config.apply {
executable = "Unciv"
classpath = listOf(jarFile)
removePlatformLibs = config.classpath
mainClass = mainClassName
vmArgs = listOf("Xmx1G")
minimizeJre = "desktop/packrConfig.json"
outDir = file("packr")
}
if (config.outDir.exists()) delete(config.outDir)
// Requires that both packr and the jre are downloaded, as per buildAndDeploy.yml, "Upload to itch.io"