Skip to content

Commit

Permalink
Merge branch '3.4.x'
Browse files Browse the repository at this point in the history
Closes gh-43870
  • Loading branch information
wilkinsona committed Jan 17, 2025
2 parents 96d90eb + 86818b0 commit 239a6e8
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2012-2024 the original author or authors.
* Copyright 2012-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -89,6 +89,7 @@ public void execute(Project project) {
project.afterEvaluate(this::configureUtf8Encoding);
configureParametersCompilerArg(project);
configureAdditionalMetadataLocations(project);
configureSpringBootStarterTestToDependOnJUnitPlatformLauncher(project);
}

private void classifyJarTask(Project project) {
Expand Down Expand Up @@ -317,6 +318,15 @@ private void configureTestAndDevelopmentOnlyConfiguration(Project project) {
testImplementation.extendsFrom(testAndDevelopmentOnly);
}

private void configureSpringBootStarterTestToDependOnJUnitPlatformLauncher(Project project) {
project.getDependencies()
.components((components) -> components.withModule("org.springframework.boot:spring-boot-starter-test",
(metadata) -> metadata.withVariant("runtimeElements", (variant) -> variant.withDependencies(
(dependencies) -> dependencies.add("org.junit.platform:junit-platform-launcher")

))));
}

/**
* Task {@link Action} to add additional meta-data locations. We need to use an
* inner-class rather than a lambda due to
Expand Down

0 comments on commit 239a6e8

Please sign in to comment.