-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle.kts
57 lines (47 loc) · 1.3 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
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
`maven-publish`
kotlin("jvm") version "2.0.10"
id("com.gradleup.shadow") version "8.3.0"
}
group = "one.oktw"
version = "1.0-SNAPSHOT"
repositories {
mavenCentral()
maven("https://kotlin.bintray.com/kotlinx")
}
dependencies {
api(kotlin("stdlib-jdk8"))
api(kotlin("reflect"))
api(platform("org.jetbrains.kotlinx:kotlinx-coroutines-bom:1.8.1"))
api("org.jetbrains.kotlinx:kotlinx-coroutines-core")
api("org.mongodb:bson:5.1.3")
}
java {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}
tasks.withType<KotlinCompile>().configureEach {
compilerOptions.jvmTarget = JvmTarget.JVM_21
}
val shadowJar by tasks.getting(ShadowJar::class) {
archiveClassifier.set("all")
}
val sourcesJar by tasks.register<Jar>("sourcesJar") {
archiveClassifier.set("sources")
from(sourceSets.main.get().allSource)
}
tasks.getByName<Jar>("jar") {
dependsOn(sourcesJar)
dependsOn(shadowJar)
}
publishing {
publications {
create<MavenPublication>("maven") {
from(components["java"])
// artifact(sourcesJar)
}
}
}