Björn Mayer (aqab0N)
05/29/2024, 12:15 PMsettings.gradle.kts
and applied it in the plugins
block. I could see it only being configured once. That was great.
Unfortunately, this led to issues with my Jib setup thanks to guava version chaos.
I then moved the application to buildSrc/settings.gradle.kts
by using the "legacy" way.
This made it work flawlessly for all cases.
My question: Is this the "desired" way of doing it? I am asking, as gradle plugin portal calls this the "legacy" wayVampire
05/29/2024, 12:38 PMbuildSrc/settings.gradle.kts
by using the "legacy" way."?
If you apply it in that file, it should only have an effect on the buildSrc
build, but not on your main build where you would need the credentials set.Björn Mayer (aqab0N)
05/29/2024, 12:39 PMbuildscript {
repositories {
maven {
url = uri("<https://plugins.gradle.org/m2/>")
}
}
dependencies {
classpath("io.github.bjoernmayer:artifactregistry-gradle-plugin:0.2.2")
}
}
apply(plugin = "io.github.bjoernmayer.artifactregistryGradlePlugin")
Vampire
05/29/2024, 12:40 PMplugins { ... }
block except for very rare cases. If you write some plugin that applies another plugin, using the "legacy" way is fine as the legacy does not apply to that context.Vampire
05/29/2024, 12:41 PMLike this:But why do you use the legacy way and not the
plugins { ... }
block there?
Besides, as I said, I don't think this will have the desired effect anywayBjörn Mayer (aqab0N)
05/29/2024, 12:58 PMsettings.gradle.kts
has this line:
apply(from = "buildSrc/settings.gradle.kts")
(Don't worry, I am working on cleaning this up)Vampire
05/29/2024, 1:00 PMVampire
05/29/2024, 1:01 PMplugins { ... }
block is not supported.Vampire
05/29/2024, 1:02 PMBjörn Mayer (aqab0N)
05/29/2024, 1:04 PMVampire
05/29/2024, 1:10 PMBjörn Mayer (aqab0N)
05/29/2024, 2:23 PMapply(from
I moved the plugin application to the plugins block in root settings.gradle.kts
I set a newer version of guava:
buildscript {
dependencies {
classpath("com.google.guava:guava:33.2.0-jre")
}
}
And... et voila
It just works 🙂
Beautiful