Skip to content

Commit

Permalink
build: update plugin.yml version logic
Browse files Browse the repository at this point in the history
use fullVersion if the project version is endsWith "-SNAPSHOT"
  • Loading branch information
HappyAreaBean committed Apr 15, 2024
1 parent 70f27fb commit 8f776db
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,15 @@ plugins {
id 'kr.entree.spigradle' version '2.4.2'
id 'java'
id "xyz.jpenilla.run-paper" version "2.1.0"
id 'net.kyori.indra.git' version "3.1.3"
}

group 'cc.happyareabean'
version '1.1.5-SNAPSHOT'

def gitCommit = indraGit.commit().abbreviate(7).name()
def fullVersion = "${project.version}-${gitCommit}"

sourceCompatibility = JavaLanguageVersion.of(8)
targetCompatibility = JavaLanguageVersion.of(8)

Expand Down Expand Up @@ -88,6 +92,7 @@ dependencies {
spigot {
// The 'name' and 'version' will be set to project.version and project.name,
// But we may set those manually.
version = project.version.toString().endsWith("-SNAPSHOT") ? fullVersion : project.version
apiVersion '1.13'
excludeLibraries = ['*']
softDepends 'PlaceholderAPI'
Expand Down

0 comments on commit 8f776db

Please sign in to comment.