cleanup build script

This commit is contained in:
Jesse Boyd
2019-07-17 19:43:14 +10:00
parent 2da3367f3d
commit 08dead5a86
10 changed files with 142 additions and 134 deletions

View File

@ -1,6 +1,12 @@
apply plugin: 'java-library'
apply plugin: 'eclipse'
apply plugin: 'idea'
plugins {
id("java-library")
id("eclipse")
id("idea")
id("net.ltgt.apt") version "0.21" apply false
id "net.ltgt.apt-eclipse" version "0.21"
id "net.ltgt.apt-idea" version "0.21"
}
repositories {
maven {url "http://ci.athion.net/job/PlotSquared-Breaking/ws/mvn/"}
}
@ -33,8 +39,8 @@ dependencies {
testCompile 'org.mockito:mockito-core:1.9.0-rc1'
// Fawe depends
compile 'net.fabiozumbi12:redprotect:1.9.6'
compile ("com.github.intellectualsites.plotsquared:PlotSquared-API:latest") {
compileOnly 'net.fabiozumbi12:redprotect:1.9.6'
compileOnly ("com.github.intellectualsites.plotsquared:PlotSquared-API:latest") {
transitive = false
}
compile 'com.mojang:datafixerupper:1.0.20'
@ -43,6 +49,7 @@ dependencies {
}
tasks.withType(JavaCompile).configureEach {
dependsOn(":worldedit-libs:build")
it.options.compilerArgs.add("-Aarg.name.key.prefix=")
}
@ -72,27 +79,29 @@ processResources {
jar.archiveName="fawe-api-${project.parent.version}.jar"
jar.destinationDir = file '../mvn/com/boydti/fawe-api/' + project.parent.version
task createPom << {
pom {
project {
groupId 'com.boydti'
artifactId 'fawe-api'
version project.parent.version
task createPom {
doLast {
pom {
project {
groupId 'com.boydti'
artifactId 'fawe-api'
version project.parent.version
}
}
}
.getEffectivePom()
.setDependencies(new ArrayList<>())
.writeTo("../mvn/com/boydti/fawe-api/${project.parent.version}/fawe-api-${project.parent.version}.pom")
pom {
project {
groupId 'com.boydti'
artifactId 'fawe-api'
version 'latest'
.getEffectivePom()
.setDependencies(new ArrayList<>())
.writeTo("../mvn/com/boydti/fawe-api/${project.parent.version}/fawe-api-${project.parent.version}.pom")
pom {
project {
groupId 'com.boydti'
artifactId 'fawe-api'
version 'latest'
}
}
.getEffectivePom()
.setDependencies(new ArrayList<>())
.writeTo("../mvn/com/boydti/fawe-api/latest/fawe-api-latest.pom")
}
.getEffectivePom()
.setDependencies(new ArrayList<>())
.writeTo("../mvn/com/boydti/fawe-api/latest/fawe-api-latest.pom")
}
task copyFiles {
doLast {

View File

@ -41,6 +41,7 @@ import com.sk89q.worldedit.internal.annotation.Selection;
import com.sk89q.worldedit.math.BlockVector3;
import com.sk89q.worldedit.regions.CuboidRegion;
import com.sk89q.worldedit.regions.Region;
import org.enginehub.piston.annotation.param.Arg;
import org.enginehub.piston.annotation.param.Switch;
import com.sk89q.worldedit.util.command.parametric.Optional;
import com.sk89q.worldedit.world.World;
@ -613,8 +614,7 @@ public class AnvilCommands {
desc = "Paste chunks from your anvil clipboard",
descFooter =
"Paste the chunks from your anvil clipboard.\n" +
"The -c flag will align the paste to the chunks.",
"The -c flag will align the paste to the chunks."
)
@CommandPermissions("worldedit.anvil.pastechunks")
public void paste(Player player, LocalSession session, EditSession editSession, @Switch(name='c', desc = "TODO") boolean alignChunk) throws WorldEditException, IOException {

View File

@ -490,7 +490,7 @@ public class RegionCommands {
@Switch(name = 's', desc = "Shift the selection to the target location")
boolean moveSelection,
@Switch(name = 'a', desc = "Ignore air blocks")
boolean ignoreAirBlocks
boolean ignoreAirBlocks,
@Switch(name='b', desc = "TODO") boolean copyBiomes,
@Switch(name='e', desc = "TODO") boolean skipEntities,

View File

@ -0,0 +1,6 @@
package com.sk89q.worldedit.command.argument;
import org.enginehub.piston.converter.ArgumentConverter;
public class StringValidator implements ArgumentConverter<String> {
}

View File

@ -45,11 +45,18 @@ import com.sk89q.worldedit.command.BiomeCommands;
import com.sk89q.worldedit.command.BiomeCommandsRegistration;
import com.sk89q.worldedit.command.BrushCommands;
import com.sk89q.worldedit.command.ChunkCommands;
import com.sk89q.worldedit.command.ChunkCommandsRegistration;
import com.sk89q.worldedit.command.ClipboardCommands;
import com.sk89q.worldedit.command.ClipboardCommandsRegistration;
import com.sk89q.worldedit.command.ExpandCommands;
import com.sk89q.worldedit.command.GeneralCommands;
import com.sk89q.worldedit.command.GeneralCommandsRegistration;
import com.sk89q.worldedit.command.GenerationCommands;
import com.sk89q.worldedit.command.HistoryCommands;
import com.sk89q.worldedit.command.HistoryCommandsRegistration;
import com.sk89q.worldedit.command.NavigationCommands;
import com.sk89q.worldedit.command.NavigationCommandsRegistration;
import com.sk89q.worldedit.command.PaintBrushCommands;
import com.sk89q.worldedit.command.RegionCommands;
import com.sk89q.worldedit.command.SchematicCommands;
import com.sk89q.worldedit.command.SchematicCommandsRegistration;
@ -210,7 +217,7 @@ public final class PlatformCommandManager {
DirectionConverter.register(worldEdit, commandManager);
FactoryConverter.register(worldEdit, commandManager);
for (int count = 2; count <= 3; count++) {
commandManager.registerConverter(Key.of(double.class, Annotations.radii(count)),
commandManager.registerConverter(Key.of(double.class, com.sk89q.worldedit.extension.platform.Annotations.radii(count)),
CommaSeparatedValuesConverter.wrapAndLimit(ArgumentConverters.get(
TypeToken.of(double.class)
), count)
@ -309,15 +316,15 @@ public final class PlatformCommandManager {
new SuperPickaxeCommands(worldEdit)
);
registerSubCommands(
"brush",
ImmutableList.of("br", "/brush", "/br"),
"Brushing commands",
BrushCommandsRegistration.builder(),
new BrushCommands(worldEdit),
manager -> {
PaintBrushCommands.register(commandManagerService, manager, registration);
ApplyBrushCommands.register(commandManagerService, manager, registration);
}
"brush",
ImmutableList.of("br", "/brush", "/br"),
"Brushing commands",
BrushCommandsRegistration.builder(),
new BrushCommands(worldEdit),
(Consumer<CommandManager>) manager -> {
PaintBrushCommands.register(commandManagerService, manager, registration);
ApplyBrushCommands.register(commandManagerService, manager, registration);
}
);
registerSubCommands(
"worldedit",