Skip to content

Commit d9265f0

Browse files
wilkinsonabclozel
authored andcommitted
Build against SnakeYAML 1.31 but still use 1.29 in dep mgmt and starter
1 parent 7b12926 commit d9265f0

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

buildSrc/src/main/java/org/springframework/boot/build/JavaConventions.java

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -231,9 +231,11 @@ private void configureDependencyManagement(Project project) {
231231
.matching((configuration) -> configuration.getName().endsWith("Classpath")
232232
|| JavaPlugin.ANNOTATION_PROCESSOR_CONFIGURATION_NAME.equals(configuration.getName()))
233233
.all((configuration) -> configuration.extendsFrom(dependencyManagement));
234-
Dependency springBootParent = project.getDependencies().enforcedPlatform(project.getDependencies()
235-
.project(Collections.singletonMap("path", ":spring-boot-project:spring-boot-parent")));
236-
dependencyManagement.getDependencies().add(springBootParent);
234+
String path = project.getName().contains("spring-boot-starter")
235+
? ":spring-boot-project:spring-boot-dependencies" : ":spring-boot-project:spring-boot-parent";
236+
Dependency dependency = project.getDependencies()
237+
.enforcedPlatform(project.getDependencies().project(Collections.singletonMap("path", path)));
238+
dependencyManagement.getDependencies().add(dependency);
237239
project.getPlugins().withType(OptionalDependenciesPlugin.class, (optionalDependencies) -> configurations
238240
.getByName(OptionalDependenciesPlugin.OPTIONAL_CONFIGURATION_NAME).extendsFrom(dependencyManagement));
239241
}

spring-boot-project/spring-boot-parent/build.gradle

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,13 @@ bom {
164164
]
165165
}
166166
}
167+
library("SnakeYAML", "1.31") {
168+
group("org.yaml") {
169+
modules = [
170+
"snakeyaml"
171+
]
172+
}
173+
}
167174
library("Spock Framework", "2.0-groovy-3.0") {
168175
group("org.spockframework") {
169176
modules = [

0 commit comments

Comments
 (0)