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-24 20:53:07 +08:00
|
|
|
version = "2.3.0-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 {
|
|
|
|
mavenLocal()
|
2024-08-12 16:32:34 +08:00
|
|
|
mavenCentral()
|
2024-08-05 00:52:12 +08:00
|
|
|
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-12 16:32:34 +08:00
|
|
|
implementation("cn.lunadeer:MinecraftPluginUtils:1.3.7-SNAPSHOT")
|
2024-08-05 00:52:12 +08:00
|
|
|
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-12 10:56:53 +08:00
|
|
|
outputs.upToDateWhen { false }
|
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())
|
|
|
|
}
|
|
|
|
|
2024-08-12 10:56:53 +08:00
|
|
|
tasks.register("buildPlugin") { // <<<< RUN THIS TASK TO BUILD PLUGIN
|
|
|
|
dependsOn(tasks.clean)
|
|
|
|
dependsOn(tasks.shadowJar)
|
2024-08-05 00:52:12 +08:00
|
|
|
}
|