Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kotlin incremental Support - Stable Version #919

Open
wants to merge 17 commits into
base: master
Choose a base branch
from

Conversation

life2015
Copy link
Contributor

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

  • kotlin文件增量
  • kotlin和java混编
  • kotlin多模块支持
  • 自定义kotlinc path
  • 纯kotlin模块 R.java增量处理
  • 根据gradle配置自动获取kotlin编译器(暂不支持)
  • kapt增量

如果没有自定义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:

  • 自定义注解处理器适配
  • 写文档以及测试

# Conflicts:
#	freeline-gradle-plugin/src/main/groovy/com/antfortune/freeline/FreelinePlugin.groovy
#	freeline_core/gradle_inc_build.py
@dhhAndroid
Copy link

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

@Syrou
Copy link

Syrou commented Apr 28, 2018

Any news when this goes into master?

@zeroarst
Copy link

有沒有更新啊?

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

Successfully merging this pull request may close these issues.

4 participants