| 1 |
plugins { |
| 2 |
`java-library` |
| 3 |
} |
| 4 |
|
| 5 |
val junit_4_12 by configurations.creatingResolvable { |
| 6 |
extendsFrom(configurations.testRuntimeClasspath.get()) |
| 7 |
} |
| 8 |
|
| 9 |
dependencies { |
| 10 |
junit_4_12("junit:junit") { |
| 11 |
version { |
| 12 |
strictly("4.12") |
| 13 |
} |
| 14 |
} |
| 15 |
pluginManager.withPlugin("junitbuild.osgi-conventions") { |
| 16 |
val junit4Osgi = requiredVersionFromLibs("junit4Osgi") |
| 17 |
"osgiVerification"("org.apache.servicemix.bundles:org.apache.servicemix.bundles.junit:${junit4Osgi}") |
| 18 |
} |
| 19 |
} |
| 20 |
|
| 21 |
tasks { |
| 22 |
val test_4_12 by registering(Test::class) { |
| 23 |
val test by testing.suites.existing(JvmTestSuite::class) |
| 24 |
testClassesDirs = files(test.map { it.sources.output.classesDirs }) |
| 25 |
classpath = files(test.map { it.sources.runtimeClasspath }) + junit_4_12 |
| 26 |
} |
| 27 |
check { |
| 28 |
dependsOn(test_4_12) |
| 29 |
} |
| 30 |
} |