2024-08-01 17:06:57 +08:00
|
|
|
plugins {
|
|
|
|
id("java")
|
|
|
|
id("com.github.johnrengelman.shadow") version "8.1.1"
|
|
|
|
}
|
|
|
|
|
|
|
|
group = "cn.lunadeer"
|
2024-08-11 11:56:40 +08:00
|
|
|
version = "2.1.6-beta"
|
2024-08-01 23:06:01 +08:00
|
|
|
|
|
|
|
java {
|
|
|
|
toolchain.languageVersion.set(JavaLanguageVersion.of(21))
|
|
|
|
}
|
|
|
|
|
|
|
|
// utf-8
|
|
|
|
tasks.withType<JavaCompile> {
|
|
|
|
options.encoding = "UTF-8"
|
|
|
|
}
|
2024-08-01 17:06:57 +08:00
|
|
|
|
2024-08-05 15:45:59 +08:00
|
|
|
allprojects {
|
2024-08-05 00:52:12 +08:00
|
|
|
apply(plugin = "java")
|
|
|
|
apply(plugin = "com.github.johnrengelman.shadow")
|
|
|
|
|
|
|
|
repositories {
|
|
|
|
mavenCentral()
|
|
|
|
mavenLocal()
|
|
|
|
maven("https://oss.sonatype.org/content/groups/public")
|
|
|
|
maven("https://repo.papermc.io/repository/maven-public/")
|
|
|
|
maven("https://jitpack.io")
|
|
|
|
maven("https://repo.mikeprimm.com/")
|
|
|
|
maven("https://ssl.lunadeer.cn:14454/repository/maven-snapshots/")
|
2024-08-11 01:59:34 +08:00
|
|
|
maven("https://repo.extendedclip.com/content/repositories/placeholderapi/")
|
2024-08-05 00:52:12 +08:00
|
|
|
}
|
2024-08-01 17:06:57 +08:00
|
|
|
|
2024-08-05 00:52:12 +08:00
|
|
|
dependencies {
|
|
|
|
compileOnly("com.github.BlueMap-Minecraft:BlueMapAPI:v2.6.2")
|
|
|
|
compileOnly("us.dynmap:DynmapCoreAPI:3.4")
|
2024-08-11 01:59:34 +08:00
|
|
|
compileOnly("me.clip:placeholderapi:2.11.6")
|
2024-08-01 23:06:01 +08:00
|
|
|
|
2024-08-05 00:52:12 +08:00
|
|
|
implementation("cn.lunadeer:MinecraftPluginUtils:1.3.4-SNAPSHOT")
|
|
|
|
implementation("org.yaml:snakeyaml:2.0")
|
|
|
|
}
|
2024-08-01 17:06:57 +08:00
|
|
|
|
2024-08-05 15:45:59 +08:00
|
|
|
tasks.processResources {
|
2024-08-01 23:06:01 +08:00
|
|
|
// replace @version@ in plugin.yml with project version
|
|
|
|
filesMatching("**/plugin.yml") {
|
|
|
|
filter {
|
2024-08-05 15:45:59 +08:00
|
|
|
it.replace("@version@", rootProject.version.toString())
|
2024-08-01 23:06:01 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2024-08-01 18:03:21 +08:00
|
|
|
|
2024-08-05 15:45:59 +08:00
|
|
|
tasks.shadowJar {
|
2024-08-01 23:06:01 +08:00
|
|
|
archiveClassifier.set("")
|
|
|
|
archiveVersion.set(project.version.toString())
|
2024-08-05 00:52:12 +08:00
|
|
|
dependsOn(tasks.withType<ProcessResources>())
|
2024-08-01 23:06:01 +08:00
|
|
|
}
|
2024-08-05 15:45:59 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
implementation(project(":core"))
|
|
|
|
implementation(project(":v1_20_1"))
|
|
|
|
implementation(project(":v1_21"))
|
|
|
|
}
|
|
|
|
|
|
|
|
tasks.shadowJar {
|
|
|
|
archiveClassifier.set("")
|
|
|
|
archiveVersion.set(project.version.toString())
|
|
|
|
}
|
|
|
|
|
|
|
|
tasks.register("buildPlugin") {
|
|
|
|
dependsOn(tasks.getByName("clean"))
|
|
|
|
dependsOn(tasks.getByName("shadowJar"))
|
2024-08-05 00:52:12 +08:00
|
|
|
}
|