Auto increment version in plugin.yml
This commit is contained in:
parent
b7920b2ffb
commit
6279cd01be
|
|
@ -1,13 +1,10 @@
|
||||||
import com.github.jengelman.gradle.plugins.shadow.tasks.ConfigureShadowRelocation
|
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id("java")
|
id("java")
|
||||||
id("com.github.johnrengelman.shadow") version "7.1.0"
|
|
||||||
id("maven-publish")
|
id("maven-publish")
|
||||||
}
|
}
|
||||||
|
|
||||||
group = "com.alttd"
|
group = "com.alttd"
|
||||||
version = "1.0-SNAPSHOT"
|
version = System.getenv("BUILD_NUMBER") ?: "1.0-SNAPSHOT"
|
||||||
description = "Altitude's Transfer Items plugin"
|
description = "Altitude's Transfer Items plugin"
|
||||||
|
|
||||||
apply<JavaLibraryPlugin>()
|
apply<JavaLibraryPlugin>()
|
||||||
|
|
@ -27,20 +24,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("version", project.version))
|
||||||
target = shadowJar.get()
|
}
|
||||||
prefix = "${project.name}.lib"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user