spring-boot/spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin
Andy Wilkinson 86818b0e45 Ensure that junit-platform-launcher is on classpath
When testing with Gradle 7.6, junit-platform-launcher won't be
on the test runtime classpath unless it's declared as a dependency.
When testing with Gradle 8.x the dependency is added implicitly but
starting with Gradle 8.3 relying on this will result in a warning.

When junit-platform-launcher is absent, a failure occurs when testing
with Gradle as the class loader structure is such that JUnit tries
to load any test execution listeners, finds the listener declared in
spring-boot-actuator-autoconfigure but cannot then load the
implemented TestExecutionListener interface.

This problem is addressed by augmenting the component metadata for
spring-boot-starter-test to add a dependency on
junit-platform-launcher. This addresses the problem with
spring-boot-actuator-autoconfigure while also addressing a warning
with Gradle 8.3+.

Closes gh-43340
2025-01-17 16:01:41 +00:00
..
src Ensure that junit-platform-launcher is on classpath 2025-01-17 16:01:41 +00:00
.gitignore Add .gitignore for Gradle Plugin module 2018-05-11 14:28:02 +02:00
build.gradle Merge branch '3.3.x' 2024-12-16 10:44:33 -08:00