Skip to content

Commit b073443

Browse files
committed
upgrade AGP 4.1.1, fat-aar plugin 1.3.1
1 parent 19a079f commit b073443

File tree

4 files changed

+21
-21
lines changed

4 files changed

+21
-21
lines changed

example/app/libs/fat-aar-final.aar

42 Bytes
Binary file not shown.

example/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ buildscript {
66
maven { url "https://plugins.gradle.org/m2/" }
77
}
88
dependencies {
9-
classpath 'com.android.tools.build:gradle:4.1.0'
10-
classpath 'com.kezong:fat-aar:1.2.20'
9+
classpath 'com.android.tools.build:gradle:4.1.1'
10+
classpath 'com.kezong:fat-aar:1.3.1'
1111
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.72"
1212
}
1313
}

example/lib-main/build.gradle

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ android {
2121

2222
buildTypes {
2323
release {
24-
minifyEnabled false
24+
minifyEnabled true
2525
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
2626
}
2727
}
@@ -64,18 +64,9 @@ afterEvaluate {
6464

6565
fataar {
6666
/**
67-
* Plan A: using bytecode patching to process the merging problem of R files
68-
* Plan B: generate sub module's R class to process the merging problem of R files
69-
* if transformR is true, use Plan A, else use Plan B.
70-
* In the future, Plan B maybe deprecated
71-
* Default value is true
72-
* @since 1.3.0
73-
*/
74-
transformR = true
75-
76-
/**
77-
* If transitive is true, local jar module and remote library's dependencies will be embed. (local aar module does not support)
67+
* If transitive is true, local jar module and remote library's dependencies will be embed.
7868
* If transitive is false, just embed first level dependency
69+
* Local aar project does not support transitive, always embed first level
7970
* Default value is false
8071
* @since 1.3.0
8172
*/
@@ -85,21 +76,26 @@ fataar {
8576
dependencies {
8677
implementation fileTree(dir: 'libs', include: '*.jar')
8778
// java dependency
88-
embed project(path: ':lib-java')
79+
embed project(':lib-java')
8980
// aar dependency
90-
embed project(path: ':lib-aar')
81+
embed project(':lib-aar')
9182
// aar dependency
92-
embed project(path: ':lib-aar2')
83+
embed project(':lib-aar2')
9384
// local full aar dependency, just build in flavor1
94-
embed project(path: ':lib-aar-local')
85+
flavor1Embed project(':lib-aar-local')
9586
// local full aar dependency, just build in debug
9687
debugEmbed (name:'lib-aar-local2', ext:'aar')
97-
// remote jar dependency
88+
// remote dependency
9889
embed 'com.google.guava:guava:20.0'
9990
// remote aar dependency
100-
embed 'com.facebook.fresco:fresco:1.11.0'
91+
embed ('com.facebook.fresco:fresco:1.11.0') {
92+
// exclude any group or module
93+
// exclude(group:'com.facebook.soloader', module:'soloader')
94+
}
10195
// remote aar dependency
10296
embed ('com.github.bumptech.glide:glide:4.11.0') {
97+
// If transitive = false, it will not embed dependencies declared in pom.xml
98+
// If fataar.transitive = false, There is no need to declare.
10399
transitive = false
104100
}
105101
// don't want to embed in

example/lib-main/proguard-rules.pro

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,8 @@
1919
# If you keep the line number information, uncomment this to
2020
# hide the original source file name.
2121
#-renamesourcefileattribute SourceFile
22-
-keep class com.kezong.demo.lib.MainLibClass {*;}
22+
-keepparameternames
23+
-dontoptimize
24+
-dontshrink
25+
-dontobfuscate
26+
-dontpreverify

0 commit comments

Comments
 (0)