This message was deleted.
# community-support
s
This message was deleted.
v
Yep, one of the drawback of script plugins, opposed to precompiled script plugins. You do not get type-safe accessors when using the Kotlin DSL. But there are more significant problems, so better do not use script plugins, no matter which DSL and instead use precompiled script plugins.
l
But I am using precompiled plugins, which is
com.gradle.plugin-publish
. But I would like to keep the configuration in another file, so my
build.gradle.kts
gets simpler. But yeah, if I don’t get type-safe, there’s kinda not point in extracting it
Thanks Vampire! I’ll keep it in the
build.gradle.kts
then
v
./scripts/publish.gradle.kts
is a script plugin. One that you apply with
apply from
. => This is bad
Make it a precompiled script plugin and you are good
One that is either in
buildSrc/src/main/kotlin
or in
src/main/kotlin
of any included build, that you apply just like normal plugins using their ID
l
[reading]
Thanks for this documentation! That really looks better. Jsut one thing, is it possible to use a plugin inside pre compiled plugin? When I do this:
Copy code
plugins {
    `java-library`
    checkstyle
 ->   id("com.gradle.plugin-publish")
}
Inside the sample pre compiled plugin (the one in the documentation), it breaks everything o.O
Nevermind. Seams to work
No… actually, it doesn’t find the plugin =|
v
Yes, it works. If you added an implementation dependency on that plugin in the build script for that precompiled script plugin.
l
Ok. Thanks Vampire!
👌 1