Add Kotlin Android support
See original GitHub issueVanilla kotlin library support was added in https://github.com/facebook/buck/pull/810. the next big step would be to add android support.
From @bkase’s comment on https://github.com/facebook/buck/pull/810#issuecomment-238069818 it looks like the problem is we need the equivalent of android_library()
for kotlin. I think that could be pretty straight-forward.
We would need create a new AndroidKotlinLibraryDescription
that behaves almost exactly like AndroidLibraryDescription
excepts it compiles with kotlinc instead of javac.
A quick look through the source code suggests we’d need to do the following:
- Refactor
AndroidLibrary
to take in aBaseCompileToJarStepFactory
(it currently defaults to javac) - Copy
AndroidLibraryDescription
into aAndroidKotlinLibraryDescription
. Basically doing the same thing except passing inKotlincToJarStepFactory
to theAndroidLibrary
- Refactor the common stuff out of the two android library descriptions.
I’m not sure when I’ll have time to tackle this yet. If someone else wants to take a shot go for it!
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
Setup Kotlin for Android Studio - Medium
Step 1: Setup the Kotlin Plugin in Android Studio · Step 2: Add Kotlin classpath to project Build.Gradle · Step 3: Add Kotlin...
Read more >How to add Kotlin to an existing Java Android project
Adding Kotlin to an existing Java Android project is easy. Just include a few Gradle dependencies, apply a plugin, and you can start...
Read more >How to Use Kotlin in an Existing Android App? - Stack Overflow
Go to Tools -> Kotlin -> Configure Kotlin in Project · Choose Single Module and select the spefiic module or All modules if...
Read more >Adding Android dependencies | Kotlin
The workflow for adding Android-specific dependencies to a Kotlin Multiplatform module is the same as it is for pure Android projects: ...
Read more >Install the EAP Plugin for IntelliJ IDEA or Android Studio - Kotlin
Select Tools | Kotlin | Configure Kotlin Plugin Updates. Select Kotlin Plugin Updates · In the Update channel list, select the Early Access...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@bkase Want to sign up for this one?
#937 enables this. @kageiit I don’t think so, but I think it’d be best to open up a new issue for that