diff --git a/android/build.gradle b/android/build.gradle index 38619841..24b625e3 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -21,8 +21,8 @@ android { applicationId "com.unciv.app" minSdkVersion 14 targetSdkVersion 29 - versionCode 369 - versionName "3.5.7" + versionCode appCodeNumber + versionName appVersion archivesBaseName = "Unciv" } diff --git a/build.gradle b/build.gradle index ec936260..3e006992 100644 --- a/build.gradle +++ b/build.gradle @@ -33,6 +33,9 @@ allprojects { version = '1.0.1' ext { appName = "Unciv" + appCodeNumber = 369 + appVersion = "3.5.7" + gdxVersion = '1.9.10' roboVMVersion = '2.3.1' box2DLightsVersion = '1.4' diff --git a/desktop/build.gradle b/desktop/build.gradle index e111ceb6..f8af688c 100644 --- a/desktop/build.gradle +++ b/desktop/build.gradle @@ -40,6 +40,7 @@ task dist(dependsOn: classes, type: Jar) { // Compiles the jar file manifest { attributes 'Main-Class': project.mainClassName + attributes 'Specification-Version': appVersion } } diff --git a/desktop/src/com/unciv/app/desktop/DesktopLauncher.kt b/desktop/src/com/unciv/app/desktop/DesktopLauncher.kt index 3a345217..af661873 100644 --- a/desktop/src/com/unciv/app/desktop/DesktopLauncher.kt +++ b/desktop/src/com/unciv/app/desktop/DesktopLauncher.kt @@ -27,7 +27,9 @@ internal object DesktopLauncher { config.title = "Unciv" config.useHDPI = true - val game = UncivGame("Desktop", null){exitProcess(0)} + val versionFromJar = DesktopLauncher.javaClass.`package`.specificationVersion + + val game = UncivGame(if (versionFromJar != null) versionFromJar else "Desktop", null){exitProcess(0)} if(!RaspberryPiDetector.isRaspberryPi()) // No discord RPC for Raspberry Pi, see https://github.com/yairm210/Unciv/issues/1624 tryActivateDiscord(game)