-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.gradle.kts
74 lines (61 loc) · 2.12 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
@file:Suppress("GradlePackageVersionRange") // bs warning because we use refreshVersions
plugins {
kotlin("jvm")
`maven-publish`
id("org.jetbrains.dokka")
}
repositories {
mavenCentral()
}
dependencies {
implementation(kotlin("stdlib-jdk8"))
api("io.github.microutils:kotlin-logging:_")
implementation(KotlinX.Coroutines.core)
testImplementation(Testing.junit.jupiter.api)
testRuntimeOnly(Testing.junit.jupiter.engine)
testImplementation(Testing.kotest.assertions.core)
// setup logging
testImplementation("org.slf4j:slf4j-api:_")
testImplementation("org.slf4j:jcl-over-slf4j:_")
testImplementation("org.slf4j:log4j-over-slf4j:_")
testImplementation("org.slf4j:jul-to-slf4j:_")
testImplementation("org.apache.logging.log4j:log4j-to-slf4j:_") // es seems to insist on log4j2
testImplementation("ch.qos.logback:logback-classic:_")
}
tasks.withType<Test> {
useJUnitPlatform()
testLogging.exceptionFormat = org.gradle.api.tasks.testing.logging.TestExceptionFormat.FULL
testLogging.showStandardStreams = true
testLogging.showExceptions = true
testLogging.showStackTraces = true
testLogging.events = setOf(
org.gradle.api.tasks.testing.logging.TestLogEvent.FAILED,
org.gradle.api.tasks.testing.logging.TestLogEvent.PASSED,
org.gradle.api.tasks.testing.logging.TestLogEvent.SKIPPED,
org.gradle.api.tasks.testing.logging.TestLogEvent.STANDARD_ERROR,
org.gradle.api.tasks.testing.logging.TestLogEvent.STANDARD_OUT
)
}
val artifactName = "kotlin4example"
val artifactGroup = "com.github.jillesvangurp"
val dokkaOutputDir = "${layout.buildDirectory.get()}/dokka"
tasks {
dokkaHtml {
outputDirectory.set(file(dokkaOutputDir))
}
}
val javadocJar by tasks.registering(Jar::class) {
dependsOn(tasks.dokkaHtml)
archiveClassifier.set("javadoc")
from(dokkaOutputDir)
}
publishing {
publications {
create<MavenPublication>("lib") {
groupId = artifactGroup
artifactId = artifactName
from(components["java"])
artifact(javadocJar.get())
}
}
}