赞
踩
ProGuard can be run as a task in the Java-based build tool Gradle (version 2.1 or higher).
ProGuard可以作为一个任务运行在基于java的构建工具Gradle(版本2.1或更高版本)。
Before you can use the proguard task, you have to make sure Gradle can find it in its class path at build time. One way is to add the following line to your build.gradle file:
您可以使用ProGuard 之前,您必须确保它可以找到它在构建时的类路径。一种方法是添加 build.gradle 文件
buildscript {
repositories {
flatDir dirs: '/usr/local/java/proguard/lib'
}
dependencies {
classpath ':proguard:'
}
}
Please make sure the class path is set correctly for your system.
请确保您的系统类路径设置正确。
You can then define a task:
你可以定义一个task
task myProguardTask(type: proguard.gradle.ProGuardTask) {
.....
}
The embedded configuration is much like a standard ProGuard configuration. Notable similarities and differences:
嵌入的配置是更像一个标准ProGuard 配置。明显的异同
Some settings are specified as named arguments.
You can find some sample build files in the examples/gradle directory of the ProGuard distribution.
你可以在examples/ gradle 目录下找到一些ProGuard 描述的示例构建文件
The ProGuard task supports the following settings in its closure:
ProGuard 任务支持以下设置
从给定的ProGuard-style阅读和合并选项配置文件。文件在执行阶段解析
未完待续
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。