Move away from ProjectDependency#getDependencyProject()
Closes gh-42870
This commit is contained in:
parent
b1653708e4
commit
decf234b88
|
|
@ -17,8 +17,6 @@
|
||||||
package org.springframework.boot.build;
|
package org.springframework.boot.build;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
import org.gradle.api.Action;
|
import org.gradle.api.Action;
|
||||||
import org.gradle.api.Plugin;
|
import org.gradle.api.Plugin;
|
||||||
|
|
@ -97,10 +95,11 @@ public class MavenRepositoryPlugin implements Plugin<Project> {
|
||||||
.getDependencies()
|
.getDependencies()
|
||||||
.withType(ProjectDependency.class)
|
.withType(ProjectDependency.class)
|
||||||
.all((dependency) -> {
|
.all((dependency) -> {
|
||||||
Map<String, String> dependencyDescriptor = new HashMap<>();
|
ProjectDependency copy = dependency.copy();
|
||||||
dependencyDescriptor.put("path", dependency.getDependencyProject().getPath());
|
if (copy.getAttributes().isEmpty()) {
|
||||||
dependencyDescriptor.put("configuration", MAVEN_REPOSITORY_CONFIGURATION_NAME);
|
copy.setTargetConfiguration(MAVEN_REPOSITORY_CONFIGURATION_NAME);
|
||||||
target.add(project.getDependencies().project(dependencyDescriptor));
|
}
|
||||||
|
target.add(copy);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue