Slackbot
05/19/2022, 6:52 PMClayton Walker
05/19/2022, 6:53 PMplugins {
id("com.us.our-plugin") version "version"
}
Thomas Broyer
05/19/2022, 7:02 PMalias()
.
But you might be able to use the TOML from a buildSrc
(or included build) and then use the plugin without version:
plugins {
id("com.us.our-plugin")
}
Clayton Walker
05/19/2022, 7:29 PMClayton Walker
05/19/2022, 7:30 PM`java-gradle-plugin`
plugin, then register a new plugin.Clayton Walker
05/19/2022, 7:32 PMClayton Walker
05/19/2022, 7:52 PMVampire
05/19/2022, 9:11 PMbuildSrc
will also not work, it was long ago that buildSrc
was evalutated before settings script and could be used therein, nowadays settings script is evaluated first so buildSrc
things cannot be used.
Included build in pluginManagement
with an actual settings plugin (even if it does not do anything) in it that is applied should work, as you found out.
Or you can use a TOML parser to parse the TOML file "manually" and use the version of the plugin you want to apply.Clayton Walker
05/19/2022, 9:13 PMClayton Walker
05/19/2022, 9:14 PMClayton Walker
05/19/2022, 9:14 PMdependencies {
implementation(libs.our.settings.plugins)
}
gradlePlugin {
plugins {
register("settingsPluginHack") {
id = "our.settings-plugin"
implementationClass = "our.gradle.SettingsPlugin"
}
}
}
Clayton Walker
05/19/2022, 9:15 PMVampire
05/19/2022, 9:15 PMClayton Walker
05/19/2022, 9:16 PMdon't need something from the included build.How do you specify a need? Other than the gradlePlugin block
Clayton Walker
05/19/2022, 9:16 PMVampire
05/19/2022, 9:17 PMbuildscript { dependencies { ... } }
Clayton Walker
05/19/2022, 9:17 PMClayton Walker
05/19/2022, 9:18 PMVampire
05/19/2022, 9:18 PMVampire
05/19/2022, 9:18 PMVampire
05/19/2022, 9:18 PMVampire
05/19/2022, 9:19 PMClayton Walker
05/19/2022, 9:27 PMVampire
05/19/2022, 9:38 PM