-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle.kts
58 lines (50 loc) · 1.47 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
plugins {
java
`maven-publish`
}
repositories {
mavenCentral()
maven("https://repo.papermc.io/repository/maven-public/")
maven("https://oss.sonatype.org/content/groups/public/")
maven("https://repo.unnamed.team/repository/unnamed-public/") // Creative Central
maven("https://repo.extendedclip.com/content/repositories/placeholderapi/") // PlaceholderAPI
mavenLocal()
}
dependencies {
compileOnly("io.papermc.paper:paper-api:1.19.4-R0.1-SNAPSHOT")
// Creative Central
compileOnly("team.unnamed:creative-central-api:1.1.0")
// Plugins we hook
compileOnly("io.github.miniplaceholders:miniplaceholders-api:2.1.0")
compileOnly("me.clip:placeholderapi:2.11.3")
}
java {
toolchain {
languageVersion.set(JavaLanguageVersion.of(17))
}
}
val repositoryName: String by project
val snapshotRepository: String by project
val releaseRepository: String by project
publishing {
repositories {
maven {
val snapshot = project.version.toString().endsWith("-SNAPSHOT")
name = repositoryName
url = if (snapshot) { uri(snapshotRepository) } else { uri(releaseRepository) }
credentials(PasswordCredentials::class)
}
}
publications {
create<MavenPublication>("maven") {
from(getComponents().getByName("java"))
}
}
}
tasks {
processResources {
filesMatching("**.yml") {
expand("project" to project)
}
}
}