admin管理员组文章数量:1122846
i have a yGuard config in gradle.kotlin.dsl, which is working only in parts and i can't figure out why. Building a library with thirdparty dependencies i want to obfuscate my private code only and keep all the rest.
This is the config:
"yguard" {
"inoutpair"("in" to unobfJar, "out" to archivePath)
// Prevent yGuard from removing "Deprecated" attributes from .class files.
"attribute"("name" to "Deprecated")
"externalclasses" {
"pathelement"("path" to sourceSets["main"]pileClasspath.asPath)
}
"rename"("logfile" to "${projectDir}/build/${rootProject.name}_renamelog.xml") {
"keep" {
"class"(
"name" to "my.pack.MyClass",
"methods" to "public",
)
"class" {
"classes" to "private"
"methods" to "private"
"fields" to "private"
"patternset" {
"include"("name" to "kotlin.*")
"include"("name" to "kotlin.**")
"include"("name" to "kotlin.**$*")
"include"("name" to "kotlin.**$*$*")
"include"("name" to "kotlin.**.*")
// here are more includes for classes in
// "com.fasterxml.*" and more
}
}
}
}
}
Expecting that everything is kept but my class. Instead there are still class obfuscated, which should by kept by the config in patternset.
</expose>
<map>
<method class="kotlin.random.jdk8.PlatformThreadLocalRandom" name="double nextDouble(double)" map="A"/>
...
<field class="kotlin.enums.EnumEntriesList" name="entries" map="d"/>
...and more other classes in different packages
I do not understand, why yGuard is missing the classes.
Anybody else did this with gradle and kotlin?
Or just knows why yGuard is behaving this way?
(On a sidenote... i also do not understand the "externalclasses" attribute. Tried to use it like in the example with no success)
Thanks in advance.
本文标签: yGuard configuration in gradlekotlindsl does miss elementsStack Overflow
版权声明:本文标题:yGuard configuration in gradle.kotlin.dsl does miss elements - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736281908a1926472.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论