Skip to content
This repository has been archived by the owner on Nov 10, 2023. It is now read-only.

Add Kotlin Android support #857

Closed
3 tasks
dsyang opened this issue Aug 23, 2016 · 5 comments
Closed
3 tasks

Add Kotlin Android support #857

dsyang opened this issue Aug 23, 2016 · 5 comments

Comments

@dsyang
Copy link
Contributor

dsyang commented Aug 23, 2016

Vanilla kotlin library support was added in #810. the next big step would be to add android support.

From @bkase's comment on #810 (comment) 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!

@bolinfest
Copy link
Contributor

@bkase Want to sign up for this one?

@bkase
Copy link

bkase commented Sep 8, 2016

Very busy through September, but afterwards I may have some spare cycles

@kageiit
Copy link
Contributor

kageiit commented Sep 20, 2016

Does this account for kapt support as well?

@zbsz
Copy link
Contributor

zbsz commented Oct 2, 2016

Got something similar in #913, but instead of creating specific Android{LANG}LibraryDescription I opted to use language config parameter. So far have it implemented for Scala, adding Kotlin and other jvm languages should be quite straightforward then, just wanted to get it accepted for Scala first.

facebook-github-bot pushed a commit that referenced this issue Oct 14, 2016
Summary:
As titled. This completes #857 and enables kotlin for android!

Closes #937

Reviewed By: yiding, dsyang

fbshipit-source-id: c6be9c4
@dsyang
Copy link
Contributor Author

dsyang commented 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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants