-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
120 lines (100 loc) · 3.29 KB
/
build.gradle.kts
File metadata and controls
120 lines (100 loc) · 3.29 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
import net.minecrell.pluginyml.bukkit.BukkitPluginDescription
repositories {
mavenLocal()
maven("https://repo.erethon.de/snapshots/")
}
plugins {
`java-library`
`maven-publish`
id("io.papermc.paperweight.userdev") version "2.0.0-beta.21"
id("xyz.jpenilla.run-paper") version "3.0.2"
id("net.minecrell.plugin-yml.bukkit") version "0.5.1"
}
group = "de.erethon.aether"
version = "1.0.1-SNAPSHOT"
description = "Mob and NPC plugin for Erethon"
java {
toolchain.languageVersion.set(JavaLanguageVersion.of(25))
}
val papyrusVersion = "26.1.2-SNAPSHOT"
paperweight.reobfArtifactConfiguration = io.papermc.paperweight.userdev.ReobfArtifactConfiguration.MOJANG_PRODUCTION
dependencies {
paperweightDevelopmentBundle("de.erethon.papyrus", "dev-bundle", papyrusVersion)
compileOnly("de.erethon", "Daedalus", "1.4-SNAPSHOT")
compileOnly("de.erethon.hephaestus:Hephaestus:1.0.6-SNAPSHOT")
compileOnly("de.erethon.questsxl:QuestsXL:1.0.6-SNAPSHOT")
compileOnly("de.erethon.hecate:Hecate:1.2-SNAPSHOT")
compileOnly("de.erethon.factions:Factions:1.0-SNAPSHOT")
}
tasks {
runServer {
if (!project.buildDir.exists()) {
project.buildDir.mkdir()
}
val f = File(project.buildDir, "server.jar");
//uri("https://github.com/DRE2N/Papyrus/releases/download/latest/papyrus-paperclip-$papyrusVersion-mojmap.jar").toURL().openStream().use { it.copyTo(f.outputStream()) }
serverJar(f)
runDirectory.set(file("C:\\Dev\\Erethon"))
}
compileJava {
options.encoding = Charsets.UTF_8.name()
options.release.set(25)
}
javadoc {
options.encoding = Charsets.UTF_8.name()
}
val sourcesJar by creating(Jar::class) {
archiveClassifier.set("sources")
from(sourceSets.main.get().allSource)
}
processResources {
filteringCharset = Charsets.UTF_8.name()
}
jar {
manifest {
attributes(
"paperweight-mappings-namespace" to "mojang"
)
}
}
bukkit {
main = "de.erethon.aether.Aether"
apiVersion = "1.21"
authors = listOf("Malfrador")
depend = listOf("QuestsXL")
softDepend = listOf("Hephaestus", "Daedalus", "Factions")
}
assemble {
dependsOn(sourcesJar)
}
}
tasks.register<Copy>("deployToSharedServer") {
doNotTrackState("")
group = "Erethon"
description = "Used for deploying the plugin to the shared server. runServer will do this automatically." +
"This task is only for manual deployment when running runServer from another plugin."
dependsOn(":jar")
from(layout.buildDirectory.file("libs/Aether-$version.jar"))
into("C:\\Dev\\Erethon\\plugins")
}
publishing {
repositories {
maven {
name = "erethon"
url = uri("https://repo.erethon.de/snapshots/")
credentials(PasswordCredentials::class)
authentication {
create<BasicAuthentication>("basic")
}
}
}
publications {
create<MavenPublication>("maven") {
groupId = "${project.group}"
artifactId = "Aether"
version = "${project.version}"
from(components["java"])
artifact(tasks["sourcesJar"])
}
}
}