mirror of
https://github.com/zarzet/SpotiFLAC-Mobile.git
synced 2026-10-20 06:28:27 +02:00
feat(build): require Discord in production and keep Lite opt-in
This commit is contained in:
1 parent
541bfc4002
commit
9c0b22e2c8
9 files changed
+333
-17
No files matched your search
@@ -50,6 +50,8 @@ jobs:
|
||||
build-android:
|
||||
runs-on: ubuntu-latest
|
||||
needs: get-version
|
||||
env:
|
||||
SPOTIFLAC_DISCORD_SDK: "1"
|
||||
|
||||
steps:
|
||||
- name: Free disk space
|
||||
@@ -142,7 +144,7 @@ jobs:
|
||||
|
||||
- name: Build release APKs
|
||||
run: |
|
||||
bash scripts/build_android.sh --target lib/main.dart
|
||||
bash scripts/build_android.sh --production --target lib/main.dart
|
||||
ls -la build/app/outputs/flutter-apk/
|
||||
|
||||
- name: Sign and verify release APKs (V1/V2/V3/V4)
|
||||
@@ -212,9 +214,9 @@ jobs:
|
||||
run: |
|
||||
apk_dir=build/app/outputs/flutter-apk
|
||||
python3 scripts/check_backend_apk.py "$apk_dir/SpotiFLAC-${VERSION}-arm64.apk" \
|
||||
--backend rust --abis arm64-v8a
|
||||
--backend rust --abis arm64-v8a --discord-sdk
|
||||
python3 scripts/check_backend_apk.py "$apk_dir/SpotiFLAC-${VERSION}-arm32.apk" \
|
||||
--backend rust --abis armeabi-v7a
|
||||
--backend rust --abis armeabi-v7a --discord-sdk
|
||||
for abi in arm64 arm32; do
|
||||
"$ANDROID_HOME/build-tools/37.0.0/zipalign" -c -P 16 4 \
|
||||
"$apk_dir/SpotiFLAC-${VERSION}-${abi}.apk"
|
||||
@@ -231,6 +233,8 @@ jobs:
|
||||
build-ios:
|
||||
runs-on: macos-15
|
||||
needs: get-version # Only depends on version, NOT android build!
|
||||
env:
|
||||
SPOTIFLAC_DISCORD_SDK: "1"
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
@@ -283,7 +287,13 @@ jobs:
|
||||
|
||||
- name: Configure Rust application pods
|
||||
working-directory: ios
|
||||
run: pod install
|
||||
run: |
|
||||
test -f ../third_party/spotiflac_discord/ios/Frameworks/discord_partner_sdk.xcframework/Info.plist || {
|
||||
echo "Production requires the official Discord SDK. Run scripts/setup_discord_sdk.sh in the build environment first." >&2
|
||||
exit 1
|
||||
}
|
||||
test -f ../third_party/spotiflac_discord/ios/Frameworks/Discord-License-Notices.txt
|
||||
pod install
|
||||
|
||||
- name: Build iOS (unsigned)
|
||||
run: |
|
||||
@@ -307,6 +317,8 @@ jobs:
|
||||
|
||||
- name: Audit Rust iOS archive before packaging
|
||||
run: |
|
||||
test -f ios/build/Runner.xcarchive/Products/Applications/Runner.app/Frameworks/discord_partner_sdk.framework/discord_partner_sdk
|
||||
test -f ios/build/Runner.xcarchive/Products/Applications/Runner.app/Discord-License-Notices.txt
|
||||
python3 -m unittest discover -s scripts -p 'test_check_backend_ios.py'
|
||||
python3 scripts/check_backend_ios.py \
|
||||
ios/build/Runner.xcarchive/Products/Applications/Runner.app \
|
||||
|
||||
Reference in new issue
Block a user