diff --git a/example/app/libs/fat-aar-final.aar b/example/app/libs/fat-aar-final.aar index 3e14a323..b23a3154 100644 Binary files a/example/app/libs/fat-aar-final.aar and b/example/app/libs/fat-aar-final.aar differ diff --git a/example/build.gradle b/example/build.gradle index 51c4cac8..c739906b 100644 --- a/example/build.gradle +++ b/example/build.gradle @@ -6,8 +6,8 @@ buildscript { maven { url "https://plugins.gradle.org/m2/" } } dependencies { - classpath 'com.android.tools.build:gradle:4.1.0' - classpath 'com.kezong:fat-aar:1.2.20' + classpath 'com.android.tools.build:gradle:4.1.1' + classpath 'com.kezong:fat-aar:1.3.1' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.72" } } diff --git a/example/lib-main/build.gradle b/example/lib-main/build.gradle index a550fc4e..ae898f62 100644 --- a/example/lib-main/build.gradle +++ b/example/lib-main/build.gradle @@ -21,7 +21,7 @@ android { buildTypes { release { - minifyEnabled false + minifyEnabled true proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' } } @@ -64,18 +64,9 @@ afterEvaluate { fataar { /** - * Plan A: using bytecode patching to process the merging problem of R files - * Plan B: generate sub module's R class to process the merging problem of R files - * if transformR is true, use Plan A, else use Plan B. - * In the future, Plan B maybe deprecated - * Default value is true - * @since 1.3.0 - */ - transformR = true - - /** - * If transitive is true, local jar module and remote library's dependencies will be embed. (local aar module does not support) + * If transitive is true, local jar module and remote library's dependencies will be embed. * If transitive is false, just embed first level dependency + * Local aar project does not support transitive, always embed first level * Default value is false * @since 1.3.0 */ @@ -85,21 +76,26 @@ fataar { dependencies { implementation fileTree(dir: 'libs', include: '*.jar') // java dependency - embed project(path: ':lib-java') + embed project(':lib-java') // aar dependency - embed project(path: ':lib-aar') + embed project(':lib-aar') // aar dependency - embed project(path: ':lib-aar2') + embed project(':lib-aar2') // local full aar dependency, just build in flavor1 - embed project(path: ':lib-aar-local') + flavor1Embed project(':lib-aar-local') // local full aar dependency, just build in debug debugEmbed (name:'lib-aar-local2', ext:'aar') - // remote jar dependency + // remote dependency embed 'com.google.guava:guava:20.0' // remote aar dependency - embed 'com.facebook.fresco:fresco:1.11.0' + embed ('com.facebook.fresco:fresco:1.11.0') { + // exclude any group or module + // exclude(group:'com.facebook.soloader', module:'soloader') + } // remote aar dependency embed ('com.github.bumptech.glide:glide:4.11.0') { + // If transitive = false, it will not embed dependencies declared in pom.xml + // If fataar.transitive = false, There is no need to declare. transitive = false } // don't want to embed in diff --git a/example/lib-main/proguard-rules.pro b/example/lib-main/proguard-rules.pro index bb3eee58..d3e5bb2d 100644 --- a/example/lib-main/proguard-rules.pro +++ b/example/lib-main/proguard-rules.pro @@ -19,4 +19,8 @@ # If you keep the line number information, uncomment this to # hide the original source file name. #-renamesourcefileattribute SourceFile --keep class com.kezong.demo.lib.MainLibClass {*;} \ No newline at end of file +-keepparameternames +-dontoptimize +-dontshrink +-dontobfuscate +-dontpreverify