I am (ab)using Gradle to build a report tool and also to run the report in multiple configurations. As the inputs for each report configuration can be complex and can vary frequently I’ve modeled each report as a subproject with custom plugin for a structure that looks something like this:
/buildSrc # custom logic to hook the reports and generate IDE ssettings
/src # the code for the actual report tool
/reportA # aggregating project for reports of type A
/ xxx # a project that runs report A against XXX target
/ yyy # a project that runs report A against YYY target
/reportB # aggregating project for reports of type B
/ yyy # a project that runs report A against YYY target
/ zzz # a project that runs report A against XXX target
To run all my reports and publish them to a permanent storagw (raw Nexus repo in fact), I call Gradle as gradlew report pub
. Works great!
Now for the question - sometimes I would like to get only the reportA
, and sometimes I would like to only run all reports for yyy
.
Running gradlew :reportA:report
understandably complains there is no such task. For the second requirement I can’t even think how to express it on the command line.
Ideally I would like something like a wildcard that can match multiple levels **
or a single level *
. If it existed, my scenarios would have been addressed by something like gradlew :reportA:**:report
and gradlew :**:yyy:report
.
Has anybody had this problem before? Is there an existing feature I’m missing?