-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.gradle.kts
121 lines (98 loc) · 3.33 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
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import java.net.URI
import java.util.*
fun loadProperties(filename: String): Properties {
val properties = Properties()
if (!file(filename).exists()) {
return properties
}
file(filename).inputStream().use { properties.load(it) }
return properties
}
plugins {
id("java")
id("com.gradleup.shadow") version "8.3.3"
id("maven-publish")
}
group = "gg.auroramc"
version = "1.6.2"
java.sourceCompatibility = JavaVersion.VERSION_21
java.targetCompatibility = JavaVersion.VERSION_21
repositories {
mavenCentral()
mavenLocal()
maven("https://papermc.io/repo/repository/maven-public/")
maven("https://repo.auroramc.gg/repository/maven-public/")
maven("https://repo.aikar.co/content/groups/aikar/")
maven("https://mvn.lumine.io/repository/maven-public/")
maven("https://nexus.phoenixdevt.fr/repository/maven-public/")
maven("https://maven.enginehub.org/repo/")
maven("https://repo.auxilor.io/repository/maven-public/")
}
dependencies {
compileOnly("io.papermc.paper:paper-api:1.21.3-R0.1-SNAPSHOT")
compileOnly("gg.auroramc:Aurora:2.0.5")
compileOnly("net.luckperms:api:5.4")
compileOnly("dev.aurelium:auraskills-api-bukkit:2.2.0")
compileOnly("io.lumine:Mythic-Dist:5.6.1")
compileOnly("io.lumine:MythicLib-dist:1.6.2-SNAPSHOT")
compileOnly("com.sk89q.worldguard:worldguard-bukkit:7.0.7")
compileOnly("com.willfp:eco:6.73.0")
compileOnly("com.willfp:EcoSkills:3.59.7")
implementation("co.aikar:acf-paper:0.5.1-SNAPSHOT")
implementation("org.bstats:bstats-bukkit:3.0.2")
testImplementation(platform("org.junit:junit-bom:5.10.0"))
testImplementation("org.junit.jupiter:junit-jupiter")
compileOnly("org.projectlombok:lombok:1.18.32")
annotationProcessor("org.projectlombok:lombok:1.18.32")
}
tasks.test {
useJUnitPlatform()
}
tasks.withType<JavaCompile>().configureEach {
options.encoding = "UTF-8"
}
tasks.withType<ShadowJar> {
archiveFileName.set("AuroraLevels-${project.version}.jar")
manifest {
attributes["paperweight-mappings-namespace"] = "mojang"
}
relocate("co.aikar.commands", "gg.auroramc.levels.libs.acf")
relocate("co.aikar.locales", "gg.auroramc.levels.libs.locales")
relocate("org.bstats", "gg.auroramc.levels.libs.bstats")
exclude("acf-*.properties")
}
tasks.processResources {
filteringCharset = "UTF-8"
filesMatching("plugin.yml") {
expand("version" to project.version)
}
}
tasks {
build {
dependsOn(shadowJar)
}
}
val publishing = loadProperties("publish.properties")
publishing {
repositories {
maven {
name = "AuroraMC"
url = if (version.toString().endsWith("SNAPSHOT")) {
URI.create("https://repo.auroramc.gg/repository/maven-snapshots/")
} else {
URI.create("https://repo.auroramc.gg/repository/maven-releases/")
}
credentials {
username = publishing.getProperty("username")
password = publishing.getProperty("password")
}
}
}
publications.create<MavenPublication>("mavenJava") {
groupId = "gg.auroramc"
artifactId = "AuroraLevels"
version = project.version.toString()
from(components["java"])
}
}