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 项目中使用kts构建 plugin无法自动添加 kapt dependency #143

Closed
JasonHezz opened this issue Apr 30, 2020 · 3 comments
Closed

Comments

@JasonHezz
Copy link
Contributor

kts 部分代码如下

plugins {
    id("com.chenenyu.router")
    kotlin("android")
    kotlin("android.extensions")
    kotlin("kapt")
}

无法生成原因:
image
添加id实际上为 org.jetbrains.kotlin.android

plugin 代码

def isKotlinProject = project.plugins.hasPlugin('kotlin-android')

可以看到plugin是依据 kotlin-android 添加 kapt compiler

临时解决方案:

dependencies {
    kapt("com.chenenyu.router:compiler:1.7.2")
}
@chenenyu
Copy link
Owner

chenenyu commented May 6, 2020

感谢反馈,我看下

chenenyu pushed a commit that referenced this issue May 6, 2020
chenenyu pushed a commit that referenced this issue May 6, 2020
@chenenyu
Copy link
Owner

chenenyu commented May 6, 2020

Try 1.7.3.

@JasonHezz
Copy link
Contributor Author

还是不能添加 晚上回家再Debug一下

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

No branches or pull requests

2 participants