Quantcast
Channel: Gradle Forums - Latest posts
Viewing all articles
Browse latest Browse all 19870

Force rerun a task by another task

$
0
0

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 task kaptDebugCompile and generate some source files. The annotation processor will output the files into the service 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:

  1. Service project
  2. Subprojects depend on service project
  3. Subprojects generate files to their own build directories
  4. Subprojects have an extra configuration (or archive) which points to the generated files
  5. 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.


Viewing all articles
Browse latest Browse all 19870

Trending Articles