forked from ajgeiss0702/ajLeaderboards
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
124 lines (100 loc) · 3.79 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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
plugins {
java
`maven-publish`
id("com.github.johnrengelman.shadow").version("6.1.0")
id("io.github.slimjar").version("1.3.0")
}
group = "us.ajg0702"
version = "2.7.0-RAJCE"
repositories {
mavenCentral()
maven { url = uri("https://jitpack.io") }
maven { url = uri("https://repo.ajg0702.us/releases/") }
maven { url = uri("https://repo.codemc.io/repository/nms/") }
maven { url = uri("https://hub.spigotmc.org/nexus/content/repositories/snapshots/") }
maven { url = uri("https://repo.extendedclip.com/content/repositories/placeholderapi/") }
maven { url = uri("https://repo.codemc.org/repository/maven-public") }
maven { url = uri("https://repo.citizensnpcs.co/") }
maven { url = uri("https://oss.sonatype.org/content/groups/public/") }
maven { url = uri("https://s01.oss.sonatype.org/content/repositories/snapshots/") }
}
dependencies {
testImplementation("junit:junit:4.12")
implementation("io.github.slimjar:slimjar:1.2.7")
compileOnly("com.github.MilkBowl:VaultAPI:1.7")
compileOnly("org.spigotmc:spigot-api:1.18.2-R0.1-SNAPSHOT")
compileOnly("me.clip:placeholderapi:2.11.1")
compileOnly("org.xerial:sqlite-jdbc:3.32.3.2")
compileOnly("org.spongepowered:configurate-yaml:4.0.0")
implementation("org.bstats:bstats-bukkit:1.7")
implementation("net.kyori:adventure-api:4.12.0")
implementation("net.kyori:adventure-text-minimessage:4.12.0")
implementation("net.kyori:adventure-platform-bukkit:4.3.0")
implementation("us.ajg0702:ajUtils:1.2.12")
implementation("us.ajg0702.commands.platforms.bukkit:bukkit:1.0.0")
implementation("us.ajg0702.commands.api:api:1.0.0")
compileOnly("net.luckperms:api:5.4")
implementation(project(":nms:nms-legacy"))
implementation(project(":nms:nms-19"))
slim("com.zaxxer:HikariCP:3.4.5")
slim("com.h2database:h2:2.1.214")
//implementation("io.prometheus", "simpleclient", "0.9.0")
}
tasks.withType<ProcessResources> {
include("**/*.yml")
include("**/*.prop")
include("**/*.zip")
filter<org.apache.tools.ant.filters.ReplaceTokens>(
"tokens" to mapOf(
"VERSION" to project.version.toString()
)
)
}
tasks.slimJar {
relocate("org.h2", "us.ajg0702.leaderboards.libs.h2")
relocate("com.zaxxer.hikari", "us.ajg0702.leaderboards.libs.hikari")
}
tasks.shadowJar {
relocate("us.ajg0702.utils", "us.ajg0702.leaderboards.libs.utils")
relocate("us.ajg0702.commands", "us.ajg0702.leaderboards.commands.base")
relocate("io.github.slimjar", "us.ajg0702.leaderboards.libs.slimjar")
relocate("net.kyori", "us.ajg0702.leaderboards.libs.kyori")
relocate("org.bstats", "us.ajg0702.leaderboards.libs.bstats")
relocate("org.spongepowered", "us.ajg0702.leaderboards.libs")
relocate("org.yaml", "us.ajg0702.leaderboards.libs")
relocate("io.leangen", "us.ajg0702.leaderboards.libs")
archiveBaseName.set("ajLeaderboards")
archiveClassifier.set("")
exclude("junit/**/*")
exclude("org/junit/**/*")
exclude("org/slf4j/**/*")
exclude("org/hamcrest/**/*")
exclude("LICENSE-junit.txt")
minimize {
exclude(project(":nms:nms-19"))
}
}
publishing {
publications {
create<MavenPublication>("mavenJava") {
artifact(tasks["jar"])
}
}
repositories {
val mavenUrl = "https://repo.ajg0702.us/releases"
if(!System.getenv("REPO_TOKEN").isNullOrEmpty()) {
maven {
url = uri(mavenUrl)
name = "ajRepo"
credentials {
username = "plugins"
password = System.getenv("REPO_TOKEN")
}
}
}
}
}
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}