Name the release APK space.rcmd.android.sizzle_<versionCode>.apk
Configure the release variant's output filename (via the legacy applicationVariants API) so the unsigned release APK is stamped with its versionCode — e.g. space.rcmd.android.sizzle_4.apk — to simplify uploading to the private F-Droid repo. Staging keeps its app-staging.apk name. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -86,6 +86,20 @@ android {
|
||||
}
|
||||
}
|
||||
|
||||
// Give the release APK a predictable, versionCode-stamped name so it drops straight
|
||||
// into the private F-Droid repo: space.rcmd.android.sizzle_<versionCode>.apk. Uses
|
||||
// the legacy variant API (the Kotlin-DSL `android {}` receiver doesn't expose it).
|
||||
(extensions.getByName("android") as com.android.build.gradle.AbstractAppExtension)
|
||||
.applicationVariants.all {
|
||||
if (buildType.name == "release") {
|
||||
val vc = versionCode
|
||||
outputs.all {
|
||||
(this as com.android.build.gradle.internal.api.BaseVariantOutputImpl)
|
||||
.outputFileName = "space.rcmd.android.sizzle_$vc.apk"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation(libs.androidx.core.ktx)
|
||||
implementation(libs.androidx.lifecycle.runtime.ktx)
|
||||
|
||||
Reference in New Issue
Block a user