Skip to content

Commit 19c5168

Browse files
committed
android混淆优化
1 parent e3e8099 commit 19c5168

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

android/build.gradle

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,26 @@ android {
2727
defaultConfig {
2828
minSdkVersion 17
2929
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
30-
31-
// library 混淆 -> 随 library 引用,自动添加到 apk 打包混淆
32-
consumerProguardFiles 'consumer-rules.pro'
3330
}
3431

3532
lintOptions {
3633
disable 'InvalidPackage'
3734
}
35+
buildTypes {
36+
release {
37+
minifyEnabled true
38+
useProguard true
39+
// library 混淆 -> 随 library 引用,自动添加到 apk 打包混淆
40+
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'consumer-rules.pro'
41+
}
42+
debug {
43+
minifyEnabled false
44+
useProguard false
45+
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'consumer-rules.pro'
46+
}
47+
}
48+
49+
3850
}
3951

4052
dependencies {

0 commit comments

Comments
 (0)