From b8a37475dcdd2b03ec9416ba6d69c4dce3c93105 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Mon, 24 Jun 2024 17:31:47 +0200 Subject: [PATCH 1/4] Use BuildTools 35.0.0 --- tools/release/release.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/release/release.sh b/tools/release/release.sh index 2e7999fd21..9c1f2a9bb7 100755 --- a/tools/release/release.sh +++ b/tools/release/release.sh @@ -74,7 +74,7 @@ if [ ${envError} == 1 ]; then fi minSdkVersion=23 -buildToolsVersion="32.0.0" +buildToolsVersion="35.0.0" buildToolsPath="${androidHome}/build-tools/${buildToolsVersion}" if [[ ! -d ${buildToolsPath} ]]; then From 165605f48961a189822a8e0c7d1abfc616d05fce Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Mon, 24 Jun 2024 17:34:58 +0200 Subject: [PATCH 2/4] Min SDK is now 24 --- plugins/src/main/kotlin/Versions.kt | 1 + tools/release/release.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/src/main/kotlin/Versions.kt b/plugins/src/main/kotlin/Versions.kt index c663310f1f..76a66dd519 100644 --- a/plugins/src/main/kotlin/Versions.kt +++ b/plugins/src/main/kotlin/Versions.kt @@ -63,6 +63,7 @@ object Versions { val versionName = "$versionMajor.$versionMinor.$versionPatch" const val compileSdk = 34 const val targetSdk = 33 + // When updating the `minSdk`, make sure to update the value of `minSdkVersion` in the file `tools/release/release.sh` const val minSdk = 24 val javaCompileVersion = JavaVersion.VERSION_17 val javaLanguageVersion: JavaLanguageVersion = JavaLanguageVersion.of(11) diff --git a/tools/release/release.sh b/tools/release/release.sh index 9c1f2a9bb7..41b8c2b263 100755 --- a/tools/release/release.sh +++ b/tools/release/release.sh @@ -73,7 +73,7 @@ if [ ${envError} == 1 ]; then exit 1 fi -minSdkVersion=23 +minSdkVersion=24 buildToolsVersion="35.0.0" buildToolsPath="${androidHome}/build-tools/${buildToolsVersion}" From a1d18d603e8e0b4fc0fad6ec77fa18831bef4fa7 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Mon, 24 Jun 2024 17:46:19 +0200 Subject: [PATCH 3/4] Make sure F-Droid build are reproducible by patching the value of `pg-map-id` #3061 --- tools/release/release.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tools/release/release.sh b/tools/release/release.sh index 41b8c2b263..cc138aa84b 100755 --- a/tools/release/release.sh +++ b/tools/release/release.sh @@ -230,6 +230,17 @@ printf "Unzipping the F-Droid artifact...\n" fdroidTargetPath="${targetPath}/fdroid" unzip "${targetPath}"/elementx-app-fdroid-apks-unsigned.zip -d "${fdroidTargetPath}" +printf "\n================================================================================\n" +printf "Patching the FDroid APKs using inplace-fix.py...\n" + +inplaceFixScript="./tmp/inplace-fix.py" +wget https://raw.githubusercontent.com/obfusk/reproducible-apk-tools/master/inplace-fix.py -O "${inplaceFixScript}" + +python3 "${inplaceFixScript}" --page-size 16 fix-pg-map-id "${fdroidTargetPath}"/app-fdroid-arm64-v8a-release.apk '0000000' +python3 "${inplaceFixScript}" --page-size 16 fix-pg-map-id "${fdroidTargetPath}"/app-fdroid-armeabi-v7a-release.apk '0000000' +python3 "${inplaceFixScript}" --page-size 16 fix-pg-map-id "${fdroidTargetPath}"/app-fdroid-x86-release.apk '0000000' +python3 "${inplaceFixScript}" --page-size 16 fix-pg-map-id "${fdroidTargetPath}"/app-fdroid-x86_64-release.apk '0000000' + printf "\n================================================================================\n" printf "Signing the FDroid APKs...\n" From b29d55f9ecc7ac2efa8882ee19f573fc4e9c5558 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Mon, 24 Jun 2024 17:54:26 +0200 Subject: [PATCH 4/4] Use curl instead of wget. --- tools/release/release.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/release/release.sh b/tools/release/release.sh index cc138aa84b..d51a702388 100755 --- a/tools/release/release.sh +++ b/tools/release/release.sh @@ -234,7 +234,7 @@ printf "\n====================================================================== printf "Patching the FDroid APKs using inplace-fix.py...\n" inplaceFixScript="./tmp/inplace-fix.py" -wget https://raw.githubusercontent.com/obfusk/reproducible-apk-tools/master/inplace-fix.py -O "${inplaceFixScript}" +curl -s https://raw.githubusercontent.com/obfusk/reproducible-apk-tools/master/inplace-fix.py --output "${inplaceFixScript}" python3 "${inplaceFixScript}" --page-size 16 fix-pg-map-id "${fdroidTargetPath}"/app-fdroid-arm64-v8a-release.apk '0000000' python3 "${inplaceFixScript}" --page-size 16 fix-pg-map-id "${fdroidTargetPath}"/app-fdroid-armeabi-v7a-release.apk '0000000'