-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
42 lines (36 loc) · 957 Bytes
/
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
plugins {
id("java")
id("java-library")
id("maven-publish")
}
group = "net.thenextlvl.services"
version = "2.2.0"
java {
toolchain.languageVersion = JavaLanguageVersion.of(21)
withSourcesJar()
withJavadocJar()
}
tasks.compileJava {
options.release.set(21)
}
repositories {
mavenCentral()
maven("https://repo.thenextlvl.net/releases")
maven("https://papermc.io/repo/repository/maven-public/")
}
dependencies {
compileOnly("io.papermc.paper:paper-api:1.21.4-R0.1-SNAPSHOT")
}
publishing {
publications.create<MavenPublication>("maven") {
from(components["java"])
}
repositories.maven {
val channel = if ((version as String).contains("-pre")) "snapshots" else "releases"
url = uri("https://repo.thenextlvl.net/$channel")
credentials {
username = System.getenv("REPOSITORY_USER")
password = System.getenv("REPOSITORY_TOKEN")
}
}
}