task makeJar(type: proguard.gradle.ProGuardTask,dependsOn:"build") { delete'build/outputs/jar/ca_request.jar'//删除之前编译混淆jar包 injars'build/intermediates/bundles/release/classes.jar'//项目编译但未混淆的jar outjars'build/outputs/jar/ca_request.jar'//混淆后的jar路径 configuration'proguard-rules.pro'// 混淆配置文件 }
写好混淆规则,然后运行这个task