I’d like to move a lot of this to separate files t...
# gradle
b
I’d like to move a lot of this to separate files things. Like a
publishing.gradle.kts
, and
signing.gradle.kts
and
native.gradle.kts
- but i’m having trouble because I can’t find the equivelant of
apply from
for the kotlin style syntax: https://github.com/briandilley/ffmpeg4kj/blob/main/kotlin/build.gradle.kts
t
apply(from = "publishing.gradle.kts")
? or at least, works on my machine 🙂
v
That is correct, but I would advice you to write convention plugins instead. Those are pre-compiled script plugins in a separate build you include as composite build, for example in
gradle/build-src
or in the special
buildSrc
build. This has various advantages, especially when issuing the Kotlin DSL, as you for example get type-safe accessors generated for plugins you apply via
plugins
block and thus can write on them almost the same as in the
build.gradle.kts
. For normal script plugins (the ones you apply with
from
) this is not the case and you have to use the verbose generic APIs.
b
cool, thanks