Tim Oltjenbruns
05/10/2022, 2:06 PMversions.properties
in resources anymore, and I’m struggling to figure out why. Any ideas that could get me unstuck?Chris Lee
05/10/2022, 2:10 PMTim Oltjenbruns
05/10/2022, 2:12 PMid("io.github.detekt.gradle.compiler-plugin")
id("io.gitlab.arturbosch.detekt")
Tim Oltjenbruns
05/10/2022, 2:12 PMversions.properties
, it would break in a similar way?Chris Lee
05/10/2022, 2:19 PMversions.properties
is loaded. There are options to find all occurrences, though most of the common ways load just the first instance.Tim Oltjenbruns
05/10/2022, 2:21 PMio.gitlab.arturbosch.detekt
internal fun loadDetektVersion(classLoader: ClassLoader): String = Properties().run {
load(classLoader.getResource("versions.properties")!!.openSafeStream())
getProperty("detektVersion")
}
could use getResources
instead? So instead of finding the first versions.properties
it uses the first one that has detektVersion
?Chris Lee
05/10/2022, 2:23 PMTim Oltjenbruns
05/10/2022, 2:23 PMversions.properties
and it worked. But I could probably put up a PR to io.gitlab.arturbosch.detekt
. It should probably handle this, in case another random plugin has this resource too.