I have a libs.version.toml
that include versions of the libraries my project uses:
[versions]
slf4j = "1.7.30"
grpc = "1.42.1"
protoc = "3.17.2"
...
But then, I cannot use such versions outside the dependencies plugin:
dependencies {
api libs.slf4j
api libs.bundles.grpc
}
protobuf {
protoc {
artifact = "com.google.protobuf:protoc:${protocVersion}"
}
plugins {
grpc {
artifact = "io.grpc:protoc-gen-grpc-java:${grpcVersion}"
}
}
generateProtoTasks {
all()*.plugins {
grpc {}
}
}
}
So here, I have to maintain some additional properties protocVersion
and grpcVersion
in my gradle.properties
: is there a way to reference the version from libs.version.toml
outside of the dependencies block ?