This message was deleted.
# kotlin-dsl
s
This message was deleted.
e
If I try just convert gradle to kotlin. I get compilation
Unresolved reference android
c
if the file is applied (much like an include) it wonโ€™t benefit from all the Gradle instrumentation such as accessors. Gradle Kotlin DSL Primer talks to this; use
configure<ExtensionClass>
to configure the extension.
v
Basically what you do in Groovy DSL you can do in Kotlin DSL too. But it sounds like you use script plugins (those with
apply from
). Those are bad practice and highly discouraged in both DSLs anyway.
So better write proper convention plugins, for example as precompiled script plugins in
buildSrc
or an included build like
gradle/build-logic
. They look almost the same as normal build scripts and do not have many of the quirks and problems legacy script plugins have.
๐Ÿ‘† 3
e
That is the legacy project and this part is written long time ago
Let me try the included build
v
Sure, I have such projects too. ๐Ÿ˜„ Never too late to switch, when you touch the build anyway, especially as you "completely rewrite" it right now. ๐Ÿ™‚