Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade build tools and fix pg-map-id for F-Droid #3084

Merged
merged 4 commits into from
Jun 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading