-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle.kts
97 lines (84 loc) · 2.36 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
89
90
91
92
93
94
95
96
97
plugins {
`java-gradle-plugin`
kotlin("jvm")
id("org.jlleitschuh.gradle.ktlint")
id("com.gradle.plugin-publish")
`maven-publish`
jacoco
}
val pluginWebsite: String by project
val pluginVcsUrl: String by project
val pluginTags: String by project
pluginBundle {
website = pluginWebsite
vcsUrl = pluginVcsUrl
tags = pluginTags.split(",").map(String::trim)
}
val pluginId: String by project
val pluginDisplayName: String by project
val pluginDescription: String by project
val pluginImplementationClass: String by project
val pluginDeclarationName: String by project
gradlePlugin {
plugins {
create(pluginDeclarationName) {
id = pluginId
displayName = pluginDisplayName
description = pluginDescription
implementationClass = pluginImplementationClass
}
}
}
val projectGroup: String by project
val projectVersion: String by project
group = projectGroup
version = projectVersion
repositories {
mavenCentral()
}
val junitVersion: String by project
val assertjVersion: String by project
dependencies {
implementation(kotlin("stdlib-jdk8"))
implementation("com.influxdb:influxdb-client-kotlin:6.9.0")
testImplementation(platform("org.junit:junit-bom:$junitVersion"))
testImplementation("org.junit.jupiter:junit-jupiter-api")
testImplementation("org.junit.jupiter:junit-jupiter-params")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine")
testImplementation("org.assertj:assertj-core:$assertjVersion")
}
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
kotlinOptions {
freeCompilerArgs = listOf("-Xjsr305=strict", "-Xopt-in=kotlin.RequiresOptIn")
jvmTarget = "11"
}
}
plugins.withType<JavaPlugin>().configureEach {
extensions.configure<JavaPluginExtension> {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
}
tasks.withType<Test>().configureEach {
useJUnitPlatform()
testLogging {
showStandardStreams = true
}
}
publishing {
publications {
repositories {
mavenLocal()
}
}
}
tasks.wrapper {
distributionType = Wrapper.DistributionType.BIN
}
tasks.jacocoTestReport {
reports {
xml.required.set(true)
csv.required.set(false)
html.required.set(false)
}
}