Skip to content

Commit

Permalink
release: retain old minSdk artifacts when publishing new releases
Browse files Browse the repository at this point in the history
  • Loading branch information
mikehardy committed Jan 11, 2025
1 parent 5b9b5de commit 56a5a04
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
19 changes: 19 additions & 0 deletions AnkiDroid/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,25 @@ android {
play {
serviceAccountCredentials.set(file("${homePath}/src/AnkiDroid-GCP-Publish-Credentials.json"))
track.set('alpha')

// any time we bump minSdk we want Play Store to retain the old artifacts by version code,
// so that they remain available for older devices
retain {
artifacts.set([
20700300L, // (2.7, minSdk 10, universal APK)
20804300L, // (2.8.4, minSdk 10, universal APK)
21004300L, // (2.10.4, minSdk 15, universal APK)
// release-2.14 minSdk 16: missing and not re-publishable, see issue 17791
121603300L, // (2.16.3, minSdk 21, ABI armeabi-v7a)
221603300L, // (2.16.3, minSdk 21, ABI x86)
321603300L, // (2.16.3, minSdk 21, ABI arm64-v8a)
421603300L, // (2.16.3, minSdk 21, ABI x86_64)
121904300L, // (2.19.4, minSdk 23, ABI armeabi-v7a)
221904300L, // (2.19.4, minSdk 23, ABI x86)
321904300L, // (2.19.4, minSdk 23, ABI arm64-v8a)
421904300L, // (2.19.4, minSdk 23, ABI x86_64)
])
}
}

// Install Git pre-commit hook for Ktlint
Expand Down
7 changes: 7 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
[versions]
compileSdk = "35"

# Changing minSdk means newer AnkiDroid versions will not support older devices.
# However the Play Store will keep old AnkiDroid versions available for older
# devices *if* you also change AnkiDroid/build.gradle play { retain {} } block
# to include the version codes of the last released version for the older
# minSdk. It is critical to update those version codes when you change this.
minSdk = "24" # also in testlib/build.gradle.kts

targetSdk = "34" # also in ../robolectricDownloader.gradle
acra = '5.12.0'
ktlint = '1.5.0'
Expand Down

0 comments on commit 56a5a04

Please sign in to comment.