Open
Description
I have a multi-module gradle project for libraries. In most there are changes to only a subset of the projects. In that case, I only want the changed artifacts to be published.
I think that the artifactoryPublish task should be up-to-date for the unchanged artifacts. It seems to me that gradle should be able to detect that the task's inputs have not changed, however when running gradle with the --debug
switch, the log says:
09:10:11.028 [LIFECYCLE] [org.gradle.TaskExecutionLogger] :configuration:artifactoryPublish
09:10:11.028 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter] Starting to execute task ':configuration:artifactoryPublish'
09:10:11.028 [DEBUG] [org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter] Determining if task ':configuration:artifactoryPublish' is up-to-date
09:10:11.028 [INFO] [org.gradle.api.internal.changedetection.ShortCircuitTaskArtifactStateRepository] Task ':configuration:artifactoryPublish' has not declared any outputs, assuming that it is out-of-date.
If, inspired by http://stackoverflow.com/questions/15655938/gradle-how-to-have-an-upload-task-make-an-up-to-date-check, I add an artifactoryPublish.outputs.upToDateWhen { true }
to my build, I get
12:38:06.030 [INFO] [org.gradle.api.internal.changedetection.DefaultTaskArtifactStateRepository] Skipping task ':configuration:artifactoryPublish' as it is up-to-date.
Maybe the BuildInfoBaseTask could be changed to declare that it doesn't have any outputs?