-
Notifications
You must be signed in to change notification settings - Fork 50
/
build.gradle.kts
88 lines (67 loc) · 2.51 KB
/
build.gradle.kts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
@file:Suppress("HasPlatformType")
plugins {
kotlin("jvm")
`java-gradle-plugin`
id("com.gradle.plugin-publish") version "1.2.1"
`maven-publish`
}
kotlin {
jvmToolchain(11)
compilerOptions {
freeCompilerArgs.add("-Xjvm-default=all")
}
}
val integrationTest: SourceSet by sourceSets.creating
val integrationTestImplementation by configurations.getting {
extendsFrom(configurations["testImplementation"])
}
configurations.named("integrationTestRuntimeOnly") {
extendsFrom(configurations["testRuntimeOnly"])
}
dependencies {
compileOnly(kotlin("stdlib-jdk8"))
testImplementation(platform("org.junit:junit-bom:5.7.1"))
testImplementation("org.junit.jupiter:junit-jupiter-api")
testImplementation("org.junit.jupiter:junit-jupiter-params")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine")
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
testImplementation(kotlin("gradle-plugin"))
testImplementation("com.willowtreeapps.assertk:assertk-jvm:0.24")
integrationTestImplementation(gradleApi())
}
configurations.all {
resolutionStrategy.eachDependency {
if (requested.group == "org.jetbrains.kotlin") {
useVersion(embeddedKotlinVersion)
}
}
}
@Suppress("UnstableApiUsage")
gradlePlugin {
website.set("https://github.com/unbroken-dome/gradle-testsets-plugin")
vcsUrl.set("https://github.com/unbroken-dome/gradle-testsets-plugin.git")
testSourceSets(integrationTest)
plugins.create("testSetsPlugin") {
id = "org.unbroken-dome.test-sets"
implementationClass = "org.unbrokendome.gradle.plugins.testsets.TestSetsPlugin"
displayName = "Gradle TestSets plugin"
description = "A plugin for the Gradle build system that allows specifying test sets (like integration or " +
"acceptance tests). Each test set is a logical grouping of a source set, dependency configurations, " +
"and related tasks and artifacts."
tags.addAll("testing","testset","test set","integration test")
}
}
tasks {
register<Test>("integrationTest") {
dependsOn("pluginUnderTestMetadata")
group = JavaBasePlugin.VERIFICATION_GROUP
description = "Runs the integration tests."
testClassesDirs = integrationTest.output.classesDirs
classpath = integrationTest.runtimeClasspath
}
withType<Test> {
outputs.upToDateWhen { false }
useJUnitPlatform()
testLogging.showStandardStreams = true
}
}