Unverified Commit 9376a2ac authored by Reid Baker's avatar Reid Baker Committed by GitHub

Support minifcation for apps that depend on AGP 8 and integration_test (#127628)

- Set exported proguard rules for consumers of integration_test using AGP 8.0 
- Updated proguard usage in example to test setting custom proguard rules works.

#127388

Documentation for how consumerProguardFiles works. https://developer.android.com/studio/projects/android-library#Considerations

Unknown why we had to use ** instead of matching exactly.
parent 5c0eb2d9
...@@ -41,6 +41,7 @@ android { ...@@ -41,6 +41,7 @@ android {
defaultConfig { defaultConfig {
minSdkVersion 19 minSdkVersion 19
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
consumerProguardFiles 'lib-proguard-rules.txt'
} }
dependencies { dependencies {
......
# For some reason org.kxml2.io.KXmlParser and org.kxml2.io.KXmlSerializer
# are missing and not marked correctly by dependencies.
# Possibly related to https://github.com/flutter/flutter/issues/56591
# See https://github.com/flutter/flutter/issues/127388 for more context.
-dontwarn org.kxml2.io.KXmlParser**,org.kxml2.io.KXmlSerializer**
\ No newline at end of file
...@@ -55,8 +55,7 @@ android { ...@@ -55,8 +55,7 @@ android {
// TODO: Add your own signing config for the release build. // TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works. // Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.debug signingConfig signingConfigs.debug
minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
shrinkResources false
} }
} }
} }
......
# Intentionally empty. Validation is that apps can set their own proguard files.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment