Skip to content

Commit 15b5d25

Browse files
authored
Merge pull request #170 from muun/53.4-release-branch
53.4 release branch
2 parents 91449f0 + eaa8fd4 commit 15b5d25

File tree

6 files changed

+108
-11
lines changed

6 files changed

+108
-11
lines changed

.github/workflows/build-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141

4242
with:
4343
name: apk
44-
path: apk/apolloui-prod-release-unsigned.apk
44+
path: apk/apolloui-prod-*-release-unsigned.apk
4545

4646
- name: Upload mapping
4747
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # Matches tag v4.3.3

.github/workflows/pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,4 @@ jobs:
4242

4343
with:
4444
name: apk
45-
path: apk/apolloui-prod-release-unsigned.apk
45+
path: apk/apolloui-prod-*-release-unsigned.apk

android/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,12 @@ follow [https://changelog.md/](https://changelog.md/) guidelines.
66

77
## [Unreleased]
88

9+
## [53.4] - 2025-05-29
10+
11+
### CHANGED
12+
13+
- Added multi APK support to bypass 100MB APK size limit.
14+
915
## [53.3] - 2025-04-08
1016

1117
### FIXED

android/Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,5 +67,8 @@ RUN tools/bootstrap-gomobile.sh \
6767

6868
FROM scratch
6969

70-
COPY --from=build /src/android/apolloui/build/outputs/apk/prod/release/apolloui-prod-release-unsigned.apk apolloui-prod-release-unsigned.apk
70+
COPY --from=build /src/android/apolloui/build/outputs/apk/prod/release/apolloui-prod-arm64-v8a-release-unsigned.apk apolloui-prod-arm64-v8a-release-unsigned.apk
71+
COPY --from=build /src/android/apolloui/build/outputs/apk/prod/release/apolloui-prod-armeabi-v7a-release-unsigned.apk apolloui-prod-armeabi-v7a-release-unsigned.apk
72+
COPY --from=build /src/android/apolloui/build/outputs/apk/prod/release/apolloui-prod-x86-release-unsigned.apk apolloui-prod-x86-release-unsigned.apk
73+
COPY --from=build /src/android/apolloui/build/outputs/apk/prod/release/apolloui-prod-x86_64-release-unsigned.apk apolloui-prod-x86_64-release-unsigned.apk
7174
COPY --from=build /src/android/apolloui/build/outputs/mapping/prodRelease/mapping.txt mapping.txt

android/apolloui/build.gradle

Lines changed: 36 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,8 @@ android {
9696
applicationId "io.muun.apollo"
9797
minSdk 19
9898
targetSdk 34
99-
versionCode 1303
100-
versionName "53.3"
99+
versionCode 1304
100+
versionName "53.4"
101101

102102
// Needed to make sure these classes are available in the main DEX file for API 19
103103
// See: https://spin.atomicobject.com/2018/07/16/support-kitkat-multidex/
@@ -146,6 +146,15 @@ android {
146146
shrinkResources true
147147

148148
buildConfigField("boolean", "RELEASE", "true")
149+
150+
splits {
151+
abi {
152+
enable true
153+
reset()
154+
include "x86", "x86_64", "armeabi-v7a", "arm64-v8a"
155+
universalApk false
156+
}
157+
}
149158
}
150159
}
151160

@@ -450,6 +459,31 @@ task startStaging(type: Exec, dependsOn: 'assembleStaging') {
450459
commandLine "${rootProject.rootDir}/tools/run-apollo.sh", "staging"
451460
}
452461

462+
android.applicationVariants.configureEach { variant ->
463+
variant.outputs.configureEach { output ->
464+
def baseVersionCode = versionCode as int
465+
def buildVersionSuffix = project.hasProperty('buildSuffix') ? project.buildSuffix : "000"
466+
467+
if (!buildVersionSuffix.matches("\\d{3}")) {
468+
throw new GradleException("buildSuffix must be a number with 3 digits: '$buildVersionSuffix'")
469+
}
470+
471+
def abiVersionCodeMap = ["x86": 2, "x86_64": 3, "armeabi-v7a": 4, "arm64-v8a": 5]
472+
def abi = output.getFilter(com.android.build.OutputFile.ABI)
473+
def abiCode = 0
474+
475+
if (abi != null) {
476+
abiCode = abiVersionCodeMap.get(abi) ?: 0
477+
}
478+
479+
output.versionCodeOverride = (baseVersionCode.toString() + buildVersionSuffix + abiCode.toString()) as int
480+
481+
if (System.getenv("CI")) {
482+
println "ABI: ${abi ?: 'universal'}, Final versionCode: ${output.versionCodeOverride}"
483+
}
484+
}
485+
}
486+
453487
apply plugin: 'com.google.gms.google-services' // Google Services plugin
454488
// We should delete this as soon as we can. google services plugin introduces a dependency strict
455489
// checking that checks against other projects deps too. There's a conflict with

tools/verify-apollo.sh

Lines changed: 60 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,22 +19,76 @@ cd $(git rev-parse --show-toplevel)
1919

2020
tmp=$(mktemp -d)
2121

22+
# Ensure temp directory is deleted when script exits
23+
trap 'rm -rf "$tmp"' EXIT
24+
2225
# Prepare paths to extract APKs
2326
mkdir -p "$tmp/to_verify" "$tmp/baseline"
2427

25-
echo "Building the APK from source. This might take a while (10-20 minutes)..."
26-
28+
echo "Building the APKs from source. This might take a while (10-20 minutes)..."
2729
mkdir -p apk
2830
DOCKER_BUILDKIT=1 docker build -f android/Dockerfile -o apk .
2931

30-
unzip -q -d "$tmp/to_verify" "$apk_to_verify"
31-
unzip -q -d "$tmp/baseline" "apk/apolloui-prod-release-unsigned.apk"
32+
# Clean to_verify directory before unzipping
33+
rm -rf "$tmp/to_verify"
34+
35+
# Unzip the APK to verify
36+
mkdir -p "$tmp/to_verify"
37+
unzip -q -o "$apk_to_verify" -d "$tmp/to_verify"
3238

3339
# TODO: verify the signature
3440

3541
# Remove the signature since OSS users won't have Muuns private signing key
36-
rm -r "$tmp"/{to_verify,baseline}/{META-INF,resources.arsc}
42+
rm -r "$tmp"/to_verify/{META-INF,resources.arsc}
43+
44+
# Compare /lib first
45+
lib_dirs_in_verify=($(find "$tmp/to_verify/lib" -mindepth 1 -maxdepth 1 -type d 2>/dev/null || true))
46+
47+
echo "Found lib directory in APK to verify: ${lib_dirs_in_verify[*]}"
48+
49+
if [ ${#lib_dirs_in_verify[@]} -ne 1 ]; then
50+
echo "Unexpected lib directory structure in APK to verify."
51+
exit 3
52+
fi
3753

38-
diff -r "$tmp/to_verify" "$tmp/baseline" && echo "Verification success!" || echo "Verification failed :("
54+
lib_dir_name=$(basename "${lib_dirs_in_verify[0]}")
55+
echo "Using lib architecture: $lib_dir_name"
3956

57+
baseline_apk_dir=""
58+
59+
# Pick baseline based on lib architecture
60+
case "$lib_dir_name" in
61+
arm64-v8a)
62+
baseline_apk_dir="apk/apolloui-prod-arm64-v8a-release-unsigned.apk"
63+
;;
64+
armeabi-v7a)
65+
baseline_apk_dir="apk/apolloui-prod-armeabi-v7a-release-unsigned.apk"
66+
;;
67+
x86)
68+
baseline_apk_dir="apk/apolloui-prod-x86-release-unsigned.apk"
69+
;;
70+
x86_64)
71+
baseline_apk_dir="apk/apolloui-prod-x86_64-release-unsigned.apk"
72+
;;
73+
*)
74+
echo "Unknown architecture: $lib_dir_name"
75+
exit 4
76+
;;
77+
esac
78+
79+
# Clean baseline directory before unzipping
80+
rm -rf "$tmp/baseline"/*
81+
82+
unzip -q -o "$baseline_apk_dir" -d "$tmp/baseline"
83+
rm -r "$tmp"/baseline/{META-INF,resources.arsc}
84+
85+
echo "Comparing files..."
86+
87+
diff_non_lib=$(diff -r "$tmp/to_verify" "$tmp/baseline" || true)
88+
89+
if [ -n "$diff_non_lib" ]; then
90+
echo "Verification failed :("
91+
exit 5
92+
fi
4093

94+
echo "Verification success!"

0 commit comments

Comments
 (0)