标题翻译
How to configure gradle that nested jar files must be stored without compression?
问题
在我的 gradle
配置中,我想要强制要求嵌套的 jar 文件必须以无压缩方式存储。在 Maven
中,我们可以像下面这样定义配置:
build {
pluginManagement {
plugins {
plugin {
configuration {
archive {
compress = false
}
}
}
}
}
}
英文翻译
In my gradle
configuration, I wanted to enforce that nested jar files must be stored without compression. In Maven
, we can define the configuration like this below:
<build>
<pluginManagement>
<plugins>
<plugin>
<configuration>
<archive>
<compress>false</compress>
</archive>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
My question, how to configure such configuration with gradle?
答案1
得分: 1
有一个entryCompression
属性适用于jar、zip、ear和tar插件(至少从gradle 5开始)。
实际的传播/配置取决于您的build.gradle
文件。
英文翻译
There is a entryCompression
attribute for the jar, zip, ear and tar plugins (since at least gradle 5).
The actual propagation/configuration is specific to your build.gradle
.
专注分享java语言的经验与见解,让所有开发者获益!
评论