Fixed configuration of tests.
* Common configuration for all application artifacts
*/
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
-import org.gradle.jvm.tasks.Jar
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
repositories {
@@ -11,7 +10,6 @@ repositories {
maven("https://dl.bintray.com/acs/releases")
}
-plugins.withType(JavaPlugin::class) {
tasks {
withType<JavaCompile>().configureEach {
with(options) {
@@ -21,6 +19,12 @@ plugins.withType(JavaPlugin::class) {
}
}
+ withType<KotlinCompile>().configureEach {
+ kotlinOptions {
+ jvmTarget = "1.8"
+ }
+ }
+
withType<Test>().configureEach {
useJUnitPlatform()
testLogging {
@@ -30,21 +34,13 @@ plugins.withType(JavaPlugin::class) {
}
}
+plugins.withType(JavaPlugin::class) {
dependencies {
"testRuntimeOnly"("org.junit.jupiter:junit-jupiter-engine:5.6.0")
+ "testRuntimeOnly"("org.junit.vintage:junit-vintage-engine:5.6.0")
"testImplementation"("org.junit.jupiter:junit-jupiter-api:5.6.0")
"testImplementation"("org.mockito:mockito-core:1.9.5")
"testImplementation"("org.codehaus.groovy:groovy-all:2.5.7")
"testImplementation"("org.spockframework:spock-core:1.3-groovy-2.5")
}
}
-
-plugins.withId("org.jetbrains.kotlin.jvm") {
- tasks {
- withType<KotlinCompile>().configureEach {
- kotlinOptions {
- jvmTarget = "1.8"
- }
- }
- }
-}
\ No newline at end of file
