Title
c

chanzmao

06/22/2017, 10:22 AM
apply plugin: ‘kotlin-android’ apply plugin: ‘kotlin-android-extensions’ apply plugin: ‘kotlin-kapt’
b

budioktaviyan

06/22/2017, 10:36 AM
chanzmao:
kotlin-android
are kotlin plugin for android, the below one is the KAE
kotlin-android-extensions
and… the last one is for
annotationProcessor
just like on Java you usually using the
apt
for generating the class
c

chanzmao

06/22/2017, 10:37 AM
ok
apply plugin: ‘kotlin-android-extensions’
only one line for that?
b

budioktaviyan

06/22/2017, 10:38 AM
yes, and line for
kotlin-android
is a must for kotlin itself
c

chanzmao

06/22/2017, 10:40 AM
but, how to get kae resources on Android Studio ? no need to download for that resources?
Ok. i see that.
b

budioktaviyan

06/22/2017, 10:42 AM
for example you have an
id
inside your layout. and in your kotlin class, just type that id and do whatever you want… let say you have id with the name like
btn_submit
and in your kotlin class just type the same thing to set the click listener
btn_submit.setOnClickListener { }
c

chanzmao

06/22/2017, 10:45 AM
apply plugin: ‘kotlin-android-extensions’ dependencies { classpath “org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version” classpath “org.jetbrains.kotlin:kotlin-android-extensions:$kotlin_version” }
this dependencies block does not need?
b

budioktaviyan

06/22/2017, 10:46 AM
no, not like that, on your root just put the classpath for
org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version
the
org.jetbrains.kotlin:kotlin-gradle-plugin
are just put on your root gradle file
c

chanzmao

06/22/2017, 10:49 AM
I see. that kotlin’s core main file.
b

budioktaviyan

06/22/2017, 10:49 AM
yes 🙂
c

chanzmao

06/22/2017, 10:49 AM
classpath ‘org.jetbrains.kotlin:kotlin-gradle-plugin:1.1.2-5’
b

budioktaviyan

06/22/2017, 10:51 AM
yeah, that’s the latest version of the plugin
c

chanzmao

06/22/2017, 10:51 AM
apply plugin: ‘kotlin-android’ apply plugin: ‘kotlin-android-extensions’
b

budioktaviyan

06/22/2017, 10:51 AM
yes, put that on your
app
gradle file
c

chanzmao

06/22/2017, 10:52 AM
Only three lines on two build,gradle for setting.
1: root
b

budioktaviyan

06/22/2017, 10:53 AM
yes, correct
c

chanzmao

06/22/2017, 10:53 AM
dependencies { classpath ‘com.android.tools.build:gradle:2.3.3’ classpath ‘org.jetbrains.kotlin:kotlin-gradle-plugin:1.1.2-5’ // <-- 1 }
2: app
apply plugin: ‘com.android.application’ apply plugin: ‘kotlin-android’ // <-- 2 apply plugin: ‘kotlin-android-extensions’ // <-- 3 apply plugin: ‘kotlin-kapt’
OK!
I will do that! Thanks!
You’re so generouns/
^w^
Are you using AS 3.0 Canary ?
b

budioktaviyan

06/22/2017, 10:58 AM
heheheh, nope 🙂
no, I’m just a user for Android Studio, dont want to take a risk further… so still using the stable version. currently 2.3.3
c

chanzmao

06/22/2017, 11:07 AM
I think so.
I am using 2.3.3, too.
I want to convert all code to Kotlin, but a little mysterious about some third party libraries.
Aren’t you using retrolambda or RxJava ?
b

budioktaviyan

06/22/2017, 11:49 AM
yes, on my previous project I’m using the RxJava. but you don’t need retrolambda in kotlin. because kotlin can do lambda function better than that 🙂
you don’t have to convert all of your code into kotlin, you can do it one by one bro
c

chanzmao

06/22/2017, 12:36 PM
yes, i will challenge it one by one.
Thanks, do you have facebook account?
b

budioktaviyan

06/22/2017, 12:38 PM
c

chanzmao

06/22/2017, 1:41 PM
Ok. I follow you.
Let’s talk some other time.
Now sent friend request.
If you see it, please allow me.
bye.