From aaed3f622a498751fdd56b79f7912bc8db88dd49 Mon Sep 17 00:00:00 2001 From: dordsor21 Date: Fri, 21 Dec 2018 13:38:28 +0000 Subject: [PATCH 1/3] Fix build for gradlew clean assemble build --- Bukkit/build.gradle | 2 +- Core/build.gradle | 2 +- build.gradle | 13 +++++++------ 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/Bukkit/build.gradle b/Bukkit/build.gradle index aa4131cdd..9b807ee0d 100644 --- a/Bukkit/build.gradle +++ b/Bukkit/build.gradle @@ -12,7 +12,7 @@ dependencies { compile("net.milkbowl.vault:VaultAPI:1.6") { exclude module: 'bukkit' } - compileOnly 'org.projectlombok:lombok:1.16.18' + compileOnly 'org.projectlombok:lombok:1.18.4' } sourceCompatibility = 1.8 diff --git a/Core/build.gradle b/Core/build.gradle index f7d9f78eb..ee8cd6834 100644 --- a/Core/build.gradle +++ b/Core/build.gradle @@ -2,7 +2,7 @@ dependencies { testCompile 'junit:junit:4.12' compile 'org.yaml:snakeyaml:1.16' compile 'com.google.code.gson:gson:2.2.4' - compileOnly 'org.projectlombok:lombok:1.16.18' + compileOnly 'org.projectlombok:lombok:1.18.4' } sourceCompatibility = 1.8 diff --git a/build.gradle b/build.gradle index 4d4a3a3bc..d3586fd93 100644 --- a/build.gradle +++ b/build.gradle @@ -1,3 +1,5 @@ +import org.ajoberstar.grgit.Grgit + buildscript { repositories { mavenCentral() @@ -5,7 +7,7 @@ buildscript { jcenter() } dependencies { - classpath 'com.github.jengelman.gradle.plugins:shadow:1.2.3' + classpath 'com.github.jengelman.gradle.plugins:shadow:4.0.2' classpath 'org.ajoberstar:grgit:1.7.0' } configurations.all { @@ -16,7 +18,6 @@ buildscript { } plugins { - id 'maven-publish' id 'io.franzbecker.gradle-lombok' version '1.14' } @@ -27,7 +28,7 @@ def revision = "" def buildNumber = "" def date = "" ext { - git = org.ajoberstar.grgit.Grgit.open(file(".git")) + git = Grgit.open(file(".git")) date = git.head().date.format("yy.MM.dd") revision = "-${git.head().abbreviatedId}" parents = git.head().parentIds; @@ -42,7 +43,7 @@ version = String.format("%s.%s%s%s", rootVersion, date, revision, buildNumber) description = rootProject.name if (project.hasProperty("lzNoVersion")) { // gradle build -PlzNoVersion - version = "unknown"; + version = "unknown" } subprojects { @@ -53,7 +54,7 @@ subprojects { apply plugin: 'com.github.johnrengelman.shadow' lombok { - version = '1.18.2' + version = '1.18.4' sha256 = "" } @@ -63,7 +64,7 @@ subprojects { exclude(module: 'mockito-core') exclude(module: 'dummypermscompat') } - compile 'com.google.guava:guava:10.0' + compile 'com.google.guava:guava:27.0.1-jre' compileOnly 'org.projectlombok:lombok:1.18.4' } clean { From 5fdb60f85de5d65eb9da4b0ff211826883efd596 Mon Sep 17 00:00:00 2001 From: dordsor21 Date: Fri, 21 Dec 2018 13:39:20 +0000 Subject: [PATCH 2/3] Default plot height is at sea level (62) --- .../plot/generator/AugmentedUtils.java | 2 +- .../plot/generator/ClassicPlotWorld.java | 20 +++++++++---------- .../plotsquared/plot/object/Plot.java | 6 +++--- .../plotsquared/plot/object/PlotArea.java | 2 +- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/generator/AugmentedUtils.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/generator/AugmentedUtils.java index bf4199469..1d18cbdcd 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/generator/AugmentedUtils.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/generator/AugmentedUtils.java @@ -81,7 +81,7 @@ public class AugmentedUtils { primaryMask = queue; } LocalBlockQueue secondaryMask; - PlotBlock air = PlotBlock.get((short) 0, (byte) 0); + PlotBlock air = StringPlotBlock.EVERYTHING; if (area.TERRAIN == 2) { PlotManager manager = area.getPlotManager(); final boolean[][] canPlace = new boolean[16][16]; diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/generator/ClassicPlotWorld.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/generator/ClassicPlotWorld.java index 8a0c14a99..197384eaf 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/generator/ClassicPlotWorld.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/generator/ClassicPlotWorld.java @@ -10,21 +10,21 @@ import com.github.intellectualsites.plotsquared.plot.util.StringMan; public abstract class ClassicPlotWorld extends SquarePlotWorld { - public int ROAD_HEIGHT = 64; - public int PLOT_HEIGHT = 64; - public int WALL_HEIGHT = 64; + public int ROAD_HEIGHT = 62; + public int PLOT_HEIGHT = 62; + public int WALL_HEIGHT = 62; public BlockBucket MAIN_BLOCK = BlockBucket.withSingle(PlotBlock.get("stone")); - // new PlotBlock[] {PlotBlock.get("stone")}; - public BlockBucket TOP_BLOCK = BlockBucket.withSingle(PlotBlock.get("grass")); - //new PlotBlock[] {PlotBlock.get("grass")}; + // new PlotBlock[] {PlotBlock.get("stone")}; + public BlockBucket TOP_BLOCK = BlockBucket.withSingle(PlotBlock.get("grass_block")); + //new PlotBlock[] {PlotBlock.get("grass")}; public BlockBucket WALL_BLOCK = BlockBucket.withSingle(PlotBlock.get("stone_slab")); - // PlotBlock.get((short) 44, (byte) 0); + // PlotBlock.get((short) 44, (byte) 0); public BlockBucket CLAIMED_WALL_BLOCK = BlockBucket.withSingle(PlotBlock.get("sandstone_slab")); - // PlotBlock.get((short) 44, (byte) 1); + // PlotBlock.get((short) 44, (byte) 1); public BlockBucket WALL_FILLING = BlockBucket.withSingle(PlotBlock.get("stone")); - //PlotBlock.get((short) 1, (byte) 0); + //PlotBlock.get((short) 1, (byte) 0); public BlockBucket ROAD_BLOCK = BlockBucket.withSingle(PlotBlock.get("quartz_block")); - // PlotBlock.get((short) 155, (byte) 0); + // PlotBlock.get((short) 155, (byte) 0); public boolean PLOT_BEDROCK = true; public ClassicPlotWorld(String worldName, String id, IndependentPlotGenerator generator, diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/Plot.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/Plot.java index 6b7c60889..46d869575 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/Plot.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/Plot.java @@ -1169,7 +1169,7 @@ public class Plot { if (!isLoaded()) return loc; int y = - isLoaded() ? WorldUtil.IMP.getHighestBlock(getWorldName(), loc.getX(), loc.getZ()) : 64; + isLoaded() ? WorldUtil.IMP.getHighestBlock(getWorldName(), loc.getX(), loc.getZ()) : 62; if (area.ALLOW_SIGNS) { y = Math.max(y, getManager().getSignLoc(area, this).getY()); } @@ -1182,7 +1182,7 @@ public class Plot { int x = (largest.maxX >> 1) - (largest.minX >> 1) + largest.minX; int z = largest.minZ - 1; PlotManager manager = getManager(); - int y = isLoaded() ? WorldUtil.IMP.getHighestBlock(getWorldName(), x, z) : 64; + int y = isLoaded() ? WorldUtil.IMP.getHighestBlock(getWorldName(), x, z) : 62; if (area.ALLOW_SIGNS && (y <= 0 || y >= 255)) { y = Math.max(y, manager.getSignLoc(area, this).getY() - 1); } @@ -1258,7 +1258,7 @@ public class Plot { x = bot.getX() + loc.x; z = bot.getZ() + loc.z; } - int y = isLoaded() ? WorldUtil.IMP.getHighestBlock(plot.getWorldName(), x, z) : 64; + int y = isLoaded() ? WorldUtil.IMP.getHighestBlock(plot.getWorldName(), x, z) : 62; return new Location(plot.getWorldName(), x, y + 1, z); } // Side diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/PlotArea.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/PlotArea.java index 224dd0a1c..a8e1a3bb4 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/PlotArea.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/object/PlotArea.java @@ -955,7 +955,7 @@ public abstract class PlotArea { public void addCluster(PlotCluster plotCluster) { if (this.clusters == null) { - this.clusters = new QuadMap(Integer.MAX_VALUE, 0, 0, 64) { + this.clusters = new QuadMap(Integer.MAX_VALUE, 0, 0, 62) { @Override public RegionWrapper getRegion(PlotCluster value) { return new RegionWrapper(value.getP1().x, value.getP2().x, value.getP1().y, value.getP2().y); From 886081e27fa460468b8094ffdbd9a27df94d2e80 Mon Sep 17 00:00:00 2001 From: dordsor21 Date: Fri, 21 Dec 2018 16:26:19 +0000 Subject: [PATCH 3/3] The local build was a fluke, and I couldn't work it out in the last 3 hours, so here are some basic updates/cleanup to a few things, and an updated bui;d command in README.md --- Bukkit/build.gradle | 5 +++-- Core/build.gradle | 37 +++++++++++++++++++------------------ build.gradle | 13 ++++++++----- 3 files changed, 30 insertions(+), 25 deletions(-) diff --git a/Bukkit/build.gradle b/Bukkit/build.gradle index 9b807ee0d..ffde75600 100644 --- a/Bukkit/build.gradle +++ b/Bukkit/build.gradle @@ -7,9 +7,10 @@ repositories { dependencies { compile project(':Core') + testCompile project(':Core') compile 'org.spigotmc:spigot-api:1.13.2-R0.1-SNAPSHOT' compile(group: 'com.sk89q.worldedit', name: 'worldedit-bukkit', version: '7.0.0-SNAPSHOT') - compile("net.milkbowl.vault:VaultAPI:1.6") { + compile("net.milkbowl.vault:VaultAPI:1.7") { exclude module: 'bukkit' } compileOnly 'org.projectlombok:lombok:1.18.4' @@ -44,4 +45,4 @@ shadowJar.doLast { ant.checksum file: task.archivePath } -build.dependsOn(shadowJar); +build.dependsOn(shadowJar) diff --git a/Core/build.gradle b/Core/build.gradle index ee8cd6834..b0deac29f 100644 --- a/Core/build.gradle +++ b/Core/build.gradle @@ -1,10 +1,9 @@ dependencies { testCompile 'junit:junit:4.12' - compile 'org.yaml:snakeyaml:1.16' - compile 'com.google.code.gson:gson:2.2.4' + compile 'org.yaml:snakeyaml:1.23' + compile 'com.google.code.gson:gson:2.8.5' compileOnly 'org.projectlombok:lombok:1.18.4' } - sourceCompatibility = 1.8 targetCompatibility = 1.8 @@ -21,21 +20,23 @@ processResources { jar.archiveName = "plotsquared-api-${project.parent.version}.jar" jar.destinationDir = file '../mvn/com/plotsquared/plotsquared-api/' + project.parent.version -task createPom << { - pom { - project { - groupId 'com.plotsquared' - artifactId 'plotsquared-api' - version project.parent.version - } - }.writeTo("../mvn/com/plotsquared/plotsquared-api/${project.parent.version}/plotsquared-api-${project.parent.version}.pom") - pom { - project { - groupId 'com.plotsquared' - artifactId 'plotsquared-api' - version 'latest' - } - }.writeTo("../mvn/com/plotsquared/plotsquared-api/latest/plotsquared-api-latest.pom") +task createPom { + doLast { + pom { + project { + groupId 'com.plotsquared' + artifactId 'plotsquared-api' + version project.parent.version + } + }.writeTo("../mvn/com/plotsquared/plotsquared-api/${project.parent.version}/plotsquared-api-${project.parent.version}.pom") + pom { + project { + groupId 'com.plotsquared' + artifactId 'plotsquared-api' + version 'latest' + } + }.writeTo("../mvn/com/plotsquared/plotsquared-api/latest/plotsquared-api-latest.pom") + } } task copyFiles { diff --git a/build.gradle b/build.gradle index d3586fd93..8e2fdcf5d 100644 --- a/build.gradle +++ b/build.gradle @@ -8,11 +8,11 @@ buildscript { } dependencies { classpath 'com.github.jengelman.gradle.plugins:shadow:4.0.2' - classpath 'org.ajoberstar:grgit:1.7.0' + classpath 'org.ajoberstar.grgit:grgit-gradle:3.0.0' } configurations.all { resolutionStrategy { - force 'org.ow2.asm:asm:6.0_BETA' + force 'org.ow2.asm:asm:7.0' } } } @@ -21,15 +21,15 @@ plugins { id 'io.franzbecker.gradle-lombok' version '1.14' } -group = 'com.intellectualcrafters' +group = 'com.github.intellectualsites,plotsquared' def rootVersion = "4" def revision = "" def buildNumber = "" def date = "" ext { - git = Grgit.open(file(".git")) - date = git.head().date.format("yy.MM.dd") + git = Grgit.open(dir: '.git') + date = git.head().getDate().format("yy.MM.dd") revision = "-${git.head().abbreviatedId}" parents = git.head().parentIds; index = 0; // Offset to match CI @@ -53,6 +53,8 @@ subprojects { apply plugin: 'idea' apply plugin: 'com.github.johnrengelman.shadow' + group = 'com.github.intellectualsites,plotsquared' + lombok { version = '1.18.4' sha256 = "" @@ -66,6 +68,7 @@ subprojects { } compile 'com.google.guava:guava:27.0.1-jre' compileOnly 'org.projectlombok:lombok:1.18.4' + testImplementation "junit:junit:4.12" } clean { delete file("../target")