I used to write some utils in the past in groovy a...
# android
g
I used to write some utils in the past in groovy and import them to build.gradle with
apply from
, eg.
Copy code
apply from: "$rootDir/gradle/getversion.gradle"
I still keep my app config in Groovy's build.gradle, but I would like to write my utils in kotlin. Can I import kts files from build.gradle?
In this case getversion.gradle contained code to read app version from json file. Such a function was then exposed to build.gradle so the version was not hardcoded in the build.gradle but in a json file. So the point here would be to write some kotlin utility functions and expose them to build.gradle file (not build.gradle.kts).