diff --git a/Plan/build.gradle b/Plan/build.gradle index 912d0e9db..6b9c62f07 100644 --- a/Plan/build.gradle +++ b/Plan/build.gradle @@ -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" } diff --git a/Plan/nukkit/build.gradle b/Plan/nukkit/build.gradle index b1a7f9565..ec5f43e79 100644 --- a/Plan/nukkit/build.gradle +++ b/Plan/nukkit/build.gradle @@ -1,9 +1,3 @@ -repositories { - maven { // Nukkit Repository - url = "http://repo.nukkitx.com/main" - } -} - dependencies { compile project(path: ":common", configuration: 'shadow') compileOnly project(":api") diff --git a/Plan/sponge/build.gradle b/Plan/sponge/build.gradle index 98ce0cd33..f92ab09da 100644 --- a/Plan/sponge/build.gradle +++ b/Plan/sponge/build.gradle @@ -4,7 +4,7 @@ plugins { blossom { replaceTokenIn('src/main/java/com/djrapitops/plan/PlanSponge.java') - replaceToken('@version@', "$fullVersion") + replaceToken('@version@', '' + project.ext.fullVersion) } dependencies {