Automatically update version in plugin.yml

This commit is contained in:
Len 2023-12-30 22:37:03 +01:00
parent 1e7d3c7d93
commit 1672fccced
2 changed files with 9 additions and 14 deletions

View File

@ -1,4 +1,3 @@
import com.github.jengelman.gradle.plugins.shadow.tasks.ConfigureShadowRelocation
import java.io.ByteArrayOutputStream import java.io.ByteArrayOutputStream
plugins { plugins {
@ -26,20 +25,16 @@ tasks {
options.encoding = Charsets.UTF_8.name() options.encoding = Charsets.UTF_8.name()
} }
shadowJar { jar {
dependsOn(getByName("relocateJars") as ConfigureShadowRelocation) archiveFileName.set("${rootProject.name}.jar")
archiveFileName.set("${project.name}-${project.version}.jar")
minimize()
configurations = listOf(project.configurations.shadow.get())
} }
build { processResources {
dependsOn(shadowJar) filteringCharset = Charsets.UTF_8.name()
} duplicatesStrategy = DuplicatesStrategy.INCLUDE
filesMatching("plugin.yml") {
create<ConfigureShadowRelocation>("relocateJars") { expand(Pair("projectVersion", project.version))
target = shadowJar.get() }
prefix = "${project.name}.lib"
} }
} }

View File

@ -1,6 +1,6 @@
main: com.alttd.afkdectector.AFKDetector main: com.alttd.afkdectector.AFKDetector
name: AFKDetector name: AFKDetector
version: 2.0 version: ${projectVersion}
api-version: 1.18 api-version: 1.18
author: Destro174 author: Destro174
softdepend: softdepend: