"proguardInJars"的语义是什么?在SBT Android-Plugin中? [英] What are the semantics of "proguardInJars" in SBT Android-Plugin?
问题描述
在SBT Android插件的proguardTask中,有一个值proguardInJars
.
在我的简单测试项目中,它包含C:\Users\Administrator\.sbt\boot\scala-2.9.1\lib\scala-library.jar
.
In SBT Android Plugin, in proguardTask, there is a value proguardInJars
.
In my simple test project it contains C:\Users\Administrator\.sbt\boot\scala-2.9.1\lib\scala-library.jar
.
然后将其与我自己的已编译类组合成另一个值inJars
.
It is then combined with my own compiled classes into another value inJars
.
但是,通过在其后面附加一些内容来进行组合.这是来自jberkel/android-plugin的代码,用于执行此操作:
However, it is combined by appending something to it. Here's the code from jberkel/android-plugin that does that:
val manifestr = List("!META-INF/MANIFEST.MF", "R.class", "R$*.class", "TR.class", "TR$.class", "library.properties")
val sep = JFile.pathSeparator
val inJars = ("\"" + classDirectory.absolutePath + "\"") +: proguardInJars.map("\"" + _ + "\""+manifestr.mkString("(", ",!**/", ")"))
我想知道是否有人知道所添加内容的语义.
另外,如果我要将inJars
分解为单独的值,我是否仍需要将该清单内容附加到proguardInJars
以便proguardTask
正常运行?
I am wondering is anyone knows the semantics of that added stuff.
Also, if I were to break inJars
into separate values, would I still need to append that manifest stuff to proguardInJars
in order for proguardTask
to run without problems?
推荐答案
此时android插件正在为ProGuard准备injars
命令行参数.
ProGuard使用通用的类路径来确定要考虑的jar文件中的哪些文件,而不考虑这些jar文件中文件匹配器的形式.
The android plugin is preparing the injars
command line argument for ProGuard at that point.
ProGuard uses generalized classpaths to figure out which files from a jar to consider, and which not to, a form of file matchers within the jars.
例如,.../scala-library.jar(!META-INF/MANIFEST.MF,!**/R.class,!**/R$*.class,!**/TR.class,!**/TR$.class,!**/library.properties)
表示不应将文件R/TR.class
或以R$
/TR$
开头的类文件(!
)作为输入考虑.
For example, .../scala-library.jar(!META-INF/MANIFEST.MF,!**/R.class,!**/R$*.class,!**/TR.class,!**/TR$.class,!**/library.properties)
means that files R/TR.class
or classfiles starting with R$
/TR$
should not (!
) be taken into consideration as an input.
在这里看到:
http://proguard.sourceforge.net/index.html#manual/usage.html
单击class_path
以显示有关ProGuard使用的通用类路径格式的更多详细信息.
Click on class_path
to show more details about the generalized classpath format that ProGuard uses.
这篇关于"proguardInJars"的语义是什么?在SBT Android-Plugin中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!