Slackbot
10/20/2022, 11:58 PMChris Lee
10/21/2022, 12:07 AMEric Kolotyluk
10/21/2022, 12:23 AMChris Lee
10/21/2022, 12:24 AMEric Kolotyluk
10/21/2022, 12:52 AMChris Lee
10/21/2022, 12:54 AMVampire
10/21/2022, 6:41 AMpluginManagement { plugins { ... } } are not applied anywhere or added to any classpath. Those just define the default version for the plugin centrally and in the build scripts you can then apply the plugins without version and get the centrally declared one.Vampire
10/21/2022, 6:42 AMEric Kolotyluk
10/21/2022, 2:28 PMpluginManagement in the setting.gradle file?Eric Kolotyluk
10/21/2022, 2:39 PMChris Lee
10/21/2022, 2:39 PMVampire
10/21/2022, 2:54 PMSo, it's safe to useyes, nowadays I prefer to use a version catalog, but before I always defined the default plugin versions in the settings script and then used them without version in the build scriptin the setting.gradle file?pluginManagement
Eric Kolotyluk
10/21/2022, 3:21 PMEric Kolotyluk
10/21/2022, 3:23 PMpluginManagement {
repositories {
maven { url "<https://plugins.gradle.org/m2/>" }
gradlePluginPortal()
}
plugins {
id 'groovy'
id 'java'
id 'application'
id "org.kordamp.gradle.jandex" version "1.0.0"
id "com.github.johnrengelman.shadow" version "6.1.0"
}
}
with
plugins {
id "groovy"
id "java"
id "org.kordamp.gradle.jandex"
id "com.github.johnrengelman.shadow"
}
which implies I am dealing with some other problem which I will describe in a new post...Vampire
10/21/2022, 3:28 PMEric Kolotyluk
10/21/2022, 3:30 PMplugins from my build.gradle file, Gradle could no longer find jandex
Clearly, I have no idea how plugins work in Gradle...Vampire
10/21/2022, 3:31 PMVampire
10/21/2022, 3:32 PMpluginManagement { plugins { ... } } block does only define default version for plugins if they are applied in a build script without version, so that you can centrally declare the plugin versions and then apply them without version in the build scripts.Eric Kolotyluk
10/21/2022, 3:32 PMVampire
10/21/2022, 3:32 PMVampire
10/21/2022, 3:33 PMthat is simply how I feel bashing my head against the Gradle wall...Well, what do you expect? If you don't apply the plugin, it is not applied. Seems quite obvious to me. ๐
Vampire
10/21/2022, 3:34 PMplugins from my build.gradle file" ๐Eric Kolotyluk
10/21/2022, 3:34 PMChris Lee
10/21/2022, 3:35 PMpluginManagement {
plugins {
id "org.kordamp.gradle.jandex" version "1.0.0"
id "com.github.johnrengelman.shadow" version "6.1.0"
}
}
plugins {
id "groovy"
id "java"
id "org.kordamp.gradle.jandex"
id "com.github.johnrengelman.shadow"
}Eric Kolotyluk
10/21/2022, 3:36 PMChris Lee
10/21/2022, 3:36 PMEric Kolotyluk
10/21/2022, 3:37 PMVampire
10/21/2022, 3:37 PMEric Kolotyluk
10/21/2022, 3:38 PMplugins {
id "groovy"
id "scala"
id "java"
id "application"
id "org.kordamp.gradle.jandex" version "1.0.0"
id "com.google.cloud.tools.jib"
id "com.github.johnrengelman.shadow"
}
apply plugin: 'maven-publish'
why did someone use apply plugin instead of adding it to plugins ?Vampire
10/21/2022, 3:39 PMEric Kolotyluk
10/21/2022, 3:39 PMChris Lee
10/21/2022, 3:40 PMapply plugin and plugins effect the same result - applying the plugin. As noted, the former is outdated. As to why someone would be inconsistent there, wellโฆEric Kolotyluk
10/21/2022, 3:42 PMVampire
10/21/2022, 3:43 PMVampire
10/21/2022, 3:43 PM