-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
87 lines (74 loc) · 2.19 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
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
/*
* This file was generated by the Gradle 'init' task.
*
* This is a general purpose Gradle build.
* Learn how to create Gradle builds at https://guides.gradle.org/creating-new-gradle-builds/
*/
group = "CHANGEME"
version = "0.0.1"
val kotlinVersion = "1.9.23"
val junitVersion = "5.10.2"
plugins {
kotlin("jvm") version "1.7.22"
id("org.jetbrains.dokka") version "1.9.20"
java
`maven-publish`
}
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
implementation("io.github.microutils:kotlin-logging:3.0.5")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.0")
implementation("org.slf4j:slf4j-simple:2.0.13")
implementation(kotlin("reflect", kotlinVersion))
implementation(kotlin("stdlib-jdk8", kotlinVersion))
testImplementation("com.natpryce:hamkrest:1.8.0.1")
testImplementation("org.junit.jupiter:junit-jupiter-api:$junitVersion")
testImplementation("org.junit.jupiter:junit-jupiter-params:$junitVersion")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:$junitVersion")
testRuntimeOnly("org.junit.vintage:junit-vintage-engine:$junitVersion")
testImplementation(kotlin("test", kotlinVersion))
testImplementation(kotlin("test-junit", kotlinVersion))
}
val mainSrcSet = sourceSets["main"]
val sourceJar by tasks.creating(Jar::class) {
group = JavaBasePlugin.DOCUMENTATION_GROUP
description = "Assembles Kotlin sources"
archiveClassifier.set("sources")
from(mainSrcSet.allSource)
}
tasks.withType<KotlinCompile> {
kotlinOptions {
jvmTarget = "1.17"
}
}
val dokka by tasks.creating(org.jetbrains.dokka.gradle.DokkaTask::class)
val dokkaJar by tasks.creating(Jar::class) {
group = JavaBasePlugin.DOCUMENTATION_GROUP
description = "Assembles Kotlin docs with Dokka"
archiveClassifier.set("javadoc")
from(dokka)
}
tasks.withType<Test> {
useJUnitPlatform()
testLogging {
events("passed", "skipped", "failed")
}
}
publishing {
publications {
create("default", MavenPublication::class.java) {
from(components["java"])
artifact(dokkaJar)
artifact(sourceJar)
}
}
repositories {
maven {
url = uri("$buildDir/repository")
}
}
}