I have a simple task that that defines inputs/outputs. I expect gradle to run the task when any outputs do not exist. Is this a correct assumption? In reality gradle is skipping the task because it thinks it is up-to-date, even when the defined outputs do not exist:
task createFiles( type:GradleBuild) { GradleBuild gb ->
// calls out to ant to create some files
gb.buildFile = 'ant.gradle'
gb.tasks = ['build']
inputs.dir 'src/'
outputs.file 'build.ant/dist/my_file_1'
outputs.file 'build.ant/dist/my_file_2'
}
Without much difficulty, I can delete ‘build.ant/’ and gradle still will not rerun the ‘createFiles’ task. Any reason why this would happen?