-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
74 lines (61 loc) · 1.91 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
plugins {
`maven-publish`
kotlin("jvm") version "1.9.22"
id("com.gradleup.shadow") version "8.3.2"
}
allprojects {
apply(plugin = "maven-publish")
apply(plugin = "org.jetbrains.kotlin.jvm")
apply(plugin = "com.gradleup.shadow")
version = providers.environmentVariable("VERSION").getOrElse("9999-local")
group = "lol.bai.explosion"
repositories {
mavenCentral()
}
kotlin {
jvmToolchain(17)
}
configurations {
val shade by creating
compileOnly {
extendsFrom(shade)
}
}
tasks.shadowJar {
configurations = listOf(project.configurations["shade"])
archiveClassifier.set("")
minimize()
mergeServiceFiles()
}
tasks.build {
dependsOn("shadowJar")
}
publishing {
repositories {
maven {
name = "LocalMaven"
url = projectDir.resolve(".localMaven").toURI()
}
if (providers.environmentVariable("GITHUB_TOKEN").isPresent) {
maven {
url = uri("https://maven.pkg.github.com/badasintended/explosion")
name = "GitHub"
credentials {
username = providers.environmentVariable("GITHUB_ACTOR").get()
password = providers.environmentVariable("GITHUB_TOKEN").get()
}
}
}
if (providers.environmentVariable("MAVEN_PASSWORD").isPresent) {
maven {
url = uri("https://maven4.bai.lol")
name = "Badasintended"
credentials {
username = providers.environmentVariable("MAVEN_USERNAME").orNull
password = providers.environmentVariable("MAVEN_PASSWORD").orNull
}
}
}
}
}
}