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
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<ConfigureShadowRelocation>("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))
}
}
}

View File

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