File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
src/test/groovy/org/gradlex/javamodule/testing/test Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -84,7 +84,7 @@ class CustomizationTest extends Specification {
8484 javaModuleTesting.whitebox(testing.suites.getByName<JvmTestSuite>("test") {
8585 targets.all {
8686 testTask {
87- usesService(gradle.sharedServices.registerIfAbsent(TaskLockService.NAME, TaskLockService::class) { maxParallelUsages = 1 })
87+ usesService(gradle.sharedServices.registerIfAbsent(TaskLockService.NAME, TaskLockService::class) { maxParallelUsages.set(1) })
8888 }
8989 }
9090 }) {
Original file line number Diff line number Diff line change @@ -30,6 +30,9 @@ class GradleBuild {
3030 this . libBuildFile = file(" lib/build.gradle.kts" )
3131 this . libModuleInfoFile = file(" lib/src/main/java/module-info.java" )
3232
33+ def launcherDependency = gradleVersionUnderTest == ' 7.4' ?
34+ ' testRuntimeOnly("org.junit.platform:junit-platform-launcher")' : ' '
35+
3336 settingsFile << '''
3437 pluginManagement {
3538 plugins { id("org.gradlex.java-module-dependencies") version "1.5.2" }
@@ -39,20 +42,21 @@ class GradleBuild {
3942 rootProject.name = "test-project"
4043 include("app", "lib")
4144 '''
42- appBuildFile << '''
45+ appBuildFile << """
4346 plugins {
4447 id("org.gradlex.java-module-testing")
4548 id("application")
4649 }
4750 group = "org.example"
4851 dependencies {
4952 testImplementation(platform("org.junit:junit-bom:5.9.0"))
53+ $launcherDependency
5054 }
5155 application {
5256 mainModule.set("org.example.app")
5357 mainClass.set("org.example.app.Main")
5458 }
55- '''
59+ """
5660 file(" app/src/main/java/org/example/app/Main.java" ) << '''
5761 package org.example.app;
5862
You can’t perform that action at this time.
0 commit comments