Android Production APK

This commit is contained in:
KoalaSat
2024-05-02 12:55:54 +02:00
parent 0f41a613e4
commit 46a92a994f
3 changed files with 41 additions and 3 deletions

View File

@ -54,10 +54,37 @@ jobs:
- name: Setup Gradle
uses: gradle/gradle-build-action@v3
- name: Decode Keystore
id: decode_keystore
uses: timheuer/base64-to-file@v1.2
with:
fileName: 'keystore.jks'
fileDir: './'
encodedString: ${{ secrets.KEYSTORE }}
- name: 'Build Android Release'
run: |
cd mobile/android
./gradlew assembleRelease
env:
KEY_ALIAS: ${{ secrets.KEY_ALIAS }}
KEY_PASS: ${{ secrets.KEY_PASS }}
KEY_STORE_PASS: ${{ secrets.KEY_STORE_PASS }}
- name: 'Check for non-FOSS libraries'
run: |
wget https://github.com/iBotPeaches/Apktool/releases/download/v2.7.0/apktool_2.7.0.jar
wget https://github.com/iBotPeaches/Apktool/raw/master/scripts/linux/apktool
# clone the repo
git clone https://gitlab.com/IzzyOnDroid/repo.git
# create a directory for Apktool and move the apktool* files there
mkdir -p repo/lib/radar/tool
mv apktool* repo/lib/radar/tool
# create an alias for ease of use
chmod u+x repo/lib/radar/tool/apktool
mv repo/lib/radar/tool/apktool_2.7.0.jar repo/lib/radar/tool/apktool.jar
repo/bin/scanapk.php mobile/android/app/build/outputs/apk/release/app-universal-release.apk
- name: 'Get Commit Hash'
id: commit

2
mobile/.gitignore vendored
View File

@ -40,8 +40,6 @@ yarn-error.log
# BUCK
buck-out/
\.buckd/
*.keystore
!debug.keystore
# fastlane
#

View File

@ -238,6 +238,12 @@ android {
keyAlias 'androiddebugkey'
keyPassword 'android'
}
release {
storeFile file("../../keystore.jks")
keyAlias System.getenv("KEY_ALIAS")
storePassword System.getenv("KEY_STORE_PASS")
keyPassword System.getenv("KEY_PASS")
}
}
buildTypes {
debug {
@ -246,7 +252,7 @@ android {
release {
// Caution! In production, you need to generate your own keystore file.
// see https://reactnative.dev/docs/signed-apk-android.
signingConfig signingConfigs.debug
signingConfig signingConfigs.release
minifyEnabled enableProguardInReleaseBuilds
proguardFiles getDefaultProguardFile("proguard-android.txt"), "proguard-rules.pro"
}
@ -273,6 +279,13 @@ android {
exclude "**/libjsc.so"
jniLibs.useLegacyPackaging = true
}
dependenciesInfo {
// Disables dependency metadata when building APKs.
includeInApk = false
// Disables dependency metadata when building Android App Bundles.
includeInBundle = false
}
}
dependencies {