I’m not familiar with Kotlin but I have a deep understanding of Gradle / Java.
i am configuring
kapt
compiler into these sub projects they will run the taskkaptDebugCompile
and generate some source files. The annotation processor will output the files into theservice
subproject build directory.
Don’t do that, each subproject should only put files in its own build directory. If one project wants to “communicate” with another it should be done via artifacts or configurations.
I’m guessing you should have this:
- Service project
- Subprojects depend on service project
- Subprojects generate files to their own build directories
- Subprojects have an extra configuration (or archive) which points to the generated files
- Have another project which collects all of the generated files (or compiled classes)
You could do 5 in the service project. You’d just need to use configurations to break the chicken/egg problem.