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

Set default task inputs and outputs for Docker task

Open sfitts opened this issue 11 years ago • 1 comments

Whenever I make a new Docker task I pretty much always add the following:

inputs.file 'build.gradle'
outputs.dir stageDir

That way the task doesn't always execute and is re-run if I change the task definition. Seems like it might be nice to add this by default (if there is a way to only re-run if the specific task is redefined that would be great, but the build file is a reasonable proxy if that isn't possible).

sfitts avatar Jul 28 '14 21:07 sfitts

The inputs to the task should probably be the files that are added to the image. If no files are added then build.gradle serves as a good proxy.

Maybe Gradle's incremental task feature (http://www.gradle.org/docs/current/userguide/custom_tasks.html) might be helpful as well.

mattgruter avatar Jul 28 '14 21:07 mattgruter