gradle-profiler
gradle-profiler copied to clipboard
Add option to specify different `gradle-args` for `cleanup-tasks`
At the moment all cleanup-tasks
are run with the same gradle-args
as the tasks
, but there are scenarios where I would like to use different args. For example, we run our build is offline mode with --offline
. As a cleanup task I'd like to run :buildScanPublishPrevious
, but this doesn't work when --offline
is applied again.
What would the config look like?
Option 1:
- Since publishing build scans are a standard gradle thing, maybe we can just add a flag for
--publish-previous-build-scan
and have thegradle-profiler
run it? - This seems like an out of the box solution that would work well for our use case.
Option 2:
- Add in a
cleanup-tasks-gradle-args-override
field that will be used. If not present, the normalgradle-args
would be used? I added the-override
so existing configuration would work as it does today. - We would need to override the entire list of args because in the case of
--offline
there isn't the ability to add on another flag to override--offline
. This would cause confusion.