mirror of
https://github.com/anyproto/anytype-kotlin.git
synced 2025-06-07 21:37:02 +09:00
DROID-3232 App | Tech | Script for preparing Android App manifest for APK distribution (#2087)
This commit is contained in:
parent
24f7f62bb4
commit
4b36bf5832
3 changed files with 26 additions and 1 deletions
3
.github/workflows/release.yml
vendored
3
.github/workflows/release.yml
vendored
|
@ -55,6 +55,9 @@ jobs:
|
|||
-Pcom.anytype.ci=true \
|
||||
-Dorg.gradle.unsafe.configuration-cache=false"
|
||||
|
||||
- name: Prepare Android Manifest for APKs
|
||||
run: ./scripts/release/apk.sh
|
||||
|
||||
- name: Build release APKS
|
||||
run: ./gradlew :app:assembleRelease
|
||||
|
||||
|
|
5
Makefile
5
Makefile
|
@ -47,4 +47,7 @@ clean_protos:
|
|||
update_mw: download_mw_artefacts normalize_mw_imports clean_protos
|
||||
|
||||
# Update mw from custom build (download only library, you have to update your proto files manually)
|
||||
update_mw_custom: download_mw_artefacts_custom
|
||||
update_mw_custom: download_mw_artefacts_custom
|
||||
|
||||
prepare_app_manifest_for_release_apk:
|
||||
./scripts/release/apk.sh
|
||||
|
|
19
scripts/release/apk.sh
Executable file
19
scripts/release/apk.sh
Executable file
|
@ -0,0 +1,19 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Script for preparing Android Manifest for APK distribution.
|
||||
|
||||
# Define the file to be modified
|
||||
FILE="app/src/main/AndroidManifest.xml"
|
||||
|
||||
# Check if the system is macOS or Linux
|
||||
if [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
# macOS (sed requires an empty string argument for in-place editing)
|
||||
sed -i '' 's|<!-- <uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />-->|<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />|' "$FILE"
|
||||
sed -i '' 's|<!-- <uses-permission android:name="android.permission.READ_MEDIA_VIDEO" />-->|<uses-permission android:name="android.permission.READ_MEDIA_VIDEO" />|' "$FILE"
|
||||
else
|
||||
# Linux (sed works without the empty string argument for in-place editing)
|
||||
sed -i 's|<!-- <uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />-->|<uses-permission android:name="android.permission.READ_MEDIA_IMAGES" />|' "$FILE"
|
||||
sed -i 's|<!-- <uses-permission android:name="android.permission.READ_MEDIA_VIDEO" />-->|<uses-permission android:name="android.permission.READ_MEDIA_VIDEO" />|' "$FILE"
|
||||
fi
|
||||
|
||||
echo "Lines uncommented successfully."
|
Loading…
Add table
Add a link
Reference in a new issue