John
07/03/2024, 7:34 PMapplication java and kotlin-dsl etc for applying my custom plugin? i tried adding it in my plugin code, and my buildscripts were able to compile using it, but at runtime I got a classnotfound exception. i am guessing the extension property/function needs to be on the buildscript classpath. would adding it to a settings plugin, or custom wrapper work?Eric Haag
07/03/2024, 7:49 PMVampire
07/03/2024, 9:49 PMbuildSrc dependencies, or to the settings script classpath, then it is in a parent classloader and that's already available. In this case the plugin ID automatically gets a type-safe accessors generated that you can use in the plugins block. Without this, you have the chicken and egg problem Eric mentioned.John
07/04/2024, 2:00 AMJohn
07/04/2024, 2:02 AMVampire
07/04/2024, 8:47 AMplugins {
id("my.cool.plugin")
}
you can automatically write
plugins {
my.cool.plugin
}
just make sure you do not have chars in the plugin id that are illegal in an identifier like -.
I think in that case no accessor is generated.
For that use-case, it imho is better to use camelCase than kebab-case.Vampire
07/04/2024, 8:48 AMVampire
07/04/2024, 8:48 AMEric Haag
07/05/2024, 2:28 PMVampire
07/05/2024, 2:35 PMVampire
07/05/2024, 2:36 PMEric Haag
07/05/2024, 2:37 PMVampire
07/05/2024, 2:39 PMVampire
07/05/2024, 2:40 PMVampire
07/05/2024, 2:40 PMEric Haag
07/05/2024, 2:40 PMVampire
07/05/2024, 2:41 PMJohn
07/05/2024, 3:00 PMJohn
07/05/2024, 3:04 PMVampire
07/05/2024, 3:32 PM