Expand version in plugin.yml during gradle build.

This commit is contained in:
wizjany 2016-01-11 01:04:59 -05:00
parent 536132a250
commit 6db2df4e29
2 changed files with 14 additions and 2 deletions

View File

@ -1,7 +1,8 @@
apply plugin: 'eclipse'
apply plugin: 'idea'
version '6.1.2-SNAPSHOT'
project.version = '6.1.2-SNAPSHOT'
ext.internalVersion = project.version + ";" + gitCommitHash
checkstyle.configFile = new File(projectDir, "config/checkstyle/checkstyle.xml")
@ -20,6 +21,17 @@
testCompile 'org.hamcrest:hamcrest-library:1.2.1'
}
processResources {
from (sourceSets.main.resources.srcDirs) {
expand project.properties
include 'plugin.yml'
}
from (sourceSets.main.resources.srcDirs) {
exclude 'plugin.yml'
}
}
shadowJar {
dependencies {
include(dependency('org.khelekore:prtree:1.5.0'))

View File

@ -1,4 +1,4 @@
name: WorldGuard
main: com.sk89q.worldguard.bukkit.WorldGuardPlugin
version: "${project.version}"
version: "${project.internalVersion}"
softdepend: [WorldEdit, CommandBook]