diff --git a/frontend/mobile-app/android/app/build.gradle.kts b/frontend/mobile-app/android/app/build.gradle.kts index 751e7239..e3b7382a 100644 --- a/frontend/mobile-app/android/app/build.gradle.kts +++ b/frontend/mobile-app/android/app/build.gradle.kts @@ -22,7 +22,7 @@ if (keyPropertiesFile.exists()) { val versionPropertiesFile = rootProject.file("app/version.properties") val versionProperties = Properties() -fun getAutoVersionCode(): Int { +fun calculateNextVersionCode(): Int { if (versionPropertiesFile.exists()) { versionProperties.load(FileInputStream(versionPropertiesFile)) } @@ -34,12 +34,12 @@ fun getAutoVersionCode(): Int { } // Get auto-incremented version code -val autoVersionCode = getAutoVersionCode() +val autoVersionCode = calculateNextVersionCode() // Version name format: major.minor.patch (from pubspec.yaml) + build number // Example: 1.0.0.123 fun getAutoVersionName(): String { - val flutterVersionName = flutter.versionName ?: "1.0.0" + val flutterVersionName = flutter.versionName return "$flutterVersionName.$autoVersionCode" } @@ -53,8 +53,8 @@ android { targetCompatibility = JavaVersion.VERSION_17 } - kotlinOptions { - jvmTarget = JavaVersion.VERSION_17.toString() + kotlin { + jvmToolchain(17) } defaultConfig {