3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-11-05 02:50:05 +01:00

Move shaded libraries to their own artifacts

Dieser Commit ist enthalten in:
Kenzie Togami 2019-04-20 23:11:39 -07:00
Ursprung 5b1573a24e
Commit 1e7b4fc835
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 5D200B325E157A81
22 geänderte Dateien mit 165 neuen und 72 gelöschten Zeilen

Datei anzeigen

@ -82,6 +82,14 @@ artifactory {
artifactoryPublish.skip = true
subprojects {
repositories {
mavenCentral()
maven { url "http://maven.sk89q.com/repo/" }
maven { url "http://repo.maven.apache.org/maven2" }
}
}
configure(['core', 'bukkit', 'forge', 'sponge'].collect { project(":worldedit-$it") }) {
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'checkstyle'
@ -97,12 +105,6 @@ subprojects {
checkstyle.configFile = new File(rootProject.projectDir, "config/checkstyle/checkstyle.xml")
checkstyle.toolVersion = '7.6.1'
repositories {
mavenCentral()
maven { url "http://maven.sk89q.com/repo/" }
maven { url "http://repo.maven.apache.org/maven2" }
}
if (JavaVersion.current().isJava8Compatible()) {
// Java 8 turns on doclint which we fail
tasks.withType(Javadoc) {
@ -136,23 +138,6 @@ subprojects {
build.dependsOn(checkstyleTest)
build.dependsOn(javadocJar)
shadowJar {
classifier 'dist'
dependencies {
include(dependency('com.sk89q:jchronic:0.2.4a'))
include(dependency('com.thoughtworks.paranamer:paranamer:2.6'))
include(dependency('com.sk89q.lib:jlibnoise:1.0.0'))
include(dependency('net.kyori:text-api:2.0.0'))
include(dependency("net.kyori:text-serializer-gson:2.0.0"))
include(dependency("net.kyori:text-serializer-legacy:2.0.0"))
relocate('net.kyori.text', 'com.sk89q.worldedit.util.formatting.text')
}
exclude 'GradleStart**'
exclude '.cache'
exclude 'LICENSE*'
}
artifactoryPublish {
publishConfigs('archives')
}
@ -162,3 +147,16 @@ subprojects {
include '**/*.java'
}
}
configure(['bukkit', 'forge', 'sponge'].collect { project(":worldedit-$it") }) {
shadowJar {
classifier 'dist'
dependencies {
include(project(":worldedit-libs"))
include(project(":worldedit-core"))
}
exclude 'GradleStart**'
exclude '.cache'
exclude 'LICENSE*'
}
}

Datei anzeigen

@ -1,3 +1,8 @@
rootProject.name = 'worldedit'
include 'worldedit-core', 'worldedit-bukkit', 'worldedit-forge', 'worldedit-sponge'
include 'worldedit-libs'
['bukkit', 'core', 'forge', 'sponge'].forEach {
include "worldedit-libs:$it"
include "worldedit-$it"
}

Datei anzeigen

@ -10,12 +10,11 @@ repositories {
dependencies {
compile project(':worldedit-core')
compile project(':worldedit-libs:bukkit')
compile 'com.sk89q:dummypermscompat:1.10'
compile 'org.bukkit:bukkit:1.13.2-R0.1-SNAPSHOT' // zzz
compile 'org.bstats:bstats-bukkit:1.4'
compile "io.papermc:paperlib:1.0.1"
compile 'org.slf4j:slf4j-jdk14:1.7.26'
compile 'net.kyori:text-adapter-bukkit:1.0.3'
testCompile 'org.mockito:mockito-core:1.9.0-rc1'
}

Datei anzeigen

@ -26,8 +26,8 @@ import com.sk89q.worldedit.extension.platform.Actor;
import com.sk89q.worldedit.internal.cui.CUIEvent;
import com.sk89q.worldedit.session.SessionKey;
import com.sk89q.worldedit.util.auth.AuthorizationException;
import net.kyori.text.TextComponent;
import net.kyori.text.adapter.bukkit.TextAdapter;
import com.sk89q.worldedit.util.formatting.text.TextComponent;
import com.sk89q.worldedit.util.formatting.text.adapter.bukkit.TextAdapter;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;

Datei anzeigen

@ -37,8 +37,8 @@ import com.sk89q.worldedit.world.block.BlockStateHolder;
import com.sk89q.worldedit.world.block.BlockTypes;
import com.sk89q.worldedit.world.gamemode.GameMode;
import com.sk89q.worldedit.world.gamemode.GameModes;
import net.kyori.text.TextComponent;
import net.kyori.text.adapter.bukkit.TextAdapter;
import com.sk89q.worldedit.util.formatting.text.TextComponent;
import com.sk89q.worldedit.util.formatting.text.adapter.bukkit.TextAdapter;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.entity.Player;

Datei anzeigen

@ -4,20 +4,15 @@ apply plugin: 'eclipse'
apply plugin: 'idea'
dependencies {
compile project(':worldedit-libs:core')
compile 'de.schlichtherle:truezip:6.8.3'
compile 'rhino:js:1.7R2'
compile 'org.yaml:snakeyaml:1.9'
compile 'com.google.guava:guava:21.0'
compile 'com.sk89q:jchronic:0.2.4a'
compile 'com.google.code.findbugs:jsr305:1.3.9'
compile 'com.thoughtworks.paranamer:paranamer:2.6'
compile 'com.google.code.gson:gson:2.8.0'
compile 'com.sk89q.lib:jlibnoise:1.0.0'
compile 'com.googlecode.json-simple:json-simple:1.1.1'
compile 'org.slf4j:slf4j-api:1.7.26'
compile 'net.kyori:text-api:2.0.0'
compile 'net.kyori:text-serializer-gson:2.0.0'
compile 'net.kyori:text-serializer-legacy:2.0.0'
//compile 'net.sf.trove4j:trove4j:3.0.3'
testCompile 'org.mockito:mockito-core:1.9.0-rc1'
}

Datei anzeigen

@ -62,7 +62,7 @@ import com.sk89q.worldedit.world.block.BaseBlock;
import com.sk89q.worldedit.world.block.BlockState;
import com.sk89q.worldedit.world.item.ItemTypes;
import com.sk89q.worldedit.world.storage.ChunkStore;
import net.kyori.text.Component;
import com.sk89q.worldedit.util.formatting.text.Component;
import java.util.ArrayList;
import java.util.List;
@ -75,7 +75,7 @@ import java.util.Set;
public class SelectionCommands {
private final WorldEdit we;
public SelectionCommands(WorldEdit we) {
this.we = we;
}
@ -294,7 +294,7 @@ public class SelectionCommands {
)
@CommandPermissions("worldedit.wand.toggle")
public void toggleWand(Player player, LocalSession session, CommandContext args) throws WorldEditException {
session.setToolControl(!session.isToolControlEnabled());
if (session.isToolControlEnabled()) {
@ -393,7 +393,7 @@ public class SelectionCommands {
session.getRegionSelector(player.getWorld()).learnChanges();
int newSize = region.getArea();
session.getRegionSelector(player.getWorld()).explainRegionAdjust(player, session);
player.print("Region expanded " + (newSize - oldSize) + " blocks.");
@ -464,7 +464,7 @@ public class SelectionCommands {
}
session.getRegionSelector(player.getWorld()).learnChanges();
int newSize = region.getArea();
session.getRegionSelector(player.getWorld()).explainRegionAdjust(player, session);

Datei anzeigen

@ -65,9 +65,9 @@ import com.sk89q.worldedit.util.formatting.component.Error;
import com.sk89q.worldedit.world.World;
import com.sk89q.worldedit.world.block.BaseBlock;
import com.sk89q.worldedit.world.block.BlockTypes;
import net.kyori.text.Component;
import net.kyori.text.TextComponent;
import net.kyori.text.format.TextColor;
import com.sk89q.worldedit.util.formatting.text.Component;
import com.sk89q.worldedit.util.formatting.text.TextComponent;
import com.sk89q.worldedit.util.formatting.text.format.TextColor;
import java.util.ArrayList;
import java.util.List;
@ -207,7 +207,7 @@ public class UtilityCommands {
@CommandPermissions("worldedit.removeabove")
@Logging(PLACEMENT)
public void removeAbove(Player player, LocalSession session, EditSession editSession, CommandContext args) throws WorldEditException {
int size = args.argsLength() > 0 ? Math.max(1, args.getInteger(0)) : 1;
we.checkMaxRadius(size);
World world = player.getWorld();
@ -275,7 +275,7 @@ public class UtilityCommands {
@CommandPermissions("worldedit.replacenear")
@Logging(PLACEMENT)
public void replaceNear(Player player, LocalSession session, EditSession editSession, CommandContext args) throws WorldEditException {
int size = Math.max(1, args.getInteger(0));
we.checkMaxRadius(size);
int affected;

Datei anzeigen

@ -23,7 +23,7 @@ import com.sk89q.worldedit.internal.cui.CUIEvent;
import com.sk89q.worldedit.session.SessionOwner;
import com.sk89q.worldedit.util.Identifiable;
import com.sk89q.worldedit.util.auth.Subject;
import net.kyori.text.TextComponent;
import com.sk89q.worldedit.util.formatting.text.TextComponent;
import java.io.File;

Datei anzeigen

@ -34,7 +34,7 @@ import com.sk89q.worldedit.util.Location;
import com.sk89q.worldedit.world.World;
import com.sk89q.worldedit.world.block.BlockStateHolder;
import com.sk89q.worldedit.world.gamemode.GameMode;
import net.kyori.text.TextComponent;
import com.sk89q.worldedit.util.formatting.text.TextComponent;
import java.util.UUID;

Datei anzeigen

@ -19,8 +19,8 @@
package com.sk89q.worldedit.util.formatting.component;
import net.kyori.text.TextComponent;
import net.kyori.text.format.TextColor;
import com.sk89q.worldedit.util.formatting.text.TextComponent;
import com.sk89q.worldedit.util.formatting.text.format.TextColor;
/**
* Represents a fragment representing a command that is to be typed.

Datei anzeigen

@ -19,9 +19,9 @@
package com.sk89q.worldedit.util.formatting.component;
import net.kyori.text.Component;
import net.kyori.text.TextComponent;
import net.kyori.text.format.TextColor;
import com.sk89q.worldedit.util.formatting.text.Component;
import com.sk89q.worldedit.util.formatting.text.TextComponent;
import com.sk89q.worldedit.util.formatting.text.format.TextColor;
public class CommandListBox extends MessageBox {

Datei anzeigen

@ -28,8 +28,8 @@ import com.sk89q.worldedit.util.command.CommandMapping;
import com.sk89q.worldedit.util.command.Description;
import com.sk89q.worldedit.util.command.Dispatcher;
import com.sk89q.worldedit.util.command.PrimaryAliasComparator;
import net.kyori.text.Component;
import net.kyori.text.TextComponent;
import com.sk89q.worldedit.util.formatting.text.Component;
import com.sk89q.worldedit.util.formatting.text.TextComponent;
import java.util.ArrayList;
import java.util.List;

Datei anzeigen

@ -19,8 +19,8 @@
package com.sk89q.worldedit.util.formatting.component;
import net.kyori.text.TextComponent;
import net.kyori.text.format.TextColor;
import com.sk89q.worldedit.util.formatting.text.TextComponent;
import com.sk89q.worldedit.util.formatting.text.format.TextColor;
/**
* Represents a fragment representing an error.

Datei anzeigen

@ -19,8 +19,8 @@
package com.sk89q.worldedit.util.formatting.component;
import net.kyori.text.TextComponent;
import net.kyori.text.format.TextColor;
import com.sk89q.worldedit.util.formatting.text.TextComponent;
import com.sk89q.worldedit.util.formatting.text.format.TextColor;
/**
* Represents a fragment representing a label.

Datei anzeigen

@ -21,9 +21,9 @@ package com.sk89q.worldedit.util.formatting.component;
import static com.google.common.base.Preconditions.checkNotNull;
import net.kyori.text.Component;
import net.kyori.text.TextComponent;
import net.kyori.text.format.TextColor;
import com.sk89q.worldedit.util.formatting.text.Component;
import com.sk89q.worldedit.util.formatting.text.TextComponent;
import com.sk89q.worldedit.util.formatting.text.format.TextColor;
/**
* Makes for a box with a border above and below.
@ -67,7 +67,7 @@ public class MessageBox extends TextComponent {
/**
* Get the internal contents.
*
*
* @return the contents
*/
public Component getContents() {

Datei anzeigen

@ -19,8 +19,8 @@
package com.sk89q.worldedit.util.formatting.component;
import net.kyori.text.TextComponent;
import net.kyori.text.format.TextColor;
import com.sk89q.worldedit.util.formatting.text.TextComponent;
import com.sk89q.worldedit.util.formatting.text.format.TextColor;
/**
* Represents a subtle part of the message.

Datei anzeigen

@ -34,7 +34,7 @@ import com.sk89q.worldedit.util.Location;
import com.sk89q.worldedit.world.block.BaseBlock;
import com.sk89q.worldedit.world.block.BlockStateHolder;
import net.kyori.text.TextComponent;
import com.sk89q.worldedit.util.formatting.text.TextComponent;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.item.ItemStack;
import net.minecraft.network.PacketBuffer;

97
worldedit-libs/build.gradle Normale Datei
Datei anzeigen

@ -0,0 +1,97 @@
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
subprojects {
apply plugin: 'maven'
apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: 'com.jfrog.artifactory'
configurations {
create("shade")
}
group = rootProject.group + ".worldedit-libs"
tasks.register("jar", ShadowJar) {
configurations = [project.configurations.shade]
classifier = ""
relocate('net.kyori.text', 'com.sk89q.worldedit.util.formatting.text')
}
def altConfigFiles = { String artifactType ->
def deps = configurations.shade.incoming.dependencies
.collect { it.copy() }
.collect { dependency ->
dependency.artifact { artifact ->
artifact.name = dependency.name
artifact.type = artifactType
artifact.extension = 'jar'
artifact.classifier = artifactType
}
dependency
}
return files(configurations.detachedConfiguration(deps as Dependency[])
.resolvedConfiguration.lenientConfiguration.getArtifacts()
.findAll { it.classifier == artifactType }
.collect { zipTree(it.file) })
}
tasks.register("sourcesJar", Jar) {
from {
altConfigFiles('sources')
}
def filePattern = ~'(.*)net/kyori/text((?:/|$).*)'
def textPattern = ~/net\.kyori\.text/
eachFile {
it.filter { String line ->
line.replaceFirst(textPattern, 'com.sk89q.worldedit.util.formatting.text')
}
it.path = it.path.replaceFirst(filePattern, '$1com/sk89q/worldedit/util/formatting/text$2')
}
classifier = "sources"
}
artifacts {
add("default", jar)
add("default", sourcesJar)
}
tasks.register("install", Upload) {
configuration = configurations.default
repositories.mavenInstaller {
pom.version = project.version
pom.artifactId = project.name
}
}
artifactoryPublish {
publishConfigs('default')
}
build.dependsOn(jar, sourcesJar)
}
project("core") {
dependencies {
shade 'net.kyori:text-api:2.0.0'
shade 'net.kyori:text-serializer-gson:2.0.0'
shade 'net.kyori:text-serializer-legacy:2.0.0'
shade 'com.sk89q:jchronic:0.2.4a'
shade 'com.thoughtworks.paranamer:paranamer:2.6'
shade 'com.sk89q.lib:jlibnoise:1.0.0'
}
}
project("bukkit") {
dependencies {
shade 'net.kyori:text-adapter-bukkit:1.0.3'
shade 'org.bstats:bstats-bukkit:1.4'
}
}
project("sponge") {
dependencies {
shade 'net.kyori:text-adapter-spongeapi:1.0.3'
shade 'org.bstats:bstats-sponge:1.4'
}
}
tasks.register("build") {
dependsOn(subprojects.collect { it.tasks.named("build") })
}

Datei anzeigen

@ -17,9 +17,8 @@ repositories {
dependencies {
compile project(':worldedit-core')
compile project(':worldedit-libs:sponge')
compile 'org.spongepowered:spongeapi:7.1.0'
compile 'org.bstats:bstats-sponge:1.4'
compile 'net.kyori:text-adapter-spongeapi:1.0.3'
testCompile group: 'org.mockito', name: 'mockito-core', version:'1.9.0-rc1'
}

Datei anzeigen

@ -26,8 +26,8 @@ import com.sk89q.worldedit.extension.platform.Actor;
import com.sk89q.worldedit.internal.cui.CUIEvent;
import com.sk89q.worldedit.session.SessionKey;
import com.sk89q.worldedit.util.auth.AuthorizationException;
import net.kyori.text.TextComponent;
import net.kyori.text.adapter.spongeapi.TextAdapter;
import com.sk89q.worldedit.util.formatting.text.TextComponent;
import com.sk89q.worldedit.util.formatting.text.adapter.spongeapi.TextAdapter;
import org.spongepowered.api.command.CommandSource;
import org.spongepowered.api.entity.living.player.Player;
import org.spongepowered.api.text.Text;

Datei anzeigen

@ -36,8 +36,8 @@ import com.sk89q.worldedit.world.gamemode.GameMode;
import com.sk89q.worldedit.world.gamemode.GameModes;
import com.sk89q.worldedit.world.item.ItemTypes;
import net.kyori.text.TextComponent;
import net.kyori.text.adapter.spongeapi.TextAdapter;
import com.sk89q.worldedit.util.formatting.text.TextComponent;
import com.sk89q.worldedit.util.formatting.text.adapter.spongeapi.TextAdapter;
import org.spongepowered.api.Sponge;
import org.spongepowered.api.data.type.HandTypes;
import org.spongepowered.api.entity.living.player.Player;