1+
2+ import junitbuild.extensions.capitalized
13import org.gradle.api.tasks.PathSensitivity.NONE
24import org.gradle.api.tasks.PathSensitivity.RELATIVE
35import org.gradle.internal.os.OperatingSystem
@@ -9,6 +11,18 @@ plugins {
911 id(" junitbuild.jmh-conventions" )
1012}
1113
14+ val processStarter by sourceSets.creating {
15+ java {
16+ srcDir(" src/processStarter/java" )
17+ }
18+ }
19+
20+ java {
21+ registerFeature(processStarter.name) {
22+ usingSourceSet(processStarter)
23+ }
24+ }
25+
1226dependencies {
1327 // --- Things we are testing --------------------------------------------------
1428 testImplementation(projects.junitPlatformCommons)
@@ -37,16 +51,32 @@ dependencies {
3751 testImplementation(libs.bundles.xmlunit)
3852 testImplementation(testFixtures(projects.junitJupiterApi))
3953 testImplementation(testFixtures(projects.junitPlatformReporting))
54+ testImplementation(projects.platformTests) {
55+ capabilities {
56+ requireFeature(" process-starter" )
57+ }
58+ }
4059
4160 // --- Test run-time dependencies ---------------------------------------------
4261 testRuntimeOnly(projects.junitVintageEngine)
4362 testRuntimeOnly(libs.groovy4) {
4463 because(" `ReflectionUtilsTests.findNestedClassesWithInvalidNestedClassFile` needs it" )
4564 }
4665
47- // --- https://openjdk.java.net/projects/code-tools/jmh/ -----------------------
66+ // --- https://openjdk.java.net/projects/code-tools/jmh/ ----------------------
4867 jmh(projects.junitJupiterApi)
4968 jmh(libs.junit4)
69+
70+ // --- ProcessStarter dependencies --------------------------------------------
71+ processStarter.implementationConfigurationName(libs.groovy4) {
72+ because(" it provides convenience methods to handle process output" )
73+ }
74+ processStarter.implementationConfigurationName(libs.commons.io) {
75+ because(" it uses TeeOutputStream" )
76+ }
77+ processStarter.implementationConfigurationName(libs.opentest4j) {
78+ because(" it throws TestAbortedException" )
79+ }
5080}
5181
5282jmh {
@@ -80,6 +110,12 @@ tasks {
80110 includeTags(" junit4" )
81111 }
82112 }
113+ named<JavaCompile >(processStarter.compileJavaTaskName).configure {
114+ options.release = 21
115+ }
116+ named<Checkstyle >(" checkstyle${processStarter.name.capitalized()} " ).configure {
117+ config = resources.text.fromFile(checkstyle.configDirectory.file(" checkstyleMain.xml" ))
118+ }
83119}
84120
85121eclipse {
0 commit comments