forked from PaperMC/paperweight-test-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
93 lines (70 loc) · 2.19 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
import xyz.jpenilla.resourcefactory.bukkit.BukkitPluginYaml
plugins {
java
`java-library`
`maven-publish`
id("io.papermc.paperweight.userdev") version "1.7.3"
id("xyz.jpenilla.resource-factory-bukkit-convention") version "1.2.0"
id("xyz.jpenilla.run-paper") version "2.3.1"
id("io.github.goooler.shadow") version "8.1.8"
kotlin("jvm")
}
description = "A template repository for easily developing Minecraft Paper plugins."
group = "foundation.esoteric"
version = "0.0.1"
val projectGroupString = group.toString()
val projectVersionString = version.toString()
val javaVersion = 21
val javaVersionEnumMember = JavaVersion.valueOf("VERSION_$javaVersion")
val paperApiMinecraftVersion = "1.21.1"
val paperApiVersion = "$paperApiMinecraftVersion-R0.1-SNAPSHOT"
java {
sourceCompatibility = javaVersionEnumMember
targetCompatibility = javaVersionEnumMember
toolchain.languageVersion.set(JavaLanguageVersion.of(javaVersion))
}
repositories {
mavenCentral()
maven("https://www.jitpack.io")
}
dependencies {
paperweight.paperDevBundle(paperApiVersion)
implementation("dev.jorel", "commandapi-bukkit-shade-mojang-mapped", "9.5.3")
implementation("net.lingala.zip4j", "zip4j", "2.11.5")
implementation("com.github.EsotericFoundation:utility.kt:0.4.0")
implementation("com.github.EsotericFoundation:plugin-library:0.4.0")
implementation(kotlin("stdlib-jdk8"))
}
tasks {
build {
dependsOn(shadowJar)
}
compileJava {
options.release.set(javaVersion)
}
javadoc {
options.encoding = Charsets.UTF_8.name()
}
}
bukkitPluginYaml {
name = "PaperTemplate"
description = project.description
authors = listOfNotNull("Esoteric Foundation", "Esoteric Enderman")
setVersion(project.version)
apiVersion = paperApiMinecraftVersion
main = "${project.group}.minecraft.plugins.template.PaperTemplatePlugin"
load = BukkitPluginYaml.PluginLoadOrder.STARTUP
}
publishing {
publications {
create<MavenPublication>("mavenJava") {
from(components["java"])
groupId = projectGroupString
artifactId = rootProject.name
version = projectVersionString
}
}
}
tasks.named("publishMavenJavaPublicationToMavenLocal") {
dependsOn(tasks.named("build"))
}