#88 generate split APKs for IzzyOnDroid
This commit is contained in:
parent
34cd727c52
commit
90758a5ea1
2 changed files with 37 additions and 17 deletions
11
.github/workflows/release.yml
vendored
11
.github/workflows/release.yml
vendored
|
@ -50,8 +50,9 @@ jobs:
|
||||||
echo "${{ secrets.KEY_JKS }}" > release.keystore.asc
|
echo "${{ secrets.KEY_JKS }}" > release.keystore.asc
|
||||||
gpg -d --passphrase "${{ secrets.KEY_JKS_PASSPHRASE }}" --batch release.keystore.asc > $AVES_STORE_FILE
|
gpg -d --passphrase "${{ secrets.KEY_JKS_PASSPHRASE }}" --batch release.keystore.asc > $AVES_STORE_FILE
|
||||||
rm release.keystore.asc
|
rm release.keystore.asc
|
||||||
flutter build apk --bundle-sksl-path shaders_2.5.2.sksl.json
|
flutter build appbundle --flavor universal --bundle-sksl-path shaders_2.5.2.sksl.json
|
||||||
flutter build appbundle --bundle-sksl-path shaders_2.5.2.sksl.json
|
flutter build apk --flavor universal --bundle-sksl-path shaders_2.5.2.sksl.json
|
||||||
|
flutter build apk --flavor byAbi --split-per-abi --bundle-sksl-path shaders_2.5.2.sksl.json
|
||||||
rm $AVES_STORE_FILE
|
rm $AVES_STORE_FILE
|
||||||
env:
|
env:
|
||||||
AVES_STORE_FILE: ${{ github.workspace }}/key.jks
|
AVES_STORE_FILE: ${{ github.workspace }}/key.jks
|
||||||
|
@ -63,14 +64,14 @@ jobs:
|
||||||
- name: Create a release with the APK and App Bundle.
|
- name: Create a release with the APK and App Bundle.
|
||||||
uses: ncipollo/release-action@v1
|
uses: ncipollo/release-action@v1
|
||||||
with:
|
with:
|
||||||
artifacts: "build/app/outputs/apk/release/*.apk,build/app/outputs/bundle/release/*.aab"
|
artifacts: "build/app/outputs/bundle/universalRelease/*.aab,build/app/outputs/apk/universal/release/*.apk,build/app/outputs/apk/byAbi/release/*.apk"
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Upload app bundle
|
- name: Upload app bundle
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: appbundle
|
name: appbundle
|
||||||
path: build/app/outputs/bundle/release/app-release.aab
|
path: build/app/outputs/bundle/universalRelease/app-universal-release.aab
|
||||||
|
|
||||||
release:
|
release:
|
||||||
name: Create beta release on Play Store.
|
name: Create beta release on Play Store.
|
||||||
|
@ -89,7 +90,7 @@ jobs:
|
||||||
with:
|
with:
|
||||||
serviceAccountJsonPlainText: ${{ secrets.PLAYSTORE_ACCOUNT_KEY }}
|
serviceAccountJsonPlainText: ${{ secrets.PLAYSTORE_ACCOUNT_KEY }}
|
||||||
packageName: deckers.thibault.aves
|
packageName: deckers.thibault.aves
|
||||||
releaseFiles: app-release.aab
|
releaseFiles: app-universal-release.aab
|
||||||
track: beta
|
track: beta
|
||||||
status: completed
|
status: completed
|
||||||
whatsNewDirectory: whatsnew
|
whatsNewDirectory: whatsnew
|
||||||
|
|
|
@ -77,6 +77,21 @@ android {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// the "splitting" dimension and its flavors are only for building purposes:
|
||||||
|
// NDK ABI filters are not compatible with split APK generation
|
||||||
|
// but we want to generate both a universal APK without x86 libs, and split APKs
|
||||||
|
flavorDimensions "splitting"
|
||||||
|
|
||||||
|
productFlavors {
|
||||||
|
universal {
|
||||||
|
dimension "splitting"
|
||||||
|
}
|
||||||
|
|
||||||
|
byAbi {
|
||||||
|
dimension "splitting"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
buildTypes {
|
buildTypes {
|
||||||
debug {
|
debug {
|
||||||
applicationIdSuffix ".debug"
|
applicationIdSuffix ".debug"
|
||||||
|
@ -86,6 +101,15 @@ android {
|
||||||
applicationIdSuffix ".profile"
|
applicationIdSuffix ".profile"
|
||||||
resValue 'string', 'search_provider', "${appId}.profile.search_provider"
|
resValue 'string', 'search_provider', "${appId}.profile.search_provider"
|
||||||
}
|
}
|
||||||
|
release {
|
||||||
|
signingConfig signingConfigs.release
|
||||||
|
minifyEnabled true
|
||||||
|
shrinkResources true
|
||||||
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||||
|
}
|
||||||
|
|
||||||
|
def runTasks = gradle.startParameter.taskNames.toString().toLowerCase()
|
||||||
|
if (runTasks.contains("universal")) {
|
||||||
release {
|
release {
|
||||||
// specify architectures, to specifically exclude native libs for x86,
|
// specify architectures, to specifically exclude native libs for x86,
|
||||||
// which lead to: UnsatisfiedLinkError...couldn't find "libflutter.so"
|
// which lead to: UnsatisfiedLinkError...couldn't find "libflutter.so"
|
||||||
|
@ -93,12 +117,7 @@ android {
|
||||||
ndk {
|
ndk {
|
||||||
abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86_64'
|
abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86_64'
|
||||||
}
|
}
|
||||||
|
}
|
||||||
signingConfig signingConfigs.release
|
|
||||||
|
|
||||||
minifyEnabled true
|
|
||||||
shrinkResources true
|
|
||||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -120,10 +139,10 @@ dependencies {
|
||||||
implementation 'com.caverock:androidsvg-aar:1.4'
|
implementation 'com.caverock:androidsvg-aar:1.4'
|
||||||
implementation 'com.commonsware.cwac:document:0.4.1'
|
implementation 'com.commonsware.cwac:document:0.4.1'
|
||||||
implementation 'com.drewnoakes:metadata-extractor:2.16.0'
|
implementation 'com.drewnoakes:metadata-extractor:2.16.0'
|
||||||
// https://jitpack.io/p/deckerst/Android-TiffBitmapFactory
|
// forked, built by JitPack, cf https://jitpack.io/p/deckerst/Android-TiffBitmapFactory
|
||||||
implementation 'com.github.deckerst:Android-TiffBitmapFactory:876e53870a' // forked, built by JitPack
|
implementation 'com.github.deckerst:Android-TiffBitmapFactory:876e53870a'
|
||||||
// https://jitpack.io/p/deckerst/pixymeta-android
|
// forked, built by JitPack, cf https://jitpack.io/p/deckerst/pixymeta-android
|
||||||
implementation 'com.github.deckerst:pixymeta-android:0bea51ead2' // forked, built by JitPack
|
implementation 'com.github.deckerst:pixymeta-android:0bea51ead2'
|
||||||
implementation 'com.github.bumptech.glide:glide:4.12.0'
|
implementation 'com.github.bumptech.glide:glide:4.12.0'
|
||||||
|
|
||||||
kapt 'androidx.annotation:annotation:1.2.0'
|
kapt 'androidx.annotation:annotation:1.2.0'
|
||||||
|
|
Loading…
Reference in a new issue