ci: inspect APK with JDK tooling
This commit is contained in:
Vendored
+3
-2
@@ -69,8 +69,9 @@ pipeline {
|
|||||||
sh '''
|
sh '''
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
test "$(uname -m)" = x86_64
|
test "$(uname -m)" = x86_64
|
||||||
for command_name in git java curl python3 sha256sum unzip; do command -v "$command_name" >/dev/null; done
|
for command_name in git java curl python3 sha256sum; do command -v "$command_name" >/dev/null; done
|
||||||
test -x "$FLUTTER_ROOT/bin/flutter"
|
test -x "$FLUTTER_ROOT/bin/flutter"
|
||||||
|
test -x "$JAVA_HOME/bin/jar"
|
||||||
test -x "$ANDROID_HOME/build-tools/36.1.0/apksigner"
|
test -x "$ANDROID_HOME/build-tools/36.1.0/apksigner"
|
||||||
test -x "$ANDROID_HOME/build-tools/36.1.0/aapt2"
|
test -x "$ANDROID_HOME/build-tools/36.1.0/aapt2"
|
||||||
python3 - "$API_BASE_URL" <<'PY'
|
python3 - "$API_BASE_URL" <<'PY'
|
||||||
@@ -125,7 +126,7 @@ PY
|
|||||||
badging=$("$ANDROID_HOME/build-tools/36.1.0/aapt2" dump badging "$APK_PATH")
|
badging=$("$ANDROID_HOME/build-tools/36.1.0/aapt2" dump badging "$APK_PATH")
|
||||||
printf '%s\n' "$badging" | grep -q "package: name='com.nx.miaoji.internal'"
|
printf '%s\n' "$badging" | grep -q "package: name='com.nx.miaoji.internal'"
|
||||||
printf '%s\n' "$badging" | grep -q "versionCode='$ANDROID_VERSION_CODE'"
|
printf '%s\n' "$badging" | grep -q "versionCode='$ANDROID_VERSION_CODE'"
|
||||||
unzip -l "$APK_PATH" >artifacts/apk-files.txt
|
"$JAVA_HOME/bin/jar" tf "$APK_PATH" >artifacts/apk-files.txt
|
||||||
grep -q 'lib/arm64-v8a/' artifacts/apk-files.txt
|
grep -q 'lib/arm64-v8a/' artifacts/apk-files.txt
|
||||||
if grep -Eq 'lib/(x86|x86_64|armeabi-v7a)/' artifacts/apk-files.txt; then
|
if grep -Eq 'lib/(x86|x86_64|armeabi-v7a)/' artifacts/apk-files.txt; then
|
||||||
echo 'APK contains a non-arm64 native ABI' >&2
|
echo 'APK contains a non-arm64 native ABI' >&2
|
||||||
|
|||||||
Reference in New Issue
Block a user