feat: 完善插件稳定性与兼容性
Build / build (push) Has been cancelled

This commit is contained in:
2026-08-01 00:36:17 +08:00
parent 5c760b26c6
commit 18cfbc2002
44 changed files with 1523 additions and 471 deletions
+10 -1
View File
@@ -1,10 +1,11 @@
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
import org.gradle.language.jvm.tasks.ProcessResources
import org.gradle.api.tasks.testing.Test
plugins {
id 'java'
id 'io.papermc.paperweight.userdev' version '2.0.0-beta.21'
id 'com.gradleup.shadow' version '8.3.6'
id 'com.gradleup.shadow' version '8.3.11'
}
group = 'cn.infstar'
@@ -22,6 +23,9 @@ dependencies {
paperweight.paperDevBundle('1.21.11-R0.1-SNAPSHOT')
implementation project(':compat-api')
implementation 'com.google.code.gson:gson:2.11.0'
testImplementation platform('org.junit:junit-bom:5.13.4')
testImplementation 'org.junit.jupiter:junit-jupiter'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
}
java {
@@ -38,6 +42,10 @@ tasks.withType(ProcessResources).configureEach {
filteringCharset = 'UTF-8'
}
tasks.withType(Test).configureEach {
useJUnitPlatform()
}
tasks.named('processResources', ProcessResources).configure {
inputs.property('version', project.version)
filesMatching('paper-plugin.yml') {
@@ -54,6 +62,7 @@ tasks.named('shadowJar', ShadowJar).configure {
description = '构建包含全部运行期可开关模块的 EssentialsC 插件。'
archiveFileName.set("EssentialsC-${project.version}.jar")
configurations = [project.configurations.runtimeClasspath]
relocate 'com.google.gson', 'cn.infstar.essentialsC.libs.gson'
[
project(':versions:v1_21_11'),