allowDependency(gav): add depencency provider overload
hfhbd opened this issue · 4 comments
Currently, you need to specify the gav twice, once in your dependencies and again in the allowDependency call:
// build.gradle.kts
dependencies {
api("com.ibm.db2:jcc:11.5.8.0")
}
licensee {
allowDependency("com.ibm.db2", "jcc", "11.5.8.0") {
because("License available")
}
}
While migrating to the libs version catalog, using this depency provider would be nice too:
// build.gradle.kts
dependencies {
api(libs.db2.driver)
}
licensee {
allowDependency(libs.db2.driver) {
because("License available")
}
}
I will create a PR today/tomorrow if you want this too.
Sounds good to me.
Let's make sure we test catalog entries which do and do not contain a version.
BTW I have successfully tested the latest version internally. I was going to release today, but I'll wait for this to land and then release immediately after.
Let's make sure we test catalog entries which do and do not contain a version.
What do you expect if the entry does not contain a version? I would expect an error.
Yep, same. Just want to make sure we cover it as I suspect calling getVersion()
(or whatever) will return an empty string.