diff --git a/build.gradle.kts b/build.gradle.kts index 5e4fb03..4ef50d2 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,4 +1,3 @@ -import com.github.jengelman.gradle.plugins.shadow.tasks.ConfigureShadowRelocation import java.io.ByteArrayOutputStream plugins { @@ -26,20 +25,16 @@ tasks { options.encoding = Charsets.UTF_8.name() } - shadowJar { - dependsOn(getByName("relocateJars") as ConfigureShadowRelocation) - archiveFileName.set("${project.name}-${project.version}.jar") - minimize() - configurations = listOf(project.configurations.shadow.get()) + jar { + archiveFileName.set("${rootProject.name}.jar") } - build { - dependsOn(shadowJar) - } - - create("relocateJars") { - target = shadowJar.get() - prefix = "${project.name}.lib" + processResources { + filteringCharset = Charsets.UTF_8.name() + duplicatesStrategy = DuplicatesStrategy.INCLUDE + filesMatching("plugin.yml") { + expand(Pair("projectVersion", project.version)) + } } } diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index 402fd3c..e30617f 100755 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -1,6 +1,6 @@ main: com.alttd.afkdectector.AFKDetector name: AFKDetector -version: 2.0 +version: ${projectVersion} api-version: 1.18 author: Destro174 softdepend: