-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle.kts
85 lines (72 loc) · 2.88 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
import org.gradle.plugins.ide.idea.model.IdeaLanguageLevel
plugins {
`java-gradle-plugin`
id("org.jetbrains.kotlin.jvm")
idea
`maven-publish`
id("com.gradle.plugin-publish") version "1.3.0"
}
group = "pl.zalas"
java.sourceCompatibility = JavaVersion.VERSION_17
java.targetCompatibility = JavaVersion.VERSION_17
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
kotlinOptions.jvmTarget = "17"
}
idea {
project {
jdkName = "17"
languageLevel = IdeaLanguageLevel("17")
}
}
repositories {
mavenCentral()
}
dependencies {
implementation(platform("org.jetbrains.kotlin:kotlin-bom"))
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
implementation("de.undercouch:gradle-download-task:5.6.0")
testImplementation("org.jetbrains.kotlin:kotlin-test")
testImplementation("org.jetbrains.kotlin:kotlin-test-junit5")
testImplementation("org.junit.jupiter:junit-jupiter-api:5.11.4")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.11.4")
testImplementation("org.wiremock:wiremock:3.10.0")
}
gradlePlugin {
website.set("https://github.com/jakzal/gradle-structurizr-cli")
vcsUrl.set("https://github.com/jakzal/gradle-structurizr-cli.git")
plugins {
create("structurizrCli") {
id = "pl.zalas.structurizr-cli"
displayName = "Gradle Structurizr CLI plugin"
implementationClass = "pl.zalas.gradle.structurizrcli.StructurizrCliPlugin"
description = "Enables Gradle to run Structurizr CLI commands."
tags.set(listOf("structurizr", "structurizr-cli", "task", "diagrams", "diagrams-as-code", "plantuml", "mermaid", "websequencediagrams", "json"))
}
}
}
val functionalTestSourceSet = sourceSets.create("functionalTest") {
}
gradlePlugin.testSourceSets(functionalTestSourceSet)
configurations.getByName("functionalTestImplementation").extendsFrom(configurations.getByName("testImplementation"))
configurations.getByName("functionalTestRuntimeOnly").extendsFrom(configurations.getByName("testRuntimeOnly"))
val functionalTest by tasks.registering(Test::class) {
testClassesDirs = functionalTestSourceSet.output.classesDirs
classpath = functionalTestSourceSet.runtimeClasspath
}
val check by tasks.getting(Task::class) {
dependsOn(functionalTest)
}
tasks {
test {
useJUnitPlatform()
testLogging {
events = mutableSetOf(org.gradle.api.tasks.testing.logging.TestLogEvent.FAILED, org.gradle.api.tasks.testing.logging.TestLogEvent.SKIPPED, org.gradle.api.tasks.testing.logging.TestLogEvent.PASSED)
}
}
functionalTest {
useJUnitPlatform()
testLogging {
events = mutableSetOf(org.gradle.api.tasks.testing.logging.TestLogEvent.FAILED, org.gradle.api.tasks.testing.logging.TestLogEvent.SKIPPED, org.gradle.api.tasks.testing.logging.TestLogEvent.PASSED)
}
}
}