https://kotlinlang.org logo
#kontributors
Title
# kontributors
s

Smallville7123

04/04/2019, 9:19 AM
How do I extend the kotlin language in Android Studio
r

Rohan Maity

04/14/2019, 12:54 AM
What do you mean by extending Kotlin that too in AS?
s

Smallville7123

04/14/2019, 4:54 AM
like add new keywords to kotlin
g

gildor

04/15/2019, 8:20 AM
I believe that only way to do that is hack Kotlin Plugin, I didn’t check, but I think there is no public API for that
r

Rohan Maity

04/18/2019, 3:19 AM
Kotlin is open-source . Jetbrains also added new keywords while development . So I believe there should be way . Why Hack Kotlin plugin then ?
g

gildor

04/18/2019, 3:29 AM
“hack” I mean that to add something you should fork Kotlin Plugin and change it and build own version, so it will not be pluggable change, it will be own fork incompatible with upstream that cannot be used together with it
And of course it’s just impossible to add new keyword just for your own use case, it is very big change in the langugage that should pass KEEP stage, prototype, approve of language committee etc. So most probably this change will never be merged to upstream
So this is not “extend the kotlin language in Android Studio” anymore what Smallville wants, it’s actually fork language and tooling for the language
But there are plans about compiler plugins that will also work for tooling
r

Rohan Maity

04/18/2019, 3:47 AM
Oh , thanks for clarifying. That I understand it's extend language in AS
4 Views