我们使用 ANT 作为我们的构建系统,我们使用 yGuard 作为我们的混淆工具,ANT 任务包含类似这样的内容以防止标签库中断
<adjust replacecontent="true">
<include name="META-INF/*.tld"/>
</adjust>
现在我们将构建系统升级到 Gradle,除此之外一切正常,我尝试了许多不起作用的东西,例如:
adjust(replaceContent: true) {
patternset {
include name: 'META-INF/*.tld'
}
}
谁能帮我解决这个问题?
顺便说一下,在我们的 ANT 任务中使用的是 yGuard 2.4,现在我们将其升级到 yGuard 3.0。
除此之外,我在 build.gradle 中声明了以下几行
configurations {
external.extendsFrom implementation
}
...
ant.yguard {
externalclasses {
pathelement(location: configurations.compileOnly.asPath)
pathelement(location: configurations.external.asPath)
}
}
external
并使用而不是添加了所有依赖项implementation
,但现在我在 yGuard 日志中收到很多警告,表明 yGuard 无法解析依赖项。