Merge branch '3.2.x' into 3.3.x

Closes gh-42927
This commit is contained in:
Andy Wilkinson 2024-10-29 15:22:50 +00:00
commit 5d425fe3ff
1 changed files with 5 additions and 6 deletions

View File

@ -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);
});
}