forked from AlpsBTE/Plot-System
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
137 lines (116 loc) · 3.87 KB
/
build.gradle.kts
File metadata and controls
137 lines (116 loc) · 3.87 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
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
125
126
127
128
129
130
131
132
133
134
135
136
137
plugins {
java
alias(libs.plugins.git.version)
alias(libs.plugins.shadow)
}
repositories {
// mavenLocal() // NEVER use in Production/Commits!
maven {
url = uri("https://jitpack.io")
}
maven {
url = uri("https://repo.papermc.io/repository/maven-public/")
}
maven {
url = uri("https://mvn.alps-bte.com/repository/alps-bte/")
}
maven {
url = uri("https://repo.fancyplugins.de/releases")
}
maven {
url = uri("https://maven.enginehub.org/repo/")
}
maven {
url = uri("https://repo.onarandombox.com/content/groups/public/")
}
maven {
url = uri("https://repo.codemc.io/repository/maven-public/")
}
maven {
url = uri("https://repo.maven.apache.org/maven2/")
}
}
dependencies {
implementation(libs.com.alpsbte.canvas)
implementation(libs.com.alpsbte.alpslib.alpslib.io)
implementation(libs.com.alpsbte.alpslib.alpslib.hologram)
implementation(libs.com.alpsbte.alpslib.alpslib.utils)
implementation(libs.org.mariadb.jdbc.mariadb.java.client)
implementation(libs.com.zaxxer.hikaricp) {
exclude(group = "org.slf4j")
}
implementation(platform(libs.com.intellectualsites.bom.bom.newest))
compileOnly(libs.com.fastasyncworldedit.core)
compileOnly(libs.com.sk89q.worldguard.worldguard.bukkit)
compileOnly(libs.multiverse.core)
compileOnly(libs.com.github.fierioziy.particlenativeapi.particlenativeapi.plugin)
compileOnly(libs.com.arcaniax.headdatabase.api)
compileOnly(libs.com.github.decentsoftware.eu.decentholograms)
compileOnly(libs.de.oliver.fancynpcs)
compileOnly(libs.li.cinnazeyy.langlibs.api)
compileOnly(libs.commons.io.commons.io)
compileOnly(libs.io.papermc.paper.paper.api)
compileOnly(libs.asia.buildtheearth.asean.discord.discord.plotsystem.api)
// ASEAN START - Testing utilities
// Note: We test on old-school worldedit because FAWE is impossible to mock
testCompileOnly(libs.com.sk89q.worldedit.core)
testCompileOnly(platform(libs.org.junit.junit.bom))
testCompileOnly(libs.org.junit.platform.engine)
testImplementation(libs.org.junit.jupiter)
testImplementation(libs.org.mockbukkit.latest)
testImplementation(libs.io.papermc.paper.paper.api)
testImplementation(libs.multiverse.core)
testImplementation(libs.com.sk89q.worldedit.bukkit)
testRuntimeOnly(libs.org.junit.platform.launcher)
// ASEAN END
}
val versionDetails: groovy.lang.Closure<com.palantir.gradle.gitversion.VersionDetails> by extra
val details = versionDetails()
group = "com.alpsbte"
// ASEAN START - Add ASEAN suffix
version = "5.0.3-ASEAN" + "-" + details.gitHash + "-SNAPSHOT"
// ASEAN END
description = "An easy to use building system for the BuildTheEarth project."
java.sourceCompatibility = JavaVersion.VERSION_21
tasks.withType<JavaCompile> {
options.encoding = "UTF-8"
}
tasks.withType<Javadoc> {
options.encoding = "UTF-8"
}
tasks.shadowJar {
archiveClassifier = ""
relocationPrefix = "com.alpsbte.plotsystem.shaded"
enableAutoRelocation = true
}
tasks.assemble {
dependsOn(tasks.shadowJar) // Ensure that the shadowJar task runs before the build task
}
tasks.jar {
archiveClassifier = "UNSHADED"
enabled = false // Disable the default jar task since we are using shadowJar
}
// START ASEAN - Testing
tasks.named<Test>("test") {
useJUnitPlatform()
maxHeapSize = "1G"
testLogging {
showStandardStreams = true
events("passed")
}
}
// END ASEAN
tasks.processResources {
// work around IDEA-296490
duplicatesStrategy = DuplicatesStrategy.INCLUDE
with(copySpec {
from("src/main/resources/plugin.yml") {
expand(
mapOf(
"version" to project.version,
"description" to project.description
)
)
}
})
}