forked from ankidroid/Anki-Android
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(build): allow testing of release APK in connected test
Users may not have correctly configured keystores for release APK builds so it has to default off Release builds currently use environment variables for keystore/key password input, so use same pathway to switch to release testing Switching to release testing means the 'Debug' gradle tasks completely disappear and may not be referenced at all, they are replaced by the 'Release' variants, so make the task name dynamic and base it on presence of the release mode testing environment variable Some Android test frameworks do not minimize correctly out of the box, so they need a separate proguard file
- Loading branch information
Showing
4 changed files
with
30 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# These proguard rules are only needed when building | ||
# for the combination of testing and release mode | ||
# Certain androidx frameworks that are test-only have | ||
# issues with proguard / minimization in release mode | ||
|
||
# First build error in release mode for testing: | ||
# | ||
# ERROR: Missing classes detected while running R8. Please add the missing classes or apply additional keep rules that are generated in /Users/mike/work/ankidroid/Anki-Android/AnkiDroid/build/outputs/mapping/playReleaseAndroidTest/missing_rules.txt. | ||
# ERROR: R8: Missing class com.google.protobuf.GeneratedMessageLite$MergeFromVisitor (referenced from: java.lang.Object com.google.android.apps.common.testing.accessibility.framework.uielement.proto.AndroidFrameworkProtos$LayoutParamsProto.dynamicMethod(com.google.protobuf.GeneratedMessageLite$MethodToInvoke, java.lang.Object, java.lang.Object)) | ||
# Missing class com.google.protobuf.GeneratedMessageLite$Visitor (referenced from: java.lang.Object com.google.android.apps.common.testing.accessibility.framework.proto.AccessibilityEvaluationProtos$AccessibilityEvaluation.dynamicMethod(com.google.protobuf.GeneratedMessageLite$MethodToInvoke, java.lang.Object, java.lang.Object) and 19 other contexts) | ||
# | ||
# We are not using automated accessibility testing, so there should be | ||
# no impact for these classes to be missing, ignore them | ||
-dontwarn com.google.protobuf.GeneratedMessageLite$MergeFromVisitor | ||
-dontwarn com.google.protobuf.GeneratedMessageLite$Visitor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters