当前位置:网站首页>AAR packaging and confusion

AAR packaging and confusion

2022-06-13 02:43:00 Original general breaking

We do sdk, It often needs to be beaten aar package .

How to fight aar package ?

1、 First module Must be library

2、build.gradle The application of writing aar and module, To be converted into compileOnly, In this way, no error will be reported when packing , because aar Other... Are not allowed aar

3、

 4、

 aar How packages are confused

build.gradle 

 buildTypes {
        release {
            minifyEnabled true
            proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
        }
    }

 minifyEnabled true Means to be confused

Confusing configuration

-keep class com.yuanxuzhen.bean.*    The class names under this package remain 
-keep class com.yuanxuzhen.bean.**   Keep the class names under this package and its sub packages 
-keep class com.yuanxuzhen.bean.** {*;}  Keep the class names under this package and its sub packages , At the same time, keep the contents from being confused 
-keep class com.yuanxuzhen.YUAN{*;}  Maintain class name , At the same time, keep the contents from being confused 

原网站

版权声明
本文为[Original general breaking]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202280538436024.html