【发布时间】:2022-01-05 13:42:42
【问题描述】:
我想从 shadow gradle 插件中移除 log4j 传递依赖。
plugins {
id 'com.github.johnrengelman.shadow' version '7.1.2'
}
我正在寻找解决方案,但没有得到任何解决方案。我知道我可以使用以下代码删除它 -
buildscript {
repositories {
gradlePluginPortal()
}
dependencies {
classpath 'gradle.plugin.com.github.jengelman.gradle.plugins:shadow:7.1.2', {
exclude module: 'log4j'
}
}
}
但是有没有办法通过插件块来做到这一点?
【问题讨论】:
标签: gradle build build.gradle gradle-plugin