Proguard使用教程
1、下载Proguard源码
git clone https://github.com/Guardsquare/proguard.git
2、构建打包
使用支持gradle的开发工具
打开gradle.properties
在头部添加
buildscript {
//...
configurations.all {
resolutionStrategy {
dependencySubstitution {
substitute module('net.sf.proguard:proguard-gradle') with module('com.guardsquare:proguard-gradle:7.0.0')
}
}
}
}
执行构建生成
distTar
distTar {
compression = Compression.GZIP
archiveExtension.set('tar.gz')
}
完成后在项目目录生成压缩文件
build\distributions\proguard-7.0.0.tar.gz
然后解压,得到结构如下