mirror of
https://github.com/DiscordSRV/Ascension.git
synced 2024-11-22 11:55:54 +01:00
Don't include the commit hash in the real version
This commit is contained in:
parent
d29d91b97a
commit
e7c82eb386
17
build.gradle
17
build.gradle
@ -17,16 +17,8 @@ subprojects {
|
|||||||
apply plugin: 'net.kyori.indra.git'
|
apply plugin: 'net.kyori.indra.git'
|
||||||
apply plugin: 'dev.vankka.dependencydownload.plugin'
|
apply plugin: 'dev.vankka.dependencydownload.plugin'
|
||||||
|
|
||||||
var versionExtra = ""
|
|
||||||
if (rootProject.version.endsWith("-SNAPSHOT") && indraGit.isPresent()) {
|
|
||||||
var gitHash = indraGit.commit().getName()
|
|
||||||
if (gitHash.length() > 7) {
|
|
||||||
gitHash = gitHash.substring(0, 7);
|
|
||||||
}
|
|
||||||
versionExtra = "-" + gitHash
|
|
||||||
}
|
|
||||||
group 'com.discordsrv'
|
group 'com.discordsrv'
|
||||||
version = rootProject.version + versionExtra
|
version = rootProject.version
|
||||||
|
|
||||||
java {
|
java {
|
||||||
sourceCompatibility = JavaVersion.VERSION_1_8
|
sourceCompatibility = JavaVersion.VERSION_1_8
|
||||||
@ -141,6 +133,13 @@ subprojects {
|
|||||||
)
|
)
|
||||||
if (indraGit.isPresent()) {
|
if (indraGit.isPresent()) {
|
||||||
indraGit.applyVcsInformationToManifest(manifest)
|
indraGit.applyVcsInformationToManifest(manifest)
|
||||||
|
if (rootProject.version.endsWith("-SNAPSHOT")) {
|
||||||
|
var gitHash = indraGit.commit().getName()
|
||||||
|
if (gitHash.length() > 7) {
|
||||||
|
gitHash = gitHash.substring(0, 7);
|
||||||
|
}
|
||||||
|
archiveClassifier = gitHash
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6,8 +6,8 @@ task copyOutput(type: Copy) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
shadowJar {
|
shadowJar {
|
||||||
// Don't add -all to the end of the jar name
|
// Adds the commit for snapshots to the end of the file name
|
||||||
archiveClassifier = ''
|
archiveClassifier = tasks.jar.archiveClassifier
|
||||||
|
|
||||||
// Include the license in the jar
|
// Include the license in the jar
|
||||||
from(rootProject.file('LICENSE')) {
|
from(rootProject.file('LICENSE')) {
|
||||||
|
Loading…
Reference in New Issue
Block a user