When we want to use Kotlin in Android Studio, it's pretty simple. Add the kotlin dependent library, and also add the Kotlin-Android plugin below:
apply plugin: 'com.android.library'
apply plugin: 'kotlin-android'
However, if I have a regular library (used for Java) and you want to write in Kotlin, should I add some kind of plugin? The below is definitely not working.
apply plugin: 'java-library'
apply plugin: 'kotlin-android'
There is no kotlin-library that I find to add. What should I add to my gradle module so that it can compile Kotlin?
source
share