gradle-profiler icon indicating copy to clipboard operation
gradle-profiler copied to clipboard

Add option to specify different `gradle-args` for `cleanup-tasks`

Open vRallev opened this issue 3 years ago • 2 comments

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.

vRallev avatar Feb 01 '22 21:02 vRallev

What would the config look like?

asodja avatar Feb 11 '22 13:02 asodja

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 the gradle-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 normal gradle-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.

handstandsam avatar Apr 09 '24 14:04 handstandsam