Switch to Gradle. Use git log --follow for history.

This converts the project into a multi-module Gradle build.

By default, Git does not show history past a rename, so use git log
--follow to see further history.
Dieser Commit ist enthalten in:
sk89q 2014-11-14 11:27:39 -08:00
Ursprung 44559cde68
Commit 7192780251
714 geänderte Dateien mit 333 neuen und 834 gelöschten Zeilen

13
.gitignore vendored
Datei anzeigen

@ -3,17 +3,20 @@
/.settings
/eclipse
/.idea
/*.iml
/*.ipr
/*.iws
*.iml
*.ipr
*.iws
/bin
/build
/target
/gradle
/.gradle
.gradle
/forge-download
/out
/*/build
/run
/worldedit-forge/run
/dependency-reduced-pom.xml
*-private.sh
*-private.sh

Datei anzeigen

@ -5,7 +5,5 @@ before_install: chmod +x gradlew
install: ./gradlew setupCIWorkspace -S
matrix:
include:
- jdk: oraclejdk7
script: mvn clean package
- jdk: oraclejdk7
script: ./gradlew build -S

Datei anzeigen

@ -1,76 +1,42 @@
Compiling
=========
You can (most easily) compile WorldEdit using one of the build scripts.
You can compile WorldEdit as long as you have the [Java Development Kit (JDK)](http://www.oracle.com/technetwork/java/javase/downloads/index-jsp-138363.html) for Java 7 or newer. You only need one version of JDK installed.
* **Maven** is for compiling **API**, **Bukkit**, and **Spout** versions
* **Gradle** is for the **Forge** version
The build process uses Gradle, which you do *not* need to download. WorldEdit is a multi-module project with three modules:
WorldEdit is written and targetted for Java 6, but you can use newer
versions of Java to compile WorldEdit, though the compiler will give
you warnings. However, if you plan on compiling for Forge, you have
no choice in the matter and you **must** use Java 7 (make sure that it
is set as your 'default' Java too, if you have multiple versions).
* `worldedit-core` contains WorldEdit
* `worldedit-bukkit` is the Bukkit plugin
* `worldedit-forge` is the Forge mod
The Java Development Kit is required, so install the latest version
either from Oracle's website or, if you're a Linux/BSD user, you
can also try using OpenJDK.
## To compile...
* [Get Oracle JDK 7 and 8](http://www.oracle.com/technetwork/java/javase/downloads/index-jsp-138363.html)
* [Get Oracle JDK 6](http://www.oracle.com/technetwork/java/javasebusiness/downloads/java-archive-downloads-javase6-419409.html)
### On Windows
Dependencies
------------
1. Shift + right click the folder with WorldEdit's files and click "Open command prompt".
2. `gradlew clean setupDecompWorkspace`
3. `gradlew build`
WorldEdit requires several other dependencies, but thankfully, the build
scripts provided will automatically download these for you. If, for some
reason, compilation fails due to a missing dependency, please notify us.
### On Linux, BSD, or Mac OS X
Maven
-----
1. In your terminal, navigate to the folder with WorldEdit's files (`cd /folder/of/worldedit/files`)
2. `./gradlew clean setupDevWorkspace`
3. `./gradlew build`
**Don't have Maven?** [Download Maven](http://maven.apache.org/download.cgi)
from the Maven website.
## Then you will find...
From WorldEdit's directory, execute the following command to compile a
Bukkit version:
You will find:
mvn clean package
* The core WorldEdit API in **worldedit-core/build/libs**
* WorldEdit for Bukkit in **worldedit-bukkit/build/libs**
* WorldEdit for Forge in **worldedit-forge/build/libs**
Once done, the *target/* folder will contain a .jar file and release .zip
files.
If you want to use WorldEdit, use the `-shadow` version.
### Other Variations
(The -shadow version includes WorldEdit + necessary libraries.)
By default, the *Bukkit* profile is enabled, but you can disable it
and enable other profiles.
## Other commands
* `mvn clean package -P !bukkit` for just the API
* `mvn clean package -P !bukkit -P spout` for the Spout version
Gradle
------
**Note:** As mentioned previously, you need Java 7 (a recent version) to
execute the following steps successfully. Your `JAVA_HOME` environment
variable needs to be set to the path of JDK 7+.
**Don't have Gradle?** Replace `gradle` with `gradlew` below, which will
automatically download a copy of Gradle for you.
From WorldEdit's directory, clean the cache first with the following
command:
gradle cleancache --refresh-dependencies
Build WorldEdit for Forge with:
gradle setupDecompWorkspace
gradle build
Once complete, you will find the release .jar in the folder *build/libs*.
### Other Tasks
* `gradle idea` will generate an [IntelliJ IDEA](http://www.jetbrains.com/idea/) workspace
* `gradle eclipse` will generate an [Eclipse](https://www.eclipse.org/downloads/) workspace
* `gradlew idea` will generate an [IntelliJ IDEA](http://www.jetbrains.com/idea/) module for the Forge module.
* `gradlew eclipse` will generate an [Eclipse](https://www.eclipse.org/downloads/) project for the Forge version.
* Use `setupCIWorkspace` instead of `setupDevWorkspace` if you are doing this on a CI server.

Datei anzeigen

@ -1,121 +1,126 @@
/*
* Build script for the Forge version of WorldEdit
*/
println """
*******************************************
You are building WorldEdit!
If you encounter trouble:
1) Read COMPILING.md if you haven't yet
2) Try running 'build' in a separate Gradle run
3) Use gradlew and not gradle
4) If you still need help, ask on IRC! irc.esper.net #sk89q
Output files will be in [subproject]/build/libs
*******************************************
"""
// Add ForgeGradle as a dependency for the build script
buildscript {
repositories {
mavenCentral()
maven {
name = "forge"
url = "http://files.minecraftforge.net/maven"
}
maven {
name = "sonatype"
url = "https://oss.sonatype.org/content/repositories/snapshots/"
}
maven { url = "https://oss.sonatype.org/content/repositories/snapshots/" }
jcenter()
}
dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT'
classpath 'com.github.jengelman.gradle.plugins:shadow:1.1.1'
classpath 'org.jfrog.buildinfo:build-info-extractor-gradle:3.0.1'
classpath 'org.ajoberstar:gradle-git:0.12.0'
}
}
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'forge'
apply plugin: 'com.github.johnrengelman.shadow'
if (!project.hasProperty("artifactory_contextUrl")) ext.artifactory_contextUrl = "http://localhost"
if (!project.hasProperty("artifactory_user")) ext.artifactory_user = "guest"
if (!project.hasProperty("artifactory_password")) ext.artifactory_password = ""
group = 'com.sk89q'
version = '6.0.0-SNAPSHOT' + System.getProperty("worldedit.build.suffix", "")
archivesBaseName = "worldedit-forge"
description = "An in-game voxel map editor for Minecraft."
sourceCompatibility = 1.6
targetCompatibility = 1.6
repositories {
mavenCentral()
maven { url "http://repo.bukkit.org/content/groups/public" }
maven { url "http://maven.sk89q.com/repo/" }
maven { url "http://repo.maven.apache.org/maven2" }
if (!project.hasProperty("gitCommitHash")) {
try {
def repo = Grgit.open(project.file('.'))
ext.gitCommitHash = repo.head().abbreviatedId
} catch (Exception e) {
ext.gitCommitHash = "no_git_id"
}
}
dependencies {
compile group: 'de.schlichtherle', name: 'truezip', version:'6.8.3'
compile group: 'rhino', name: 'js', version:'1.7R2'
compile group: 'org.yaml', name: 'snakeyaml', version:'1.9'
compile group: 'com.google.guava', name: 'guava', version:'10.0.1'
compile group: 'com.sk89q', name: 'jchronic', version:'0.2.4a'
compile group: 'com.google.code.findbugs', name: 'jsr305', version: '1.3.9'
compile group: 'com.thoughtworks.paranamer', name: 'paranamer', version: '2.6'
compile group: 'com.google.code.gson', name: 'gson', version: '2.2.4'
compile group: 'com.sk89q.lib', name: 'jlibnoise', version: '1.0.0'
//compile group: 'net.sf.trove4j', name: 'trove4j', version: '3.0.3'
testCompile group: 'org.mockito', name: 'mockito-core', version:'1.9.0-rc1'
}
subprojects {
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'checkstyle'
apply plugin: 'com.github.johnrengelman.shadow'
apply plugin: 'com.jfrog.artifactory-upload'
sourceSets {
main {
java {
srcDir 'src/main/java'
srcDir 'src/legacy/java'
srcDir 'src/forge/java'
}
resources {
srcDir 'src/main/resources'
srcDir 'src/forge/resources'
group = 'com.sk89q.worldedit'
version = '6.0.0-SNAPSHOT'
ext.internalVersion = version + ";" + gitCommitHash
sourceCompatibility = 1.6
targetCompatibility = 1.6
checkstyle.configFile = new File(rootProject.projectDir, "config/checkstyle/checkstyle.xml")
repositories {
mavenCentral()
maven { url "http://repo.bukkit.org/content/groups/public" }
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) {
options.addStringOption('Xdoclint:none', '-quiet')
}
}
}
minecraft {
ext.forgeVersion = "10.13.1.1225"
version = "1.7.10-$forgeVersion"
replaceIn "com/sk89q/worldedit/forge/ForgeWorldEdit.java"
replace "%VERSION%", project.version
}
processResources {
from (sourceSets.main.resources.srcDirs) {
expand 'version': project.version, 'mcVersion': project.minecraft.version,
'forgeVersion': project.minecraft.forgeVersion
include 'mcmod.info'
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
from (sourceSets.main.resources.srcDirs) {
exclude 'mcmod.info'
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
}
// shade needed runtime dependencies
shadowJar {
classifier 'shadow'
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'))
artifacts {
archives jar
archives sourcesJar
archives javadocJar
}
exclude 'GradleStart**'
exclude '.cache'
}
// ensure reobf happens
reobf.reobf(shadowJar) { spec ->
spec.classpath = sourceSets.main.compileClasspath;
}
build.dependsOn(checkstyleMain)
build.dependsOn(checkstyleTest)
build.dependsOn(sourcesJar)
build.dependsOn(javadocJar)
task deleteOrig(type: Delete) {
delete project.tasks.jar.archivePath.getPath()
}
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'))
}
exclude 'GradleStart**'
exclude '.cache'
exclude 'LICENSE*'
}
task deleteShaded(type: Delete) {
delete project.tasks.shadowJar.archivePath.getPath()
}
artifactory {
contextUrl = "${artifactory_contextUrl}"
publish {
repository {
repoKey = project.version.contains("SNAPSHOT") ? 'libs-snapshot-local' : 'libs-release-local'
username = "${artifactory_user}"
password = "${artifactory_password}"
maven = true
}
}
shadowJar.dependsOn(deleteShaded)
build.dependsOn(shadowJar)
resolve {
repository {
repoKey = 'repo'
username = "${artifactory_user}"
password = "${artifactory_password}"
maven = true
}
}
}
}

Datei anzeigen

@ -0,0 +1,64 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE module PUBLIC
"-//Puppy Crawl//DTD Check Configuration 1.3//EN"
"http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
<module name="Checker">
<!-- Tabs are strictly banned -->
<module name="FileTabCharacter"/>
<module name="TreeWalker">
<!-- Important basics -->
<!-- <module name="PackageDeclaration"/> Unlikely that we would miss this in a PR -->
<module name="OuterTypeFilename"/> <!-- TypeName -> TypeName.java -->
<!--
Control package usage, so people don't insert Bukkit into WE where it shouldn't belong, etc.
It is a bit draconian, so update as necessary!
-->
<module name="ImportControl">
<property name="file" value="${basedir}/config/checkstyle/import-control.xml"/>
</module>
<!-- Code -->
<module name="HideUtilityClassConstructor"/> <!-- Utility classes should not have a constructor -->
<module name="CovariantEquals"/>
<module name="EqualsHashCode"/> <!-- equals() and hashCode() go together -->
<module name="NestedTryDepth"> <!-- SHOULD not need to adjust this -->
<property name="max" value="2"/>
</module>
<module name="SuperFinalize"/> <!-- We don't actually use this -->
<module name="JUnitTestCase"/> <!-- Checks tearDown(), setUp() etc. -->
<!-- Style -->
<module name="LeftCurly"> <!-- Left brace never goes on another line -->
<property name="option" value="eol"/>
</module> <!-- We don't check right brance -->
<module name="DefaultComesLast"/> <!-- default case in switch should be last -->
<module name="GenericWhitespace"/>
<!-- Naming -->
<module name="ClassTypeParameterName">
<property name="format" value="^[A-Z][a-zA-Z0-9]*$"/>
</module>
<module name="LocalFinalVariableName"/>
<module name="LocalVariableName">
<property name="format" value="^[a-z_][a-zA-Z0-9]*$"/>
</module>
<module name="MemberName">
<property name="format" value="^[a-z_][a-zA-Z0-9]*$"/>
</module>
<module name="MethodName">
<property name="format" value="^[a-z][a-zA-Z0-9]*$"/>
</module>
<!-- <module name="PackageName"/> Unlikely that we would miss this in a PR -->
<module name="ParameterName"/>
<!-- <module name="TypeName"/> Unlikely that we would miss this in a PR -->
</module>
<!-- Require the header, something that many people forget and we hate to fix -->
<!-- You should configure the header in your IDE -->
<module name="Header">
<property name="headerFile" value="${basedir}/config/checkstyle/header.txt"/>
<property name="fileExtensions" value="java"/>
</module>
</module>

0
gradlew vendored Normale Datei → Ausführbare Datei
Datei anzeigen

673
pom.xml
Datei anzeigen

@ -1,673 +0,0 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.sk89q</groupId>
<artifactId>worldedit</artifactId>
<version>6.0.0-SNAPSHOT</version>
<packaging>jar</packaging>
<!-- Fix encoding warnings -->
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<!--
=====================================
Project Information
=====================================
-->
<name>WorldEdit</name>
<inceptionYear>2010</inceptionYear>
<url>http://wiki.sk89q.com/wiki/WorldEdit</url>
<description>An in-game voxel map editor for Minecraft.</description>
<licenses>
<license>
<name>GNU General Public License 2.0</name>
<url>LICENSE.txt</url>
<distribution>repo</distribution>
<comments>License on WorldEdit</comments>
</license>
<license>
<name>GNU Lesser General Public License 3.0</name>
<url>LICENSE_LGPL.txt</url>
<distribution>repo</distribution>
<comments>License on all new contributions</comments>
</license>
</licenses>
<issueManagement>
<system>YouTrack</system>
<url>http://youtrack.sk89q.com</url>
</issueManagement>
<ciManagement>
<system>TeamCity</system>
<url>http://builds.enginehub.org</url>
</ciManagement>
<scm>
<connection>scm:git:git://github.com/sk89q/worldedit.git</connection>
<developerConnection>scm:git:git@github.com:sk89q/worldedit.git</developerConnection>
<url>https://github.com/sk89q/worldedit</url>
<tag>master</tag>
</scm>
<mailingLists>
<mailingList>
<name>Developer Discussion</name>
<archive>https://groups.google.com/d/forum/sk-dev-discuss</archive>
</mailingList>
</mailingLists>
<!--
=====================================
Distribution Management
=====================================
-->
<distributionManagement>
<site>
<id>sk89q-docs-upload</id>
<url>ftp://sk89q-maven-deploy/worldedit/</url>
</site>
<!-- The CI server uses these -->
<repository>
<id>maven.sk89q.com</id>
<url>http://maven.sk89q.com/artifactory/libs-release-local</url>
</repository>
<snapshotRepository>
<id>maven.sk89q.com-snapshot</id>
<url>http://maven.sk89q.com/artifactory/libs-snapshot-local</url>
</snapshotRepository>
</distributionManagement>
<!--
=====================================
Dependencies
=====================================
-->
<repositories>
<repository>
<id>maven.sk89q.com</id>
<url>http://maven.sk89q.com/repo/</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>sk89q-repo</id>
<url>http://maven.sk89q.com/repo/</url>
</pluginRepository>
</pluginRepositories>
<dependencies>
<!-- Used for snapshots -->
<dependency>
<groupId>de.schlichtherle</groupId>
<artifactId>truezip</artifactId>
<version>6.8.3</version>
<scope>compile</scope> <!-- optional runtime dependency -->
<type>jar</type>
</dependency>
<!-- Used for scripting -->
<dependency>
<groupId>rhino</groupId>
<artifactId>js</artifactId>
<version>1.7R2</version>
<scope>compile</scope> <!-- optional runtime dependency -->
<type>jar</type>
</dependency>
<!-- YAML processing -->
<dependency>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
<version>1.9</version>
<type>jar</type>
<scope>compile</scope> <!-- optional runtime dependency -->
<optional>true</optional>
</dependency>
<!-- It's Guava -->
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>10.0.1</version> <!-- Bukkit only bundles 10.0.1 -->
<scope>compile</scope> <!-- required runtime dependency -->
<type>jar</type>
</dependency>
<!-- JSON parser -->
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.2.4</version>
<optional>true</optional>
</dependency>
<!-- Optimized collections -->
<!--<dependency>
<groupId>net.sf.trove4j</groupId>
<artifactId>trove4j</artifactId>
<version>3.0.3</version>
<optional>true</optional>
</dependency> disabled until we can shadow this in Forge -->
<!-- @Nullable etc. -->
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
<version>1.3.9</version>
</dependency>
<!-- Used for time operations -->
<dependency>
<groupId>com.sk89q</groupId>
<artifactId>jchronic</artifactId> <!-- not the original library -->
<version>0.2.4a</version>
<scope>compile</scope> <!-- shaded -->
<type>jar</type>
</dependency>
<!-- Method names for the command framework -->
<dependency>
<groupId>com.thoughtworks.paranamer</groupId>
<artifactId>paranamer</artifactId>
<version>2.6</version>
<scope>compile</scope>
<type>jar</type>
</dependency>
<!-- Noise library -->
<dependency>
<groupId>com.sk89q.lib</groupId>
<artifactId>jlibnoise</artifactId>
<version>1.0.0</version>
<optional>true</optional>
</dependency>
<!-- Unit tests -->
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>1.9.0-rc1</version>
<scope>test</scope>
<type>jar</type>
</dependency>
</dependencies>
<!--
=====================================
Build
=====================================
-->
<build>
<defaultGoal>install</defaultGoal>
<sourceDirectory>${basedir}/src/main/java/</sourceDirectory>
<resources>
<!-- Data files -->
<resource>
<targetPath>.</targetPath>
<filtering>false</filtering>
<directory>${basedir}/src/main/resources/</directory>
<includes>
<include>**/*.json</include>
</includes>
</resource>
</resources>
<!-- Used for uploading the docs -->
<extensions>
<extension>
<groupId>org.apache.maven.wagon</groupId>
<artifactId>wagon-ftp</artifactId>
<version>1.0-beta-6</version>
</extension>
</extensions>
<plugins>
<!-- Add source folder -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.7</version>
<executions>
<execution>
<id>add-source</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>${basedir}/src/legacy/java/</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
<!-- Check style -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>2.12</version>
<executions>
<execution>
<id>verify-style</id>
<phase>validate</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
<configuration>
<sourceDirectory>${basedir}/src</sourceDirectory>
<consoleOutput>true</consoleOutput>
<failsOnError>true</failsOnError>
<logViolationsToConsole>true</logViolationsToConsole>
<checkstyleRules>
<module name="Checker">
<!-- Tabs are strictly banned -->
<module name="FileTabCharacter"/>
<module name="TreeWalker">
<!-- Important basics -->
<!-- <module name="PackageDeclaration"/> Unlikely that we would miss this in a PR -->
<module name="OuterTypeFilename"/> <!-- TypeName -> TypeName.java -->
<!--
Control package usage, so people don't insert Bukkit into WE where it shouldn't belong, etc.
It is a bit draconian, so update as necessary!
-->
<module name="ImportControl">
<property name="file" value="${basedir}/src/main/build/import-control.xml"/>
</module>
<!-- Code -->
<module name="HideUtilityClassConstructor"/> <!-- Utility classes should not have a constructor -->
<module name="CovariantEquals"/>
<module name="EqualsHashCode"/> <!-- equals() and hashCode() go together -->
<module name="NestedTryDepth"> <!-- SHOULD not need to adjust this -->
<property name="max" value="2"/>
</module>
<module name="SuperFinalize"/> <!-- We don't actually use this -->
<module name="JUnitTestCase"/> <!-- Checks tearDown(), setUp() etc. -->
<!-- Style -->
<module name="LeftCurly"> <!-- Left brace never goes on another line -->
<property name="option" value="eol"/>
</module> <!-- We don't check right brance -->
<module name="DefaultComesLast"/> <!-- default case in switch should be last -->
<module name="GenericWhitespace"/>
<!-- Naming -->
<module name="ClassTypeParameterName">
<property name="format" value="^[A-Z][a-zA-Z0-9]*$"/>
</module>
<module name="LocalFinalVariableName"/>
<module name="LocalVariableName">
<property name="format" value="^[a-z_][a-zA-Z0-9]*$"/>
</module>
<module name="MemberName">
<property name="format" value="^[a-z_][a-zA-Z0-9]*$"/>
</module>
<module name="MethodName">
<property name="format" value="^[a-z][a-zA-Z0-9]*$"/>
</module>
<!-- <module name="PackageName"/> Unlikely that we would miss this in a PR -->
<module name="ParameterName"/>
<!-- <module name="TypeName"/> Unlikely that we would miss this in a PR -->
</module>
<!-- Require the header, something that many people forget and we hate to fix -->
<!-- You should configure the header in your IDE -->
<module name="Header">
<property name="headerFile" value="${basedir}/src/main/build/header.txt"/>
<property name="fileExtensions" value="java"/>
</module>
</module>
</checkstyleRules>
</configuration>
</plugin>
<!-- Compiler -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<!-- JAR plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.3.1</version>
<configuration>
<archive>
<addMavenDescriptor>true</addMavenDescriptor>
<manifest>
<addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
</manifest>
<manifestEntries>
<Class-Path>truezip.jar WorldEdit/truezip.jar js.jar WorldEdit/js.jar</Class-Path>
<!-- This is a legacy manifest entry for older versions of
WorldEdit (like really old) -->
<WorldEdit-Version>${project.version}</WorldEdit-Version>
</manifestEntries>
</archive>
</configuration>
</plugin>
<!-- Shades -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>1.7.1</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<minimizeJar>true</minimizeJar>
<artifactSet>
<includes>
<include>com.sk89q:jchronic</include>
<include>com.thoughtworks.paranamer:paranamer</include>
<include>com.google.code.gson:gson</include>
<include>com.sk89q.lib:jlibnoise</include>
<!-- <include>net.sf.trove4j:trove4j</include> -->
</includes>
</artifactSet>
<relocations>
<!-- <relocation>
<pattern>gnu.trove</pattern>
<shadedPattern>com.sk89q.worldedit.internal.trove</shadedPattern>
</relocation> -->
<relocation>
<pattern>com.google.gson</pattern>
<shadedPattern>com.sk89q.worldedit.internal.gson</shadedPattern>
</relocation>
</relocations>
</configuration>
</execution>
</executions>
</plugin>
<!-- Assembly builds .zip, etc. -->
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.2-beta-2</version>
<configuration>
<descriptor>${basedir}/src/main/assembly/default.xml</descriptor>
</configuration>
<executions>
<execution>
<id>release</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Release plugin -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>2.3.2</version>
<configuration>
<preparationGoals>assembly:assembly</preparationGoals>
<goals>assembly:assembly</goals>
<tagNameFormat>@{project.version}</tagNameFormat>
</configuration>
</plugin>
<!-- Test runner -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.7.2</version>
<configuration>
<excludes>
<exclude>**/TestOfflinePermissible.java</exclude>
</excludes>
</configuration>
</plugin>
<!-- Attach docs -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.2.1</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Generate Javadocs -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.8.1</version>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- Site builder -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.1</version>
<configuration>
<reportPlugins>
<!-- Project information -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>2.5</version>
<reportSets>
<reportSet>
<reports>
<report>license</report>
<report>index</report>
</reports>
</reportSet>
</reportSets>
</plugin>
<!-- Javadocs -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.8.1</version>
</plugin>
</reportPlugins>
</configuration>
</plugin>
</plugins>
</build>
<!--
=====================================
Profiles
=====================================
-->
<profiles>
<!--
=====================================
Bukkit
=====================================
-->
<profile>
<id>bukkit</id>
<activation>
<property>
<name>!skipBukkitProfile</name>
</property>
</activation>
<repositories>
<repository>
<id>bukkit-repo</id>
<url>http://repo.bukkit.org/content/groups/public</url>
</repository>
</repositories>
<dependencies>
<!-- Used for Permissions support (this version has both the legacy API
and the new Permissions API to compile against -->
<dependency>
<groupId>com.sk89q</groupId>
<artifactId>dummypermscompat</artifactId>
<version>1.7</version>
<scope>compile</scope>
<type>jar</type>
<optional>true</optional>
</dependency>
<!-- Used for running CraftBukkit from within your IDE
These are runtime-only dependencies -->
<dependency>
<groupId>org.sk89q.bukkit</groupId>
<artifactId>bukkit-classloader-check</artifactId>
<version>1.7.2-R0.3</version>
<scope>runtime</scope>
<type>jar</type>
<optional>true</optional>
</dependency>
<!-- End runtime only -->
<!-- Bukkit implementation -->
<dependency>
<groupId>org.bukkit</groupId>
<artifactId>bukkit</artifactId>
<version>1.7.2-R0.3</version>
<scope>compile</scope>
<type>jar</type>
<optional>true</optional>
</dependency>
</dependencies>
<build>
<resources>
<!-- Bukkit plugin.yml -->
<resource>
<targetPath>.</targetPath>
<filtering>true</filtering>
<directory>${basedir}/src/bukkit/resources/</directory>
<includes>
<include>plugin.yml</include>
</includes>
</resource>
<!-- Default files -->
<resource>
<targetPath>defaults/</targetPath>
<filtering>true</filtering>
<directory>${basedir}/src/bukkit/resources/</directory>
<includes>
<include>config.yml</include>
</includes>
</resource>
<!-- NMS support in Bukkit -->
<resource>
<targetPath>.</targetPath>
<filtering>false</filtering>
<directory>${basedir}/src/bukkit/resources/</directory>
<includes>
<include>**/*.class</include>
</includes>
</resource>
</resources>
<plugins>
<!-- Add source folder -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.7</version>
<executions>
<execution>
<id>add-bukkit-sources</id>
<phase>generate-sources</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>${basedir}/src/bukkit/java/</source>
</sources>
</configuration>
</execution>
<execution>
<id>add-bukkit-test-sources</id>
<phase>generate-sources</phase>
<goals>
<goal>add-test-source</goal>
</goals>
<configuration>
<sources>
<source>${basedir}/src/bukkit-test/java/</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<!--
=====================================
Disable doclint on Java 8
=====================================
-->
<profile>
<id>java8-disable-doclint</id>
<activation>
<jdk>[1.8,</jdk>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<additionalparam>-Xdoclint:none</additionalparam>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>

Datei anzeigen

@ -1 +1,3 @@
rootProject.name = 'worldedit'
include 'worldedit-core', 'worldedit-bukkit', 'worldedit-forge'

Datei anzeigen

@ -0,0 +1,36 @@
dependencies {
compile project(':worldedit-core')
compile 'com.sk89q:dummypermscompat:1.7'
compile 'org.sk89q.bukkit:bukkit-classloader-check:1.7.2-R0.3'
compile 'org.bukkit:bukkit:1.7.2-R0.3'
testCompile 'org.mockito:mockito-core:1.9.0-rc1'
}
processResources {
from (sourceSets.main.resources.srcDirs) {
expand 'internalVersion': project.internalVersion
include 'plugin.yml'
}
from (sourceSets.main.resources.srcDirs) {
exclude 'plugin.yml'
}
}
jar {
manifest {
attributes("Class-Path": "truezip.jar WorldEdit/truezip.jar js.jar WorldEdit/js.jar",
"WorldEdit-Version": version)
}
}
shadowJar {
dependencies {
include(dependency(':worldedit-core'))
include(dependency('com.google.code.gson:gson:2.2.4'))
}
relocate('com.google.gson', 'com.sk89q.worldedit.internal.gson')
}
build.dependsOn(shadowJar)

Datei anzeigen

@ -1,6 +1,6 @@
name: WorldEdit
main: com.sk89q.worldedit.bukkit.WorldEditPlugin
version: ${project.version}
version: "${internalVersion}"
softdepend: [Spout] #hack to fix trove errors
# Permissions aren't here. Read http://wiki.sk89q.com/wiki/WEPIF/DinnerPerms

27
worldedit-core/build.gradle Normale Datei
Datei anzeigen

@ -0,0 +1,27 @@
dependencies {
compile 'de.schlichtherle:truezip:6.8.3'
compile 'rhino:js:1.7R2'
compile 'org.yaml:snakeyaml:1.9'
compile 'com.google.guava:guava:17.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.2.4'
compile 'com.sk89q.lib:jlibnoise:1.0.0'
//compile 'net.sf.trove4j:trove4j:3.0.3'
testCompile 'org.mockito:mockito-core:1.9.0-rc1'
}
sourceSets {
main {
java {
srcDir 'src/main/java'
srcDir 'src/legacy/java'
}
resources {
srcDir 'src/main/resources'
}
}
}
build.dependsOn(shadowJar)

Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden Mehr anzeigen