merge-dist.gradle disables artifactoryPublish

Previously the project that was getting merged from would try to
execute the artifactoryPublish on the build box. This caused issues
since the mavenDescriptor did not exist.

The merge-dist.gradle now disables the artifactoryPublish task if it
exists (it will only exist on the build box).

Issue: SPR-9859, SPR-7951
This commit is contained in:
Rob Winch
2012-10-05 11:40:42 -05:00
parent 22bcb54ab6
commit 2638dd5a05

View File

@@ -22,11 +22,13 @@ import org.gradle.plugins.ide.eclipse.model.ProjectDependency
def mergeFromProject = project
// invoking a task on mergeFromProject will invoke the task with the same name on mergeIntoProject
def taskNamesToMerge = ['sourcesJar','jar','javadocJar','javadoc','install']
def taskNamesToMerge = ['sourcesJar','jar','javadocJar','javadoc','install','artifactoryPublish']
taskNamesToMerge.each { taskName ->
def taskToRemove = tasks.getByPath(taskName)
taskToRemove.enabled = false
taskToRemove.dependsOn mergeIntoProject."$taskName"
def taskToRemove = mergeFromProject.tasks.findByPath(taskName)
if(taskToRemove) {
taskToRemove.enabled = false
taskToRemove.dependsOn mergeIntoProject."$taskName"
}
}
// update mergeIntoProject artifacts to contain the mergeFromProject artifact contents