forked from asarkar/build-time-tracker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
83 lines (72 loc) · 2.08 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
plugins {
`java-gradle-plugin`
kotlin("jvm")
id("org.jlleitschuh.gradle.ktlint")
id("com.gradle.plugin-publish")
`maven-publish`
}
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"))
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 = "1.8"
}
}
plugins.withType<JavaPlugin>().configureEach {
extensions.configure<JavaPluginExtension> {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
}
tasks.withType<Test>().configureEach {
useJUnitPlatform()
testLogging {
showStandardStreams = true
}
}
publishing {
publications {
repositories {
mavenLocal()
}
}
}