mirror of
https://github.com/alexcrea/CustomAnvil.git
synced 2026-06-23 16:16:17 +02:00
use small hash for effective plugin version
This commit is contained in:
parent
d4bb82dc87
commit
36a2bd23a6
1 changed files with 7 additions and 3 deletions
|
|
@ -18,6 +18,9 @@ plugins {
|
||||||
group = "xyz.alexcrea"
|
group = "xyz.alexcrea"
|
||||||
version = "1.11.3"
|
version = "1.11.3"
|
||||||
|
|
||||||
|
val effectiveVersion = "$version" +
|
||||||
|
{(if(project.hasProperty("smallCommitHash")) "-${project.property("smallCommitHash")}" else "")}
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
// EcoEnchants
|
// EcoEnchants
|
||||||
maven(url = "https://repo.auxilor.io/repository/maven-public/")
|
maven(url = "https://repo.auxilor.io/repository/maven-public/")
|
||||||
|
|
@ -135,7 +138,8 @@ val fatJar = tasks.register<Jar>("fatJar") {
|
||||||
manifest {
|
manifest {
|
||||||
attributes.apply { put("Main-Class", "io.delilaheve.CustomAnvil") }
|
attributes.apply { put("Main-Class", "io.delilaheve.CustomAnvil") }
|
||||||
}
|
}
|
||||||
archiveFileName.set("${rootProject.name}-${project.version}.jar")
|
|
||||||
|
archiveFileName.set("${rootProject.name}-${effectiveVersion}.jar")
|
||||||
exclude("META-INF/*.RSA", "META-INF/*.SF", "META-INF/*.DSA")
|
exclude("META-INF/*.RSA", "META-INF/*.SF", "META-INF/*.DSA")
|
||||||
duplicatesStrategy = DuplicatesStrategy.WARN
|
duplicatesStrategy = DuplicatesStrategy.WARN
|
||||||
from(configurations.runtimeClasspath.get().map { if (it.isDirectory) it else zipTree(it) })
|
from(configurations.runtimeClasspath.get().map { if (it.isDirectory) it else zipTree(it) })
|
||||||
|
|
@ -158,7 +162,7 @@ tasks {
|
||||||
// Replace version and example fields in plugin.yml
|
// Replace version and example fields in plugin.yml
|
||||||
filesMatching("plugin.yml") {
|
filesMatching("plugin.yml") {
|
||||||
expand(
|
expand(
|
||||||
"version" to project.version,
|
"version" to effectiveVersion,
|
||||||
"libraries" to " \"org.jetbrains.kotlin:kotlin-stdlib:2.1.0\" "
|
"libraries" to " \"org.jetbrains.kotlin:kotlin-stdlib:2.1.0\" "
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
@ -183,7 +187,7 @@ tasks {
|
||||||
|
|
||||||
filesMatching("plugin.yml") {
|
filesMatching("plugin.yml") {
|
||||||
expand(
|
expand(
|
||||||
"version" to "${project.version}-offline",
|
"version" to "$effectiveVersion-offline",
|
||||||
"libraries" to ""
|
"libraries" to ""
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue