Fixed some gradle issues

This commit is contained in:
Rsl1122 2019-12-08 11:30:53 +02:00
parent 2877fdc5ca
commit a1168ba749
3 changed files with 17 additions and 18 deletions

View File

@ -18,25 +18,27 @@ plugins {
apply plugin: 'nebula-aggregate-javadocs'
def determineBuildVersion = {
def buildInfo = new ByteArrayOutputStream()
exec {
commandLine 'git', 'rev-list', '--count', 'HEAD'
standardOutput = buildInfo
}
// Magic number: git rev-list --count cdb13e3b663b18e3938ad5efc60d165fa9301f6e
return Integer.parseInt(buildInfo.toString().replaceAll("[^0-9]", "")) - 3529
}
def buildVersion = determineBuildVersion()
allprojects {
wrapper.gradleVersion = "5.5.1"
group "com.djrapitops"
version "5.0-SNAPSHOT"
def determineBuildVersion = {
def buildInfo = new ByteArrayOutputStream()
exec {
commandLine 'git', 'rev-list', '--count', 'HEAD', '^cdb13e3b663b18e3938ad5efc60d165fa9301f6e'
standardOutput = buildInfo
}
return buildInfo.toString().replaceAll("[^0-9]", "")
}
ext.majorVersion = '5'
ext.minorVersion = '0'
ext.buildVersion = determineBuildVersion()
ext.fullVersion = "$majorVersion.$minorVersion build $buildVersion"
ext.buildVersion = buildVersion
ext.fullVersion = project.ext.majorVersion + '.' + project.ext.minorVersion + ' build ' + project.ext.buildVersion
test {
useJUnitPlatform()
@ -115,6 +117,9 @@ subprojects {
maven { // Velocity Repository
url = "https://repo.velocitypowered.com/snapshots/"
}
maven { // Nukkit Repository
url = "http://repo.nukkitx.com/main"
}
maven { // bStats Repository
url = "https://repo.codemc.org/repository/maven-public"
}

View File

@ -1,9 +1,3 @@
repositories {
maven { // Nukkit Repository
url = "http://repo.nukkitx.com/main"
}
}
dependencies {
compile project(path: ":common", configuration: 'shadow')
compileOnly project(":api")

View File

@ -4,7 +4,7 @@ plugins {
blossom {
replaceTokenIn('src/main/java/com/djrapitops/plan/PlanSponge.java')
replaceToken('@version@', "$fullVersion")
replaceToken('@version@', '' + project.ext.fullVersion)
}
dependencies {