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.
This commit is contained in:
parent
5c0eb2d967
commit
9376a2ac60
@ -41,6 +41,7 @@ android {
|
||||
defaultConfig {
|
||||
minSdkVersion 19
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
consumerProguardFiles 'lib-proguard-rules.txt'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
5
packages/integration_test/android/lib-proguard-rules.txt
Normal file
5
packages/integration_test/android/lib-proguard-rules.txt
Normal file
@ -0,0 +1,5 @@
|
||||
# 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**
|
@ -55,8 +55,7 @@ android {
|
||||
// TODO: Add your own signing config for the release build.
|
||||
// Signing with the debug keys for now, so `flutter run --release` works.
|
||||
signingConfig signingConfigs.debug
|
||||
minifyEnabled false
|
||||
shrinkResources false
|
||||
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
1
packages/integration_test/example/android/app/proguard-rules.pro
vendored
Normal file
1
packages/integration_test/example/android/app/proguard-rules.pro
vendored
Normal file
@ -0,0 +1 @@
|
||||
# Intentionally empty. Validation is that apps can set their own proguard files.
|
Loading…
x
Reference in New Issue
Block a user