mirror of
https://github.com/sekwah41/Advanced-Portals.git
synced 2024-11-25 12:06:17 +01:00
Upgraded gradle build file
This commit is contained in:
parent
e4900a62f4
commit
7a0b65187b
15
build.gradle
15
build.gradle
@ -4,7 +4,7 @@ apply plugin: 'idea'
|
||||
apply plugin: 'eclipse'
|
||||
|
||||
group = 'com.sekwah.advancedportals'
|
||||
version = '0.0.50-snapshot'
|
||||
version = getPluginData("version") + '-snapshot'
|
||||
|
||||
description = ""
|
||||
|
||||
@ -15,6 +15,19 @@ tasks.withType(JavaCompile) {
|
||||
options.encoding = 'UTF-8'
|
||||
}
|
||||
|
||||
String getPluginData(String tag) {
|
||||
File file = new File("src/main/resources/plugin.yml")
|
||||
String version = "notfound"
|
||||
file.readLines("UTF-8").each {String line ->
|
||||
line = line.trim()
|
||||
if(line.startsWith(tag)) {
|
||||
version = line.substring(tag.length() + 2, line.length())
|
||||
}
|
||||
}
|
||||
System.out.println("Advanced Portals v" + version)
|
||||
return version
|
||||
}
|
||||
|
||||
configurations {
|
||||
// configuration that holds jars to copy into lib
|
||||
includeLibs
|
||||
|
Loading…
Reference in New Issue
Block a user