I’m fairly new to gradle, but after reading through all of the user guides, even the ‘advanced’ ones like Multi-project builds, I’m still having trouble. To me, gradle scripting is very illogical. Anyways, I’m writing an annotation processor, and I have the project structured like this:
SuperProject | |----Module - ExampleApplication | \-main java source set | \- libs | \- AnnotationProcessor jar | \- Annotations/main library jar |----Module - Annotation processor |----Module - Annotation library
I have tasks that build the 2 annotation libraries and make jars in the ExampleApplication’s libs folder. However, I have to run each task on the 2 library submodules each time to clean and rebuild when I edit my source before building the ExampleApplication, as that module depends on the 2 annotation jars.
All I want to do is to simply call 1 task, and have it:
- build the 2 annotation modules/make jars
- THEN build the ExampleApplication
No matter what I do (overriding/adding to default tasks and/or making custom ones), I cant seem to accomplish this simple thing and it’s extremely frustrating. Could someone help me get started with this so I don’t have to run 6 different tasks every time I change the source of one module. Thanks!