taler-android

Android apps for GNU Taler (wallet, PoS, cashier)
Log | Files | Refs | README | LICENSE

commit 4bd0ec921e7ba0b074fef28604febd7ad9d57d01
parent dabc0ce62c93f8d78ed800e0f3c63b7fd5cb9e25
Author: Torsten Grote <t@grobox.de>
Date:   Fri, 31 Jul 2020 10:58:20 -0300

Enable code minification for release builds of all apps

Attention: This brings a high run-time crash risk.
So all release builds need to be thoroughly tested before publication.
Nightly builds have been switched to release builds for that reason.

Diffstat:
Mcashier/.gitlab-ci.yml | 2+-
Mcashier/build.gradle | 2+-
Mcashier/proguard-rules.pro | 4++++
Mmerchant-lib/consumer-rules.pro | 1+
Mmerchant-terminal/.gitlab-ci.yml | 2+-
Mmerchant-terminal/proguard-rules.pro | 2++
Mtaler-kotlin-android/consumer-rules.pro | 15+++++++++++++++
Mwallet/.gitlab-ci.yml | 2+-
Mwallet/build.gradle | 2+-
Mwallet/proguard-rules.pro | 4++++
10 files changed, 31 insertions(+), 5 deletions(-)

diff --git a/cashier/.gitlab-ci.yml b/cashier/.gitlab-ci.yml @@ -36,7 +36,7 @@ cashier_deploy_nightly: # Set nightly application ID - sed -i "s,^\(\s*applicationId\) \"*[a-z\.].*\",\1 \"net.taler.cashier.nightly\"," cashier/build.gradle # Build the APK - - ./gradlew :cashier:assembleDebug + - ./gradlew :cashier:assembleRelease # START only needed while patch not accepted/released upstream - apt update && apt install patch - patch /usr/lib/python3/dist-packages/fdroidserver/nightly.py nightly-stats.patch diff --git a/cashier/build.gradle b/cashier/build.gradle @@ -35,7 +35,7 @@ android { buildTypes { release { - minifyEnabled false + minifyEnabled true proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } } diff --git a/cashier/proguard-rules.pro b/cashier/proguard-rules.pro @@ -19,3 +19,7 @@ # If you keep the line number information, uncomment this to # hide the original source file name. #-renamesourcefileattribute SourceFile + +# androidx.security:security-crypto +# https://github.com/google/tink/issues/361 +-keep class * extends com.google.crypto.tink.shaded.protobuf.GeneratedMessageLite { *; } diff --git a/merchant-lib/consumer-rules.pro b/merchant-lib/consumer-rules.pro @@ -0,0 +1 @@ +-keep class net.taler.merchantlib.** {*;} diff --git a/merchant-terminal/.gitlab-ci.yml b/merchant-terminal/.gitlab-ci.yml @@ -38,7 +38,7 @@ merchant_deploy_nightly: # Set nightly application ID - sed -i "s,^\(\s*applicationId\) \"*[a-z\.].*\",\1 \"net.taler.merchantpos.nightly\"," merchant-terminal/build.gradle # Build the APK - - ./gradlew :merchant-terminal:assembleDebug + - ./gradlew :merchant-terminal:assembleRelease # START only needed while patch not accepted/released upstream - apt update && apt install patch - patch /usr/lib/python3/dist-packages/fdroidserver/nightly.py nightly-stats.patch diff --git a/merchant-terminal/proguard-rules.pro b/merchant-terminal/proguard-rules.pro @@ -19,3 +19,5 @@ # If you keep the line number information, uncomment this to # hide the original source file name. #-renamesourcefileattribute SourceFile + +-keep class net.taler.merchantpos.** {*;} diff --git a/taler-kotlin-android/consumer-rules.pro b/taler-kotlin-android/consumer-rules.pro @@ -0,0 +1,15 @@ +-dontobfuscate + +# This is broad, but better leave a few common class and still optimize the rest out +-keep class net.taler.common.** {*;} + +# AndroidX navigation +-keepnames class androidx.navigation.fragment.NavHostFragment + +# Jackson serialization +-keep class kotlin.Metadata { *; } +-keep class kotlin.reflect.** { *; } + +# KotlinX serialization +-keepattributes *Annotation*, InnerClasses +-dontnote kotlinx.serialization.SerializationKt diff --git a/wallet/.gitlab-ci.yml b/wallet/.gitlab-ci.yml @@ -25,7 +25,7 @@ wallet_deploy_nightly: # Ensure that key exists - test -z "$DEBUG_KEYSTORE" && exit 0 # Build the APK - - ./gradlew :wallet:assembleNightlyDebug + - ./gradlew :wallet:assembleNightlyRelease # START only needed while patch not accepted/released upstream - apt update && apt install patch - patch -b /usr/lib/python3/dist-packages/fdroidserver/nightly.py nightly-stats.patch diff --git a/wallet/build.gradle b/wallet/build.gradle @@ -53,7 +53,7 @@ android { } buildTypes { release { - minifyEnabled false + minifyEnabled true proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } } diff --git a/wallet/proguard-rules.pro b/wallet/proguard-rules.pro @@ -19,3 +19,7 @@ # If you keep the line number information, uncomment this to # hide the original source file name. #-renamesourcefileattribute SourceFile + +-keep class akono.AkonoJni {*;} + +-keep class net.taler.wallet.** {*;}