https://kotlinlang.org logo
#kapt
Title
# kapt
g

gildor

01/27/2018, 11:25 AM
Just use Gradle root config and apply to all projects
e

efemoney

01/28/2018, 9:54 AM
Do you mean something like this?
Copy code
allProjects {
  apply plugin: 'kotlin-kapt'

  dependencies {
    kapt "<dependency>"
  }
}
g

gildor

01/28/2018, 9:56 AM
Yes
Also, you can add dependencies to all projects with applied kapt (withPlugin method of Project)
e

efemoney

01/28/2018, 9:58 AM
I'm not sure I understand. Can you show me a sample?
g

gildor

01/28/2018, 10:05 AM
Gradle allows to apply some config to any project with specific plugin using withPlugin API, so for example if you applied kapt to a project you can also add dependencies for dagger
e

efemoney

01/28/2018, 10:11 AM
Ah I see. TIL. I'll research the withPlugin API
Thank you
3 Views