Hi, I am a new kotlin developer For some reasons, ...
# android
l
Hi, I am a new kotlin developer For some reasons, I need to pay attention to the association between Android Kotlin and official Kotlin. Is the official Kotlin compiler used for Android project compilation?
z
Yes
g
need to pay attention to the association between Android Kotlin and official Kotlin
What do you mean?
Is the official Kotlin compiler used for Android project compilation
Yes, there is only one Kotlin compiler for JVM (which also used for Android, where Kotlin sources compiled to JVM bytecode and bytecode to Dex files, it’s the same as for Java sources) Though, there are Kotlin Android Gradle plugin and separate Kotlin (aka Kotlin JVM) Gradle plugins, but both of them use the same compiler, but provide integration with different types of project
l
Got it! Thank you @gildor
f
Dont wanna expand the scope of the question much but this brings another question. So is there any specific difference between kotlin and kotlin-android plugins in terms of compiler usage such as parameters, sourcesets etc. ? Or is it just for kotlin-android extensions and android build tools dependency?
g
Source sets are different for jvm and Android projects, not sure about any differences in other params