-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
69 lines (59 loc) · 1.88 KB
/
build.gradle.kts
File metadata and controls
69 lines (59 loc) · 1.88 KB
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
plugins {
alias(libs.plugins.kotlin)
alias(libs.plugins.sonatype.central.portal.publisher)
`maven-publish`
}
val baseVersion = "0.0.1"
val commitHash = System.getenv("COMMIT_HASH")
val snapshotVersion = "${baseVersion}-dev.$commitHash"
allprojects {
group = "app.simplecloud.plugin"
version = if (commitHash != null) snapshotVersion else baseVersion
repositories {
mavenCentral()
mavenLocal()
maven("https://libraries.minecraft.net")
maven("https://buf.build/gen/maven")
maven("https://repo.simplecloud.app/snapshots")
maven("https://buf.build/gen/maven")
}
}
subprojects {
apply(plugin = "org.jetbrains.kotlin.jvm")
apply(plugin = "net.thebugmc.gradle.sonatype-central-portal-publisher")
dependencies {
compileOnly(rootProject.libs.kotlinJvm)
compileOnly(rootProject.libs.bundles.simpleCloudController)
compileOnly(rootProject.libs.bundles.adventure)
}
kotlin {
jvmToolchain(21)
}
publishing {
repositories {
maven {
name = "simplecloud"
url = uri("https://repo.simplecloud.app/snapshots/")
credentials {
username = System.getenv("SIMPLECLOUD_USERNAME")?: (project.findProperty("simplecloudUsername") as? String)
password = System.getenv("SIMPLECLOUD_PASSWORD")?: (project.findProperty("simplecloudPassword") as? String)
}
authentication {
create<BasicAuthentication>("basic")
}
}
}
publications {
create<MavenPublication>("mavenJava") {
from(components["java"])
}
}
}
signing {
if (commitHash != null) {
return@signing
}
sign(publishing.publications)
useGpgCmd()
}
}