From 14a4a25c49c6adcda499c962c1893e6225492ea2 Mon Sep 17 00:00:00 2001 From: Moritz Halbritter Date: Wed, 8 May 2024 14:59:00 +0200 Subject: [PATCH] Include junit-platform-launcher in Gradle builds Closes gh-1476 --- .../build/BuildProjectGenerationConfiguration.java | 11 +++++++++++ .../GradleKtsProjectGenerationConfigurationTests.java | 1 + .../GradleProjectGenerationConfigurationTests.java | 1 + .../annotation-processor-dependency-build.gradle.gen | 1 + ...notation-processor-dependency-build.gradle.kts.gen | 1 + .../project/gradle/bom-ordering-build.gradle.gen | 1 + .../project/gradle/bom-ordering-build.gradle.kts.gen | 1 + .../project/gradle/bom-property-build.gradle.gen | 1 + .../project/gradle/bom-property-build.gradle.kts.gen | 1 + .../gradle/compile-only-dependency-build.gradle.gen | 1 + .../compile-only-dependency-build.gradle.kts.gen | 1 + .../project/gradle/kotlin-java11-build.gradle.gen | 1 + .../project/gradle/kotlin-java11-build.gradle.kts.gen | 1 + .../project/gradle/repositories-build.gradle.gen | 1 + .../project/gradle/repositories-build.gradle.kts.gen | 1 + .../gradle/repositories-milestone-build.gradle.gen | 1 + .../repositories-milestone-build.gradle.kts.gen | 1 + .../project/gradle/version-override-build.gradle.gen | 1 + .../gradle/version-override-build.gradle.kts.gen | 1 + .../resources/project/groovy/next/build.gradle.gen | 1 + .../project/groovy/next/build.gradle.kts.gen | 1 + .../project/groovy/standard/build.gradle.gen | 1 + .../project/groovy/standard/build.gradle.kts.gen | 1 + .../project/groovy/standard/war-build.gradle.gen | 1 + .../project/groovy/standard/war-build.gradle.kts.gen | 1 + .../resources/project/java/standard/build.gradle.gen | 1 + .../project/java/standard/build.gradle.kts.gen | 1 + .../project/java/standard/war-build.gradle.gen | 1 + .../project/java/standard/war-build.gradle.kts.gen | 1 + .../project/kotlin/standard/build.gradle.gen | 1 + .../project/kotlin/standard/build.gradle.kts.gen | 1 + .../project/kotlin/standard/war-build.gradle.gen | 1 + .../project/kotlin/standard/war-build.gradle.kts.gen | 1 + 33 files changed, 43 insertions(+) diff --git a/initializr-generator-spring/src/main/java/io/spring/initializr/generator/spring/build/BuildProjectGenerationConfiguration.java b/initializr-generator-spring/src/main/java/io/spring/initializr/generator/spring/build/BuildProjectGenerationConfiguration.java index 62b1407b3c..ad162824d4 100644 --- a/initializr-generator-spring/src/main/java/io/spring/initializr/generator/spring/build/BuildProjectGenerationConfiguration.java +++ b/initializr-generator-spring/src/main/java/io/spring/initializr/generator/spring/build/BuildProjectGenerationConfiguration.java @@ -20,6 +20,8 @@ import io.spring.initializr.generator.buildsystem.Dependency; import io.spring.initializr.generator.buildsystem.Dependency.Exclusion; import io.spring.initializr.generator.buildsystem.DependencyScope; +import io.spring.initializr.generator.buildsystem.gradle.GradleBuildSystem; +import io.spring.initializr.generator.condition.ConditionalOnBuildSystem; import io.spring.initializr.generator.condition.ConditionalOnPackaging; import io.spring.initializr.generator.condition.ConditionalOnPlatformVersion; import io.spring.initializr.generator.packaging.war.WarPackaging; @@ -35,6 +37,7 @@ * * @author Andy Wilkinson * @author Jean-Baptiste Nizet + * @author Moritz Halbritter */ @ProjectGenerationConfiguration public class BuildProjectGenerationConfiguration { @@ -57,6 +60,14 @@ public BuildCustomizer junitJupiterTestStarterContributor() { .scope(DependencyScope.TEST_COMPILE)); } + @Bean + @ConditionalOnBuildSystem(GradleBuildSystem.ID) + BuildCustomizer junitLauncherContributor() { + return (build) -> build.dependencies() + .add("junit-launcher", Dependency.withCoordinates("org.junit.platform", "junit-platform-launcher") + .scope(DependencyScope.TEST_RUNTIME)); + } + @Bean public DefaultStarterBuildCustomizer defaultStarterContributor(InitializrMetadata metadata) { return new DefaultStarterBuildCustomizer(metadata); diff --git a/initializr-generator-spring/src/test/java/io/spring/initializr/generator/spring/build/gradle/GradleKtsProjectGenerationConfigurationTests.java b/initializr-generator-spring/src/test/java/io/spring/initializr/generator/spring/build/gradle/GradleKtsProjectGenerationConfigurationTests.java index cb7d4eba5b..9a24b9ada6 100644 --- a/initializr-generator-spring/src/test/java/io/spring/initializr/generator/spring/build/gradle/GradleKtsProjectGenerationConfigurationTests.java +++ b/initializr-generator-spring/src/test/java/io/spring/initializr/generator/spring/build/gradle/GradleKtsProjectGenerationConfigurationTests.java @@ -135,6 +135,7 @@ void buildDotGradleDotKtsIsContributedWhenGeneratingGradleKtsProject() { " implementation(\"org.springframework.boot:spring-boot-starter\")", " implementation(\"com.example:acme\")", " testImplementation(\"org.springframework.boot:spring-boot-starter-test\")", + " testRuntimeOnly(\"org.junit.platform:junit-platform-launcher\")", "}", "", "tasks.withType {", diff --git a/initializr-generator-spring/src/test/java/io/spring/initializr/generator/spring/build/gradle/GradleProjectGenerationConfigurationTests.java b/initializr-generator-spring/src/test/java/io/spring/initializr/generator/spring/build/gradle/GradleProjectGenerationConfigurationTests.java index cd683043e9..b4c03ca336 100644 --- a/initializr-generator-spring/src/test/java/io/spring/initializr/generator/spring/build/gradle/GradleProjectGenerationConfigurationTests.java +++ b/initializr-generator-spring/src/test/java/io/spring/initializr/generator/spring/build/gradle/GradleProjectGenerationConfigurationTests.java @@ -133,6 +133,7 @@ void buildDotGradleIsContributedWhenGeneratingGradleProject() { " implementation 'org.springframework.boot:spring-boot-starter'", " implementation 'com.example:acme'", " testImplementation 'org.springframework.boot:spring-boot-starter-test'", + " testRuntimeOnly 'org.junit.platform:junit-platform-launcher'", "}", "", "tasks.named('test') {", diff --git a/initializr-generator-spring/src/test/resources/project/gradle/annotation-processor-dependency-build.gradle.gen b/initializr-generator-spring/src/test/resources/project/gradle/annotation-processor-dependency-build.gradle.gen index 5236b21ebb..01d59304c1 100644 --- a/initializr-generator-spring/src/test/resources/project/gradle/annotation-processor-dependency-build.gradle.gen +++ b/initializr-generator-spring/src/test/resources/project/gradle/annotation-processor-dependency-build.gradle.gen @@ -26,6 +26,7 @@ dependencies { implementation 'org.springframework.boot:spring-boot-starter-web' annotationProcessor 'org.springframework.boot:spring-boot-configuration-processor' testImplementation 'org.springframework.boot:spring-boot-starter-test' + testRuntimeOnly 'org.junit.platform:junit-platform-launcher' } tasks.named('test') { diff --git a/initializr-generator-spring/src/test/resources/project/gradle/annotation-processor-dependency-build.gradle.kts.gen b/initializr-generator-spring/src/test/resources/project/gradle/annotation-processor-dependency-build.gradle.kts.gen index 7045c0f4e9..fb67add3b3 100644 --- a/initializr-generator-spring/src/test/resources/project/gradle/annotation-processor-dependency-build.gradle.kts.gen +++ b/initializr-generator-spring/src/test/resources/project/gradle/annotation-processor-dependency-build.gradle.kts.gen @@ -26,6 +26,7 @@ dependencies { implementation("org.springframework.boot:spring-boot-starter-web") annotationProcessor("org.springframework.boot:spring-boot-configuration-processor") testImplementation("org.springframework.boot:spring-boot-starter-test") + testRuntimeOnly("org.junit.platform:junit-platform-launcher") } tasks.withType { diff --git a/initializr-generator-spring/src/test/resources/project/gradle/bom-ordering-build.gradle.gen b/initializr-generator-spring/src/test/resources/project/gradle/bom-ordering-build.gradle.gen index 4666ce622b..4b71a3f53c 100644 --- a/initializr-generator-spring/src/test/resources/project/gradle/bom-ordering-build.gradle.gen +++ b/initializr-generator-spring/src/test/resources/project/gradle/bom-ordering-build.gradle.gen @@ -18,6 +18,7 @@ repositories { dependencies { implementation 'org.acme:foo' testImplementation 'org.springframework.boot:spring-boot-starter-test' + testRuntimeOnly 'org.junit.platform:junit-platform-launcher' } dependencyManagement { diff --git a/initializr-generator-spring/src/test/resources/project/gradle/bom-ordering-build.gradle.kts.gen b/initializr-generator-spring/src/test/resources/project/gradle/bom-ordering-build.gradle.kts.gen index a6882a0149..9746dd2f87 100644 --- a/initializr-generator-spring/src/test/resources/project/gradle/bom-ordering-build.gradle.kts.gen +++ b/initializr-generator-spring/src/test/resources/project/gradle/bom-ordering-build.gradle.kts.gen @@ -18,6 +18,7 @@ repositories { dependencies { implementation("org.acme:foo") testImplementation("org.springframework.boot:spring-boot-starter-test") + testRuntimeOnly("org.junit.platform:junit-platform-launcher") } dependencyManagement { diff --git a/initializr-generator-spring/src/test/resources/project/gradle/bom-property-build.gradle.gen b/initializr-generator-spring/src/test/resources/project/gradle/bom-property-build.gradle.gen index e98422cc7b..8709092a7a 100644 --- a/initializr-generator-spring/src/test/resources/project/gradle/bom-property-build.gradle.gen +++ b/initializr-generator-spring/src/test/resources/project/gradle/bom-property-build.gradle.gen @@ -22,6 +22,7 @@ ext { dependencies { implementation 'org.acme:foo' testImplementation 'org.springframework.boot:spring-boot-starter-test' + testRuntimeOnly 'org.junit.platform:junit-platform-launcher' } dependencyManagement { diff --git a/initializr-generator-spring/src/test/resources/project/gradle/bom-property-build.gradle.kts.gen b/initializr-generator-spring/src/test/resources/project/gradle/bom-property-build.gradle.kts.gen index dd88f968be..bd07f0e121 100644 --- a/initializr-generator-spring/src/test/resources/project/gradle/bom-property-build.gradle.kts.gen +++ b/initializr-generator-spring/src/test/resources/project/gradle/bom-property-build.gradle.kts.gen @@ -20,6 +20,7 @@ extra["fooVersion"] = "1.3.3" dependencies { implementation("org.acme:foo") testImplementation("org.springframework.boot:spring-boot-starter-test") + testRuntimeOnly("org.junit.platform:junit-platform-launcher") } dependencyManagement { diff --git a/initializr-generator-spring/src/test/resources/project/gradle/compile-only-dependency-build.gradle.gen b/initializr-generator-spring/src/test/resources/project/gradle/compile-only-dependency-build.gradle.gen index 53bc9a39a3..7b41a357dd 100644 --- a/initializr-generator-spring/src/test/resources/project/gradle/compile-only-dependency-build.gradle.gen +++ b/initializr-generator-spring/src/test/resources/project/gradle/compile-only-dependency-build.gradle.gen @@ -20,6 +20,7 @@ dependencies { implementation 'org.springframework.boot:spring-boot-starter-web' compileOnly 'org.acme:foo' testImplementation 'org.springframework.boot:spring-boot-starter-test' + testRuntimeOnly 'org.junit.platform:junit-platform-launcher' } tasks.named('test') { diff --git a/initializr-generator-spring/src/test/resources/project/gradle/compile-only-dependency-build.gradle.kts.gen b/initializr-generator-spring/src/test/resources/project/gradle/compile-only-dependency-build.gradle.kts.gen index 060d6d135f..44db8041c9 100644 --- a/initializr-generator-spring/src/test/resources/project/gradle/compile-only-dependency-build.gradle.kts.gen +++ b/initializr-generator-spring/src/test/resources/project/gradle/compile-only-dependency-build.gradle.kts.gen @@ -20,6 +20,7 @@ dependencies { implementation("org.springframework.boot:spring-boot-starter-web") compileOnly("org.acme:foo") testImplementation("org.springframework.boot:spring-boot-starter-test") + testRuntimeOnly("org.junit.platform:junit-platform-launcher") } tasks.withType { diff --git a/initializr-generator-spring/src/test/resources/project/gradle/kotlin-java11-build.gradle.gen b/initializr-generator-spring/src/test/resources/project/gradle/kotlin-java11-build.gradle.gen index 51bc9f5974..90ad417fd6 100644 --- a/initializr-generator-spring/src/test/resources/project/gradle/kotlin-java11-build.gradle.gen +++ b/initializr-generator-spring/src/test/resources/project/gradle/kotlin-java11-build.gradle.gen @@ -22,6 +22,7 @@ dependencies { implementation 'org.springframework.boot:spring-boot-starter' implementation 'org.jetbrains.kotlin:kotlin-reflect' testImplementation 'org.springframework.boot:spring-boot-starter-test' + testRuntimeOnly 'org.junit.platform:junit-platform-launcher' } tasks.withType(KotlinCompile) { diff --git a/initializr-generator-spring/src/test/resources/project/gradle/kotlin-java11-build.gradle.kts.gen b/initializr-generator-spring/src/test/resources/project/gradle/kotlin-java11-build.gradle.kts.gen index 04cc8107a1..b4f888050d 100644 --- a/initializr-generator-spring/src/test/resources/project/gradle/kotlin-java11-build.gradle.kts.gen +++ b/initializr-generator-spring/src/test/resources/project/gradle/kotlin-java11-build.gradle.kts.gen @@ -22,6 +22,7 @@ dependencies { implementation("org.springframework.boot:spring-boot-starter") implementation("org.jetbrains.kotlin:kotlin-reflect") testImplementation("org.springframework.boot:spring-boot-starter-test") + testRuntimeOnly("org.junit.platform:junit-platform-launcher") } tasks.withType { diff --git a/initializr-generator-spring/src/test/resources/project/gradle/repositories-build.gradle.gen b/initializr-generator-spring/src/test/resources/project/gradle/repositories-build.gradle.gen index 26f9023169..dc2f2ac783 100644 --- a/initializr-generator-spring/src/test/resources/project/gradle/repositories-build.gradle.gen +++ b/initializr-generator-spring/src/test/resources/project/gradle/repositories-build.gradle.gen @@ -21,6 +21,7 @@ dependencies { implementation 'org.acme:bar' implementation 'org.acme:foo' testImplementation 'org.springframework.boot:spring-boot-starter-test' + testRuntimeOnly 'org.junit.platform:junit-platform-launcher' } tasks.named('test') { diff --git a/initializr-generator-spring/src/test/resources/project/gradle/repositories-build.gradle.kts.gen b/initializr-generator-spring/src/test/resources/project/gradle/repositories-build.gradle.kts.gen index 7cb95353c0..f526455158 100644 --- a/initializr-generator-spring/src/test/resources/project/gradle/repositories-build.gradle.kts.gen +++ b/initializr-generator-spring/src/test/resources/project/gradle/repositories-build.gradle.kts.gen @@ -21,6 +21,7 @@ dependencies { implementation("org.acme:bar") implementation("org.acme:foo") testImplementation("org.springframework.boot:spring-boot-starter-test") + testRuntimeOnly("org.junit.platform:junit-platform-launcher") } tasks.withType { diff --git a/initializr-generator-spring/src/test/resources/project/gradle/repositories-milestone-build.gradle.gen b/initializr-generator-spring/src/test/resources/project/gradle/repositories-milestone-build.gradle.gen index daa52b2299..b784bdfbe3 100644 --- a/initializr-generator-spring/src/test/resources/project/gradle/repositories-milestone-build.gradle.gen +++ b/initializr-generator-spring/src/test/resources/project/gradle/repositories-milestone-build.gradle.gen @@ -19,6 +19,7 @@ repositories { dependencies { implementation 'org.acme:foo' testImplementation 'org.springframework.boot:spring-boot-starter-test' + testRuntimeOnly 'org.junit.platform:junit-platform-launcher' } tasks.named('test') { diff --git a/initializr-generator-spring/src/test/resources/project/gradle/repositories-milestone-build.gradle.kts.gen b/initializr-generator-spring/src/test/resources/project/gradle/repositories-milestone-build.gradle.kts.gen index 4a5db0b5cf..f5f7028777 100644 --- a/initializr-generator-spring/src/test/resources/project/gradle/repositories-milestone-build.gradle.kts.gen +++ b/initializr-generator-spring/src/test/resources/project/gradle/repositories-milestone-build.gradle.kts.gen @@ -19,6 +19,7 @@ repositories { dependencies { implementation("org.acme:foo") testImplementation("org.springframework.boot:spring-boot-starter-test") + testRuntimeOnly("org.junit.platform:junit-platform-launcher") } tasks.withType { diff --git a/initializr-generator-spring/src/test/resources/project/gradle/version-override-build.gradle.gen b/initializr-generator-spring/src/test/resources/project/gradle/version-override-build.gradle.gen index 8212241f0b..a24f463ccc 100644 --- a/initializr-generator-spring/src/test/resources/project/gradle/version-override-build.gradle.gen +++ b/initializr-generator-spring/src/test/resources/project/gradle/version-override-build.gradle.gen @@ -23,6 +23,7 @@ ext { dependencies { implementation 'org.springframework.boot:spring-boot-starter-web' testImplementation 'org.springframework.boot:spring-boot-starter-test' + testRuntimeOnly 'org.junit.platform:junit-platform-launcher' } tasks.named('test') { diff --git a/initializr-generator-spring/src/test/resources/project/gradle/version-override-build.gradle.kts.gen b/initializr-generator-spring/src/test/resources/project/gradle/version-override-build.gradle.kts.gen index ab2e148798..b15720867d 100644 --- a/initializr-generator-spring/src/test/resources/project/gradle/version-override-build.gradle.kts.gen +++ b/initializr-generator-spring/src/test/resources/project/gradle/version-override-build.gradle.kts.gen @@ -21,6 +21,7 @@ extra["spring-foo.version"] = "0.1.0.RELEASE" dependencies { implementation("org.springframework.boot:spring-boot-starter-web") testImplementation("org.springframework.boot:spring-boot-starter-test") + testRuntimeOnly("org.junit.platform:junit-platform-launcher") } tasks.withType { diff --git a/initializr-generator-spring/src/test/resources/project/groovy/next/build.gradle.gen b/initializr-generator-spring/src/test/resources/project/groovy/next/build.gradle.gen index eeb89e67b7..c45af35b74 100644 --- a/initializr-generator-spring/src/test/resources/project/groovy/next/build.gradle.gen +++ b/initializr-generator-spring/src/test/resources/project/groovy/next/build.gradle.gen @@ -19,6 +19,7 @@ dependencies { implementation 'org.springframework.boot:spring-boot-starter' implementation 'org.apache.groovy:groovy' testImplementation 'org.springframework.boot:spring-boot-starter-test' + testRuntimeOnly 'org.junit.platform:junit-platform-launcher' } tasks.named('test') { diff --git a/initializr-generator-spring/src/test/resources/project/groovy/next/build.gradle.kts.gen b/initializr-generator-spring/src/test/resources/project/groovy/next/build.gradle.kts.gen index a5b9949b99..79a5cdbc6e 100644 --- a/initializr-generator-spring/src/test/resources/project/groovy/next/build.gradle.kts.gen +++ b/initializr-generator-spring/src/test/resources/project/groovy/next/build.gradle.kts.gen @@ -19,6 +19,7 @@ dependencies { implementation("org.springframework.boot:spring-boot-starter") implementation("org.apache.groovy:groovy") testImplementation("org.springframework.boot:spring-boot-starter-test") + testRuntimeOnly("org.junit.platform:junit-platform-launcher") } tasks.withType { diff --git a/initializr-generator-spring/src/test/resources/project/groovy/standard/build.gradle.gen b/initializr-generator-spring/src/test/resources/project/groovy/standard/build.gradle.gen index 7d8de8dda7..25d9316b13 100644 --- a/initializr-generator-spring/src/test/resources/project/groovy/standard/build.gradle.gen +++ b/initializr-generator-spring/src/test/resources/project/groovy/standard/build.gradle.gen @@ -19,6 +19,7 @@ dependencies { implementation 'org.springframework.boot:spring-boot-starter' implementation 'org.codehaus.groovy:groovy' testImplementation 'org.springframework.boot:spring-boot-starter-test' + testRuntimeOnly 'org.junit.platform:junit-platform-launcher' } tasks.named('test') { diff --git a/initializr-generator-spring/src/test/resources/project/groovy/standard/build.gradle.kts.gen b/initializr-generator-spring/src/test/resources/project/groovy/standard/build.gradle.kts.gen index f611081fed..26ba536d96 100644 --- a/initializr-generator-spring/src/test/resources/project/groovy/standard/build.gradle.kts.gen +++ b/initializr-generator-spring/src/test/resources/project/groovy/standard/build.gradle.kts.gen @@ -19,6 +19,7 @@ dependencies { implementation("org.springframework.boot:spring-boot-starter") implementation("org.codehaus.groovy:groovy") testImplementation("org.springframework.boot:spring-boot-starter-test") + testRuntimeOnly("org.junit.platform:junit-platform-launcher") } tasks.withType { diff --git a/initializr-generator-spring/src/test/resources/project/groovy/standard/war-build.gradle.gen b/initializr-generator-spring/src/test/resources/project/groovy/standard/war-build.gradle.gen index b01d0e8202..7f78e58f7c 100644 --- a/initializr-generator-spring/src/test/resources/project/groovy/standard/war-build.gradle.gen +++ b/initializr-generator-spring/src/test/resources/project/groovy/standard/war-build.gradle.gen @@ -21,6 +21,7 @@ dependencies { implementation 'org.codehaus.groovy:groovy' providedRuntime 'org.springframework.boot:spring-boot-starter-tomcat' testImplementation 'org.springframework.boot:spring-boot-starter-test' + testRuntimeOnly 'org.junit.platform:junit-platform-launcher' } tasks.named('test') { diff --git a/initializr-generator-spring/src/test/resources/project/groovy/standard/war-build.gradle.kts.gen b/initializr-generator-spring/src/test/resources/project/groovy/standard/war-build.gradle.kts.gen index 15c7c83b55..f509bf0288 100644 --- a/initializr-generator-spring/src/test/resources/project/groovy/standard/war-build.gradle.kts.gen +++ b/initializr-generator-spring/src/test/resources/project/groovy/standard/war-build.gradle.kts.gen @@ -21,6 +21,7 @@ dependencies { implementation("org.codehaus.groovy:groovy") providedRuntime("org.springframework.boot:spring-boot-starter-tomcat") testImplementation("org.springframework.boot:spring-boot-starter-test") + testRuntimeOnly("org.junit.platform:junit-platform-launcher") } tasks.withType { diff --git a/initializr-generator-spring/src/test/resources/project/java/standard/build.gradle.gen b/initializr-generator-spring/src/test/resources/project/java/standard/build.gradle.gen index f9a42f4498..7c40c12319 100644 --- a/initializr-generator-spring/src/test/resources/project/java/standard/build.gradle.gen +++ b/initializr-generator-spring/src/test/resources/project/java/standard/build.gradle.gen @@ -18,6 +18,7 @@ repositories { dependencies { implementation 'org.springframework.boot:spring-boot-starter' testImplementation 'org.springframework.boot:spring-boot-starter-test' + testRuntimeOnly 'org.junit.platform:junit-platform-launcher' } tasks.named('test') { diff --git a/initializr-generator-spring/src/test/resources/project/java/standard/build.gradle.kts.gen b/initializr-generator-spring/src/test/resources/project/java/standard/build.gradle.kts.gen index 67256eff56..8bfbded97f 100644 --- a/initializr-generator-spring/src/test/resources/project/java/standard/build.gradle.kts.gen +++ b/initializr-generator-spring/src/test/resources/project/java/standard/build.gradle.kts.gen @@ -18,6 +18,7 @@ repositories { dependencies { implementation("org.springframework.boot:spring-boot-starter") testImplementation("org.springframework.boot:spring-boot-starter-test") + testRuntimeOnly("org.junit.platform:junit-platform-launcher") } tasks.withType { diff --git a/initializr-generator-spring/src/test/resources/project/java/standard/war-build.gradle.gen b/initializr-generator-spring/src/test/resources/project/java/standard/war-build.gradle.gen index 02fc6b878b..3e25705532 100644 --- a/initializr-generator-spring/src/test/resources/project/java/standard/war-build.gradle.gen +++ b/initializr-generator-spring/src/test/resources/project/java/standard/war-build.gradle.gen @@ -20,6 +20,7 @@ dependencies { implementation 'org.springframework.boot:spring-boot-starter-web' providedRuntime 'org.springframework.boot:spring-boot-starter-tomcat' testImplementation 'org.springframework.boot:spring-boot-starter-test' + testRuntimeOnly 'org.junit.platform:junit-platform-launcher' } tasks.named('test') { diff --git a/initializr-generator-spring/src/test/resources/project/java/standard/war-build.gradle.kts.gen b/initializr-generator-spring/src/test/resources/project/java/standard/war-build.gradle.kts.gen index 5b2474f1ba..3ee215dd77 100644 --- a/initializr-generator-spring/src/test/resources/project/java/standard/war-build.gradle.kts.gen +++ b/initializr-generator-spring/src/test/resources/project/java/standard/war-build.gradle.kts.gen @@ -20,6 +20,7 @@ dependencies { implementation("org.springframework.boot:spring-boot-starter-web") providedRuntime("org.springframework.boot:spring-boot-starter-tomcat") testImplementation("org.springframework.boot:spring-boot-starter-test") + testRuntimeOnly("org.junit.platform:junit-platform-launcher") } tasks.withType { diff --git a/initializr-generator-spring/src/test/resources/project/kotlin/standard/build.gradle.gen b/initializr-generator-spring/src/test/resources/project/kotlin/standard/build.gradle.gen index bd77a6c2da..b47866105e 100644 --- a/initializr-generator-spring/src/test/resources/project/kotlin/standard/build.gradle.gen +++ b/initializr-generator-spring/src/test/resources/project/kotlin/standard/build.gradle.gen @@ -22,6 +22,7 @@ dependencies { implementation 'org.springframework.boot:spring-boot-starter' implementation 'org.jetbrains.kotlin:kotlin-reflect' testImplementation 'org.springframework.boot:spring-boot-starter-test' + testRuntimeOnly 'org.junit.platform:junit-platform-launcher' } tasks.withType(KotlinCompile) { diff --git a/initializr-generator-spring/src/test/resources/project/kotlin/standard/build.gradle.kts.gen b/initializr-generator-spring/src/test/resources/project/kotlin/standard/build.gradle.kts.gen index c8622dc282..981273c5b9 100644 --- a/initializr-generator-spring/src/test/resources/project/kotlin/standard/build.gradle.kts.gen +++ b/initializr-generator-spring/src/test/resources/project/kotlin/standard/build.gradle.kts.gen @@ -22,6 +22,7 @@ dependencies { implementation("org.springframework.boot:spring-boot-starter") implementation("org.jetbrains.kotlin:kotlin-reflect") testImplementation("org.springframework.boot:spring-boot-starter-test") + testRuntimeOnly("org.junit.platform:junit-platform-launcher") } tasks.withType { diff --git a/initializr-generator-spring/src/test/resources/project/kotlin/standard/war-build.gradle.gen b/initializr-generator-spring/src/test/resources/project/kotlin/standard/war-build.gradle.gen index c4b4dcc42f..a0d5026a2f 100644 --- a/initializr-generator-spring/src/test/resources/project/kotlin/standard/war-build.gradle.gen +++ b/initializr-generator-spring/src/test/resources/project/kotlin/standard/war-build.gradle.gen @@ -24,6 +24,7 @@ dependencies { implementation 'org.jetbrains.kotlin:kotlin-reflect' providedRuntime 'org.springframework.boot:spring-boot-starter-tomcat' testImplementation 'org.springframework.boot:spring-boot-starter-test' + testRuntimeOnly 'org.junit.platform:junit-platform-launcher' } tasks.withType(KotlinCompile) { diff --git a/initializr-generator-spring/src/test/resources/project/kotlin/standard/war-build.gradle.kts.gen b/initializr-generator-spring/src/test/resources/project/kotlin/standard/war-build.gradle.kts.gen index 529cd3a0a8..5ac372c9b5 100644 --- a/initializr-generator-spring/src/test/resources/project/kotlin/standard/war-build.gradle.kts.gen +++ b/initializr-generator-spring/src/test/resources/project/kotlin/standard/war-build.gradle.kts.gen @@ -24,6 +24,7 @@ dependencies { implementation("org.jetbrains.kotlin:kotlin-reflect") providedRuntime("org.springframework.boot:spring-boot-starter-tomcat") testImplementation("org.springframework.boot:spring-boot-starter-test") + testRuntimeOnly("org.junit.platform:junit-platform-launcher") } tasks.withType {