alibaba / freeline

A super fast build tool for Android, an alternative to Instant Run
https://www.freelinebuild.com/
BSD 3-Clause "New" or "Revised" License
5.48k stars 623 forks source link

Kotlin incremental Support - Stable Version #919

Open life2015 opened 6 years ago

life2015 commented 6 years ago

Release PR 已经在我的项目里面稳定使用了 :)

如果没有自定义kotlinc path的话 则需要配置kotlinc环境 (终端下可运行kotlinc即可)

MacOS:

brew update brew install kotlin

如果不想配置系统kotlin环境变量,如何自己手动指定Kotlinc地址: 在Freeline DSL地址中指定即可

freeline {
    hack true
    productFlavor 'dev'
    kotlinPath '/usr/local/Cellar/kotlin/1.1.60/bin/kotlinc'
}

把官方的CommandLineCompiler的zip下载下来,然后把bin目录下的kotlinc可执行文件目录写在这里即可(当然也可以配置成系统环境变量,就不需要在这里写了hhh)

官方Command Line Compiler配置文档

适配过程记录 kotlin增量

Enjoy super fast kotlin incremental support!

PS: 因为一些DataBinding的支持问题,我注释掉了javac task前的DataBinding Apt操作

Beta:

dhhAndroid commented 6 years ago

这个版本现在怎么用? @life2015

Syrou commented 6 years ago

Any news when this goes into master?

zeroarst commented 6 years ago

有沒有更新啊?