File tree Expand file tree Collapse file tree 4 files changed +39
-40
lines changed
junit-jupiter-migrationsupport Expand file tree Collapse file tree 4 files changed +39
-40
lines changed Original file line number Diff line number Diff line change 1+ plugins {
2+ `java- library`
3+ }
4+
5+ val junit_4_12 by configurations.creating {
6+ extendsFrom(configurations.testRuntimeClasspath.get())
7+ }
8+
9+ dependencies {
10+ constraints {
11+ api(" junit:junit:[${Versions .junit4Min} ,)" ) {
12+ version {
13+ prefer(Versions .junit4)
14+ }
15+ }
16+ }
17+ junit_4_12(" junit:junit" ) {
18+ version {
19+ strictly(" 4.12" )
20+ }
21+ }
22+ testRuntimeOnly(" org.apache.servicemix.bundles:org.apache.servicemix.bundles.junit:4.12_1" )
23+ }
24+
25+ tasks {
26+ val test_4_12 by registering(Test ::class ) {
27+ classpath - = configurations.testRuntimeClasspath.get()
28+ classpath + = junit_4_12
29+ }
30+ check {
31+ dependsOn(test_4_12)
32+ }
33+ }
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import aQute.bnd.gradle.BundleTaskConvention;
22
33plugins {
44 `java- library- conventions`
5+ `junit4- compatibility`
56}
67
78apply (from = " $rootDir /gradle/testing.gradle.kts" )
@@ -11,11 +12,7 @@ description = "JUnit Jupiter Migration Support"
1112dependencies {
1213 api(platform(project(" :junit-bom" )))
1314
14- api(" junit:junit:[${Versions .junit4Min} ,)" ) {
15- version {
16- prefer(Versions .junit4)
17- }
18- }
15+ api(" junit:junit" )
1916 api(" org.apiguardian:apiguardian-api:${Versions .apiGuardian} " )
2017
2118 api(project(" :junit-jupiter-api" ))
@@ -24,8 +21,6 @@ dependencies {
2421 testImplementation(project(" :junit-platform-launcher" ))
2522 testImplementation(project(" :junit-platform-runner" ))
2623 testImplementation(project(" :junit-platform-testkit" ))
27-
28- testRuntimeOnly(" org.apache.servicemix.bundles:org.apache.servicemix.bundles.junit:4.12_1" )
2924}
3025
3126tasks.jar {
Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import aQute.bnd.gradle.BundleTaskConvention;
22
33plugins {
44 `java- library- conventions`
5+ `junit4- compatibility`
56}
67
78apply (from = " $rootDir /gradle/testing.gradle.kts" )
@@ -11,17 +12,12 @@ description = "JUnit Platform Runner"
1112dependencies {
1213 api(platform(project(" :junit-bom" )))
1314
14- api(" junit:junit:[${Versions .junit4Min} ,)" ) {
15- version {
16- prefer(Versions .junit4)
17- }
18- }
15+ api(" junit:junit" )
1916 api(" org.apiguardian:apiguardian-api:${Versions .apiGuardian} " )
2017
2118 api(project(" :junit-platform-launcher" ))
2219 api(project(" :junit-platform-suite-api" ))
2320
24- testRuntimeOnly(" org.apache.servicemix.bundles:org.apache.servicemix.bundles.junit:4.12_1" )
2521 testImplementation(testFixtures(project(" :junit-platform-engine" )))
2622 testImplementation(testFixtures(project(" :junit-platform-launcher" )))
2723}
Original file line number Diff line number Diff line change @@ -2,48 +2,23 @@ import aQute.bnd.gradle.BundleTaskConvention;
22
33plugins {
44 `java- library- conventions`
5+ `junit4- compatibility`
56}
67
78apply (from = " $rootDir /gradle/testing.gradle.kts" )
89
910description = " JUnit Vintage Engine"
1011
11- val junit_4_12 by configurations.creating {
12- extendsFrom(configurations.testRuntimeClasspath.get())
13- }
14-
1512dependencies {
1613 api(platform(project(" :junit-bom" )))
1714
1815 api(" org.apiguardian:apiguardian-api:${Versions .apiGuardian} " )
1916 api(project(" :junit-platform-engine" ))
20- api(" junit:junit:[${Versions .junit4Min} ,)" ) {
21- version {
22- prefer(Versions .junit4)
23- }
24- }
17+ api(" junit:junit" )
2518
2619 testImplementation(project(" :junit-platform-launcher" ))
2720 testImplementation(project(" :junit-platform-runner" ))
2821 testImplementation(project(" :junit-platform-testkit" ))
29-
30- junit_4_12(" junit:junit" ) {
31- version {
32- strictly(" 4.12" )
33- }
34- }
35-
36- testRuntimeOnly(" org.apache.servicemix.bundles:org.apache.servicemix.bundles.junit:4.12_1" )
37- }
38-
39- tasks {
40- val test_4_12 by registering(Test ::class ) {
41- classpath - = configurations.testRuntimeClasspath.get()
42- classpath + = junit_4_12
43- }
44- check {
45- dependsOn(test_4_12)
46- }
4722}
4823
4924tasks.jar {
You can’t perform that action at this time.
0 commit comments