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;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.gradle.api.Action;
|
||||
import org.gradle.api.Plugin;
|
||||
|
|
@ -97,10 +95,11 @@ public class MavenRepositoryPlugin implements Plugin<Project> {
|
|||
.getDependencies()
|
||||
.withType(ProjectDependency.class)
|
||||
.all((dependency) -> {
|
||||
Map<String, String> dependencyDescriptor = new HashMap<>();
|
||||
dependencyDescriptor.put("path", dependency.getDependencyProject().getPath());
|
||||
dependencyDescriptor.put("configuration", MAVEN_REPOSITORY_CONFIGURATION_NAME);
|
||||
target.add(project.getDependencies().project(dependencyDescriptor));
|
||||
ProjectDependency copy = dependency.copy();
|
||||
if (copy.getAttributes().isEmpty()) {
|
||||
copy.setTargetConfiguration(MAVEN_REPOSITORY_CONFIGURATION_NAME);
|
||||
}
|
||||
target.add(copy);
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue