Slackbot
03/21/2022, 2:38 PMephemient
03/21/2022, 2:45 PM// gradle/libs.versions.toml
[libraries]
group-name = "group:name:version"
// build.gradle
dependencies {
configurationName(libs.group.name) {
artifact {
type = "extension"
}
}
}
I believe you mean "extension" rather than "classifier", because that's what "@" doesjoschi
03/21/2022, 2:54 PMtestImplementation("org.apache.kafka:kafka-clients:3.0.0:test")joschi
03/21/2022, 3:00 PM[versions]
kafka = "2.8.1"
[libraries]
kafka-clients = { module = "org.apache.kafka:kafka-clients", version.ref = "kafka" }
build.gradle
api(libs.kafka.clients) {
artifact {
classifier = "test"
}
}
Error message with Gradle 7.4.1:
* What went wrong:
A problem occurred evaluating project ':my-project'.
> Could not resolve all dependencies for configuration ':my-project:runtimeClasspath'.
> Could not find method artifact() for arguments [build_3bwyqt3y3wr3wnc2ldw9wgwci$_run_closure2$_closure3$_closure6$_closure7@675386e7] on constraint org.apache.kafka:kafka-clients:2.8.1, attributes=null of type org.gradle.api.internal.artifacts.dependencies.DefaultDependencyConstraint.joschi
03/21/2022, 3:04 PMThomas Broyer
03/21/2022, 3:29 PM