https://kotlinlang.org logo
Title
c

ConorG

11/25/2020, 7:43 AM
Hi, is it possible to have both Groovy and Kotlin kts build scripts in same project? I want to adapt and slightly modify this Android App Bundle sample snippet for creating tasks but our project still uses groovy. I do however have my
buildSrc
folder set up, with some kotlin Tasks. But is it possible to put this into a script like
bundle.gradle.kts
and use it alongside my Groovy scripts with
apply from: file(…)
?
:yes: 3
e

eskatos

11/25/2020, 7:58 AM
Yes it is possible See https://docs.gradle.org/nightly/userguide/migrating_from_groovy_to_kotlin_dsl.html#before_you_start_migrating
You don’t have to migrate all at once! Both Groovy and Kotlin-based build scripts can apply other scripts of either language.