Skip to content

unchanged artifacts should not be published to artifactory #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
jochenberger opened this issue Apr 25, 2013 · 1 comment
Open

unchanged artifacts should not be published to artifactory #1

jochenberger opened this issue Apr 25, 2013 · 1 comment

Comments

@jochenberger
Copy link

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?

eyalbe4 pushed a commit that referenced this issue Oct 21, 2015
BI-206: Fixed special characters not encoded
eyalbe4 pushed a commit that referenced this issue Jan 5, 2016
@rkrisztian
Copy link

rkrisztian commented Jun 27, 2018

+1. I have a task at root level like this:

task notifyPublicationsInEmail {
    projects.each {
        dependsOn "${it.path}:artifactoryPublish"
    }
    (...)
}

However:

  • If I execute gradlew artifactoryPublish and gradlew notifyPublicationsInEmail separately, the publications will happen twice!
  • I can't re-test the second task without executing the first...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants