-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
121 lines (102 loc) · 2.91 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 de.chojo.Repo
plugins {
id("com.diffplug.spotless") version "6.18.0"
id("com.github.johnrengelman.shadow") version "8.1.1"
id("de.chojo.publishdata") version "1.2.4"
id("net.minecrell.plugin-yml.bukkit") version "0.5.3"
java
`maven-publish`
}
group = "de.eldoria"
version = "1.1.0"
repositories {
maven("https://eldonexus.de/repository/maven-public/")
maven("https://eldonexus.de/repository/maven-proxies/")
}
dependencies {
compileOnly("de.eldoria", "schematicbrushreborn-api", "2.5.0")
compileOnly("org.spigotmc", "spigot-api", "1.14.4-R0.1-SNAPSHOT")
compileOnly("com.sk89q.worldedit", "worldedit-bukkit", "7.2.14")
testImplementation("org.junit.jupiter:junit-jupiter-api:5.9.2")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:5.9.2")
}
spotless {
java {
licenseHeaderFile(rootProject.file("HEADER.txt"))
target("**/*.java")
}
}
java {
withSourcesJar()
withJavadocJar()
sourceCompatibility = JavaVersion.VERSION_17
}
publishData {
addBuildData()
useEldoNexusRepos()
publishComponent("java")
}
publishing {
publications.create<MavenPublication>("maven") {
publishData.configurePublication(this)
}
repositories {
maven {
authentication {
credentials(PasswordCredentials::class) {
username = System.getenv("NEXUS_USERNAME")
password = System.getenv("NEXUS_PASSWORD")
}
}
setUrl(publishData.getRepository())
name = "EldoNexus"
}
}
}
tasks {
compileJava {
options.encoding = "UTF-8"
}
compileTestJava {
options.encoding = "UTF-8"
}
test {
useJUnitPlatform()
testLogging {
events("passed", "skipped", "failed")
}
}
shadowJar {
relocate("de.eldoria.eldoutilities", "de.eldoria.schematicbrush.libs.eldoutilities")
relocate("de.eldoria.messageblocker", "de.eldoria.schematicbrush.libs.messageblocker")
archiveBaseName.set("SchematicTools")
mergeServiceFiles()
}
register<Copy>("copyToServer") {
val path = project.property("targetDir") ?: "";
if (path.toString().isEmpty()) {
println("targetDir is not set in gradle properties")
return@register
}
println("Copying jar to $path")
from(shadowJar)
destinationDir = File(path.toString())
}
build {
dependsOn(shadowJar)
}
}
bukkit {
name = "SchematicTools"
main = "de.eldoria.schematictools.SchematicTools"
apiVersion = "1.16"
authors = listOf("RainbowDashLabs")
depend = listOf("SchematicBrushReborn")
commands {
register("schematictools") {
description = "Base command of schematic tools"
permission = "schematictools.use"
aliases = listOf("sbt")
}
}
}