Skip to content

Commit 56a5a04

Browse files
committed
release: retain old minSdk artifacts when publishing new releases
1 parent 5b9b5de commit 56a5a04

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

AnkiDroid/build.gradle

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -256,6 +256,25 @@ android {
256256
play {
257257
serviceAccountCredentials.set(file("${homePath}/src/AnkiDroid-GCP-Publish-Credentials.json"))
258258
track.set('alpha')
259+
260+
// any time we bump minSdk we want Play Store to retain the old artifacts by version code,
261+
// so that they remain available for older devices
262+
retain {
263+
artifacts.set([
264+
20700300L, // (2.7, minSdk 10, universal APK)
265+
20804300L, // (2.8.4, minSdk 10, universal APK)
266+
21004300L, // (2.10.4, minSdk 15, universal APK)
267+
// release-2.14 minSdk 16: missing and not re-publishable, see issue 17791
268+
121603300L, // (2.16.3, minSdk 21, ABI armeabi-v7a)
269+
221603300L, // (2.16.3, minSdk 21, ABI x86)
270+
321603300L, // (2.16.3, minSdk 21, ABI arm64-v8a)
271+
421603300L, // (2.16.3, minSdk 21, ABI x86_64)
272+
121904300L, // (2.19.4, minSdk 23, ABI armeabi-v7a)
273+
221904300L, // (2.19.4, minSdk 23, ABI x86)
274+
321904300L, // (2.19.4, minSdk 23, ABI arm64-v8a)
275+
421904300L, // (2.19.4, minSdk 23, ABI x86_64)
276+
])
277+
}
259278
}
260279

261280
// Install Git pre-commit hook for Ktlint

gradle/libs.versions.toml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
[versions]
22
compileSdk = "35"
3+
4+
# Changing minSdk means newer AnkiDroid versions will not support older devices.
5+
# However the Play Store will keep old AnkiDroid versions available for older
6+
# devices *if* you also change AnkiDroid/build.gradle play { retain {} } block
7+
# to include the version codes of the last released version for the older
8+
# minSdk. It is critical to update those version codes when you change this.
39
minSdk = "24" # also in testlib/build.gradle.kts
10+
411
targetSdk = "34" # also in ../robolectricDownloader.gradle
512
acra = '5.12.0'
613
ktlint = '1.5.0'

0 commit comments

Comments
 (0)