-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
64 lines (54 loc) · 1.55 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
plugins {
`java-library`
`maven-publish`
}
group = "dev.emortal.minestom"
version = "1.0-SNAPSHOT"
repositories {
mavenCentral()
maven("https://repo.emortal.dev/snapshots")
maven("https://repo.emortal.dev/releases")
maven("https://jitpack.io")
maven("https://packages.confluent.io/maven/")
}
dependencies {
api("dev.emortal.minestom:core:bf190ce") {
exclude(group = "dev.emortal.api", module = "common-proto-sdk")
}
api("dev.emortal.api:common-proto-sdk:b05808d")
}
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(21))
}
}
publishing {
repositories {
maven {
name = "development"
url = uri("https://repo.emortal.dev/snapshots")
credentials {
username = System.getenv("MAVEN_USERNAME")
password = System.getenv("MAVEN_SECRET")
}
}
maven {
name = "release"
url = uri("https://repo.emortal.dev/releases")
credentials {
username = System.getenv("MAVEN_USERNAME")
password = System.getenv("MAVEN_SECRET")
}
}
}
publications {
create<MavenPublication>("maven") {
groupId = "dev.emortal.minestom"
artifactId = "game-sdk"
val commitHash = System.getenv("COMMIT_HASH_SHORT")
val releaseVersion = System.getenv("RELEASE_VERSION")
version = commitHash ?: releaseVersion ?: "local"
from(components["java"])
}
}
}