Sebastian Schuberth
11/18/2025, 10:37 AMsettings.gradle.kts file like
dependencyResolutionManagement {
versionCatalogs {
create("ortLibs") {
from("org.ossreviewtoolkit:version-catalog:71.4.0")
}
}
}
then what's the correct syntax to depend on an artifacts form that catalog in my project's convention plugins hosted in buildSrc?Sebastian Schuberth
11/18/2025, 10:49 AMNiels Doucet
11/18/2025, 11:18 AMimport org.gradle.accessors.dm.LibrariesForOrtLibs
val ortLibs = the<LibrariesForOrtLibs>()
Alternatively, you can look into this plugin, so you can simply use the regular typesafe accessors: https://plugins.gradle.org/plugin/dev.panuszewski.typesafe-conventionsSebastian Schuberth
11/18/2025, 11:28 AMLibrariesForOrtLibs does not resolve. I'll have a look at that plugin, thanks.Niels Doucet
11/18/2025, 11:42 AMdependencies {
implementation(files(ortLibs.javaClass.superclass.protectionDomain.codeSource.location))
}
That seems to work for me in order to make the snippet above function in a convention plugin.
I personally prefer the plugin though.Sebastian Schuberth
11/18/2025, 11:44 AMVampire
11/18/2025, 12:26 PMversionCatalogs.named("ortLibs").findLibrary("foo")...Vampire
11/18/2025, 12:28 PMSebastian Schuberth
11/18/2025, 12:33 PMVampire
11/18/2025, 12:37 PMpluginManagement { ... } it does not work iirc.Niels Doucet
11/18/2025, 12:40 PMVampire
11/18/2025, 12:42 PMSebastian Schuberth
11/18/2025, 12:42 PMif your conventions plugin build is an included buildNo, I'm using
buildSrc for my convention plugins.Vampire
11/18/2025, 12:44 PM