Skip to content

Commit

Permalink
3.16.13-windows64NewPackrTest
Browse files Browse the repository at this point in the history
  • Loading branch information
yairm210 committed Sep 10, 2021
1 parent 2c8bf65 commit 19837c2
Showing 1 changed file with 15 additions and 14 deletions.
29 changes: 15 additions & 14 deletions desktop/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"
Expand Down

0 comments on commit 19837c2

Please sign in to comment.