Ama*_*nha 5 gradle build.gradle
我需要从 io.confluence:kafka-schema-registry:5.3.0 中排除 slf4j 依赖项。我尝试过使用
implementation ('io.confluent:kafka-schema-registry:5.3.0') {
exclude(group='org.slf4j',module='slf4j-loh4j12')
}
Run Code Online (Sandbox Code Playgroud)
但我不断收到错误
Cannot set the value of read-only property 'group' for DefaultExternalModuleDependency{group='io.confluent', name='kafka-schema-registry', version='5.3.0', configuration='default'} of type org.gradle.api.internal.artifacts.dependencies.DefaultExternalModuleDependency.
Run Code Online (Sandbox Code Playgroud)
谁能告诉我如何实现这一目标。我尝试了多种方法但无法做到
的语法exclude()
不正确。您必须使用:
而不是=
. exclude()
采用 aMap
作为输入,因此,在 Groovy DSL 中,它必须写为:
implementation ('io.confluent:kafka-schema-registry:5.3.0') {
exclude(group: 'org.slf4j', module: 'slf4j-log4j12')
}
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
915 次 |
最近记录: |