Convert Android project to use Gradle Script Kotlin

I would like to convert build.gradle files to my Android projects from Groovy to Kotlin using Kotlin Gradle Script . It is advisable that they all be in Kotlin, but if there are any restrictions, then as much as possible.

Suppose I only have an empty project recently created from the New Application template for Android Studio ( minSdkVersion 15 , using AppCompat, if that matters). What steps should I take for such a project to convert it to Gradle Script Kotlin.

Hope this is a great starting point for me (and everyone else), and I can handle the conversion of any user logic that I have.

+6
source share
1 answer

There is already a hello-android example that describes how to do this.

Note: https://github.com/gradle/gradle-script-kotlin/tree/master/samples/hello-android

Note that:

It has been tested against Android Studio 2.2 Preview 6 with the latest Kotlin plugin from the EAP 1.1 channel.

Read also: https://github.com/gradle/gradle-script-kotlin/issues/2

Hope this helps

+2
source

All Articles