-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
70 lines (60 loc) · 1.63 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
plugins {
kotlin("jvm") version "1.9.0"
id("com.github.johnrengelman.shadow") version "8.1.1"
id("application")
id("maven-publish")
}
group = "gg.flyte"
version = "0.1.5-SNAPSHOT"
repositories {
mavenCentral()
}
dependencies {
implementation("org.mongodb:mongodb-driver-sync:4.9.0")
testImplementation("io.github.cdimascio:dotenv-kotlin:6.4.1")
}
application {
mainClass.set("gg.flyte.munch.Test")
}
tasks {
build {
dependsOn(shadowJar)
}
shadowJar {
val `package` = "gg.flyte.munch.shaded"
relocate("kotlin", "$`package`.kotlin")
relocate("com.mongodb", "$`package`.mongodb")
relocate("org.bson", "$`package`.bson")
relocate("org.intellij", "$`package`.intellij")
relocate("org.jetbrains", "$`package`.jetbrains")
}
}
kotlin {
jvmToolchain(17)
}
publishing {
repositories {
maven {
name = "flyte-repository"
url = uri(
"https://repo.flyte.gg/${
if (version.toString().endsWith("-SNAPSHOT")) "snapshots" else "releases"
}"
)
credentials {
username = System.getenv("MAVEN_NAME") ?: property("mavenUser").toString()
password = System.getenv("MAVEN_SECRET") ?: property("mavenPassword").toString()
}
}
}
publishing {
publications {
create<MavenPublication>("maven") {
groupId = group.toString()
artifactId = "munch"
version = version.toString()
from(components["java"])
}
}
}
}