Matthew Moore
10/22/2024, 4:10 PMephemient
10/22/2024, 4:26 PMVampire
10/22/2024, 4:39 PMcompileOnly. If you apply the actual plugins, then it is usually more idiomatically to use implementation.
I did not fully get what you meant with Gradle 9 compatibility and using plugin management to specify plugin version.
If you meant that you tried to specify a different plugin version in pluginManagement { plugins { ... } }, then yes, it is expected that this is ignored, because things in there just define default versions that are used if you apply the plugin without specifying a version later on which is not your case.Vampire
10/22/2024, 4:41 PMplugins block in the settings script, or a version constraint in buildscript { dependencies { ... } }, you can influence / control the 3rd party plugin version. Same if your plugin is a project plugin and you do it there. You just have to make sure that your version controlling happens in the same classpath / configuration, so that version resolution works like expected.Matthew Moore
10/22/2024, 4:51 PMcompileOnly. The Gradle 9 compatibility errors I encountered were warnings about manipulating the buildscript classpath "late" in the lifecycle. I'm going to try working with buildscript { dependencies in my settings plugin. Going to try some things and update the thread.Vampire
10/22/2024, 4:52 PMVampire
10/22/2024, 4:52 PMMatthew Moore
10/22/2024, 4:54 PMephemient
10/22/2024, 4:57 PMephemient
10/22/2024, 4:59 PMMatthew Moore
10/22/2024, 4:59 PMsettings.gradle.kts and add their own buildscript block to do that. Correct? That's an acceptable outcome, I think.ephemient
10/22/2024, 5:01 PMVampire
10/22/2024, 5:01 PMbuildscript classpath from a settings plugin though.
But you really shouldn'tephemient
10/22/2024, 5:02 PMephemient
10/22/2024, 5:02 PMVampire
10/22/2024, 5:03 PMbuildscript classpath from your settings plugin and for what reason?Matthew Moore
10/22/2024, 5:05 PMMatthew Moore
10/22/2024, 5:06 PMVampire
10/22/2024, 5:10 PMMatthew Moore
10/22/2024, 5:14 PMproject.extensions.configure(IdeaModel::class.java) {
it.project {
it.vcs = "Git"
}
it.module {
it.isDownloadJavadoc = true
it.isDownloadSources = true
}
}
This will work at runtime even with newer versions of the idea plugin than this code compiles against. (Unless one of those fields is removed from IdeaModel of course.) I'd like a user to be able to use IDEA plugin x+1 even though this code may have been built against IDEA plugin x.Matthew Moore
10/22/2024, 5:15 PMVampire
10/22/2024, 5:16 PMVampire
10/22/2024, 5:16 PMVampire
10/22/2024, 5:16 PMephemient
10/22/2024, 5:16 PMplugins {
id("local.convention.plugin") version "x" // usually uses idea x
id("idea") version "y"Matthew Moore
10/22/2024, 5:16 PMephemient
10/22/2024, 5:17 PMMatthew Moore
10/22/2024, 5:17 PMVampire
10/22/2024, 5:18 PMephemient
10/22/2024, 5:19 PMephemient
10/22/2024, 5:19 PMMatthew Moore
10/22/2024, 5:20 PMMatthew Moore
10/22/2024, 5:20 PM