Skip to content

Commit

Permalink
Merge pull request #3084 from element-hq/feature/bma/reproBuild
Browse files Browse the repository at this point in the history
Upgrade build tools and fix `pg-map-id` for F-Droid
  • Loading branch information
bmarty authored Jun 25, 2024
2 parents 40b7736 + f4a5ef8 commit b03ec47
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
1 change: 1 addition & 0 deletions plugins/src/main/kotlin/Versions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
15 changes: 13 additions & 2 deletions tools/release/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,8 @@ if [ ${envError} == 1 ]; then
exit 1
fi

minSdkVersion=23
buildToolsVersion="32.0.0"
minSdkVersion=24
buildToolsVersion="35.0.0"
buildToolsPath="${androidHome}/build-tools/${buildToolsVersion}"

if [[ ! -d ${buildToolsPath} ]]; then
Expand Down Expand Up @@ -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"
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'
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"

Expand Down

0 comments on commit b03ec47

Please sign in to comment.