File tree Expand file tree Collapse file tree 2 files changed +23
-3
lines changed
Expand file tree Collapse file tree 2 files changed +23
-3
lines changed Original file line number Diff line number Diff line change 1717 required : true
1818 push :
1919 branches : [ "main" ]
20- paths : [ "mobile ", "frontend" ]
20+ paths : [ "android ", "frontend" ]
2121 pull_request :
2222 branches : [ "main" ]
23- paths : [ "mobile ", "frontend" ]
23+ paths : [ "android ", "frontend" ]
2424
2525jobs :
2626 build-android :
Original file line number Diff line number Diff line change 11import com.android.build.api.dsl.Packaging
22
3+ val baseVersionCode = 81
4+
35plugins {
46 alias(libs.plugins.android.application)
57 alias(libs.plugins.kotlin.android)
@@ -13,7 +15,7 @@ android {
1315 applicationId = " com.robosats"
1416 minSdk = 26
1517 targetSdk = 36
16- versionCode = 15
18+ versionCode = baseVersionCode
1719 versionName = " 0.8.1-alpha"
1820
1921 testInstrumentationRunner = " androidx.test.runner.AndroidJUnitRunner"
@@ -65,6 +67,24 @@ android {
6567 }
6668}
6769
70+ // Configure unique version codes for ABI splits to prevent downgrade issues
71+ androidComponents {
72+ onVariants { variant ->
73+ val abiCodes = mapOf (
74+ " armeabi-v7a" to 1 ,
75+ " arm64-v8a" to 2 ,
76+ " x86" to 3 ,
77+ " x86_64" to 4
78+ )
79+
80+ variant.outputs.forEach { output ->
81+ val abiName = output.filters.find { it.filterType.name == " ABI" }?.identifier
82+ val abiVersionCode = abiCodes[abiName] ? : 0 // Universal APK gets 0
83+ output.versionCode.set(baseVersionCode * 1000 + abiVersionCode)
84+ }
85+ }
86+ }
87+
6888dependencies {
6989 implementation(libs.androidx.core.ktx)
7090 implementation(libs.androidx.appcompat)
You can’t perform that action at this time.
0 commit comments