Skip to content

Commit 2638dd5

Browse files
committed
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
1 parent 22bcb54 commit 2638dd5

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

merge-dist.gradle

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,13 @@ import org.gradle.plugins.ide.eclipse.model.ProjectDependency
2222
def mergeFromProject = project
2323

2424
// invoking a task on mergeFromProject will invoke the task with the same name on mergeIntoProject
25-
def taskNamesToMerge = ['sourcesJar','jar','javadocJar','javadoc','install']
25+
def taskNamesToMerge = ['sourcesJar','jar','javadocJar','javadoc','install','artifactoryPublish']
2626
taskNamesToMerge.each { taskName ->
27-
def taskToRemove = tasks.getByPath(taskName)
28-
taskToRemove.enabled = false
29-
taskToRemove.dependsOn mergeIntoProject."$taskName"
27+
def taskToRemove = mergeFromProject.tasks.findByPath(taskName)
28+
if(taskToRemove) {
29+
taskToRemove.enabled = false
30+
taskToRemove.dependsOn mergeIntoProject."$taskName"
31+
}
3032
}
3133

3234
// update mergeIntoProject artifacts to contain the mergeFromProject artifact contents

0 commit comments

Comments
 (0)