From 15f617c9a957e75d4097394349c9abc2adcd5f0a Mon Sep 17 00:00:00 2001 From: hailin Date: Tue, 9 Dec 2025 01:07:58 -0800 Subject: [PATCH] fix(mobile-app): resolve Kotlin build errors in build.gradle.kts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Rename getAutoVersionCode() to calculateNextVersionCode() to avoid JVM signature clash with auto-generated property getter - Remove unnecessary Elvis operator for non-nullable flutter.versionName - Migrate deprecated kotlinOptions.jvmTarget to kotlin.jvmToolchain DSL 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- frontend/mobile-app/android/app/build.gradle.kts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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 {