question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add Kotlin Android support

See original GitHub issue

Vanilla 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 a BaseCompileToJarStepFactory (it currently defaults to javac)
  • Copy AndroidLibraryDescription into a AndroidKotlinLibraryDescription. Basically doing the same thing except passing in KotlincToJarStepFactory to the AndroidLibrary
  • 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:closed
  • Created 7 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
bolinfestcommented, Aug 23, 2016

@bkase Want to sign up for this one?

0reactions
dsyangcommented, Oct 17, 2016

#937 enables this. @kageiit I don’t think so, but I think it’d be best to open up a new issue for that

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found