hfhbd
09/27/2022, 12:14 PMPluginIdExtension
anymore. With buildSrc, I could write this: plugins { latex }
, now I have to use plugins { id("latex") }
. Is this expected?
gradlePlugin {
plugins {
create("latex") {
id = "latex"
implementationClass = "latex.LatexPlugin"
}
create("plantuml") {
id = "plantuml"
implementationClass = "plantuml.PlantumlPlugin"
}
}
}
Vampire
09/27/2022, 12:36 PMbuildSrc
.
Also see https://github.com/gradle/gradle/issues/16929 for an issue to thumbs-up and follow.hfhbd
09/27/2022, 2:06 PMeddie
09/27/2022, 6:15 PMplugins
block in your settings.gradle.kts
.hfhbd
09/27/2022, 6:40 PMVampire
09/27/2022, 7:40 PMjulioromano
09/29/2022, 7:28 AMxxx.gradle.kts
file?
To which settings file should it be applied? The main project settings file? Or the included builds settings file?Vampire
09/29/2022, 7:29 AMxxx.settings.gradle.kts
and main buildjulioromano
09/29/2022, 7:41 AMjulioromano
09/29/2022, 7:43 AMVampire
09/29/2022, 7:45 AMruntimeOnly
Vampire
09/29/2022, 7:46 AMhfhbd
09/29/2022, 7:54 AMjulioromano
09/29/2022, 8:01 AMjulioromano
09/29/2022, 8:02 AM-
then the static accessor wonāt be generated correctly, is this a known issue?julioromano
09/29/2022, 8:03 AMsome.build.plugin.gradle.kts
--> Works
some.build-plugin.gradle.kts
--> Doesnāt workhfhbd
09/29/2022, 8:03 AMhfhbd
09/29/2022, 8:04 AMjulioromano
09/29/2022, 8:04 AMjulioromano
09/29/2022, 8:32 AMsome.build.plugin.blah.blah.gradle.kts
julioromano
09/29/2022, 8:33 AMhfhbd
09/29/2022, 8:49 AMhfhbd
09/29/2022, 8:52 AMjulioromano
09/29/2022, 8:58 AMhfhbd
09/29/2022, 8:59 AMVampire
09/29/2022, 9:10 AMjulioromano
09/29/2022, 9:30 AMjulioromano
09/29/2022, 9:30 AMVampire
09/29/2022, 9:31 AMYeah, I like classes and tests more than scripting (and user experience is harder)
You can test precompiled script plugins the same as usual plugins. Precompiled script plugins are mainly just syntactic sugar. And user experience should also be identical.
Vampire
09/29/2022, 9:32 AMooohhhh then itās me that donāt know how to apply the backticks correctly š
Kotlin does not like hyphens in identifiers, but using the backticks you can "quote" it and use it anyway, for example for generated things. But I'd usually try to avoid them as it degrades readability.
julioromano
09/29/2022, 9:36 AMPluginAccessors.kt
contains references to old plugin names (before I renamed them) so I suspect there might be some caching issue hereVampire
09/29/2022, 9:40 AMjulioromano
09/30/2022, 6:44 AMExecution failed for task ':demo:hiltAggregateDepsDebug'.
> A failure occurred while executing dagger.hilt.android.plugin.task.AggregateDepsTask$WorkerAction
> 'java.lang.String com.squareup.javapoet.ClassName.canonicalName()'
Which makes little sense to me, given Iāve only renamed a Gradle convention plugin to trigger this.
Iāve given this a chance, but Iāll rather keep the id("...")
syntax and live with it. Thank you all for chiming in!