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.
This commit is contained in:
sk89q 2014-11-14 11:27:39 -08:00
parent 44559cde68
commit 7192780251
714 changed files with 333 additions and 834 deletions

13
.gitignore vendored
View File

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

View File

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

View File

@ -1,76 +1,42 @@
Compiling 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 The build process uses Gradle, which you do *not* need to download. WorldEdit is a multi-module project with three modules:
* **Gradle** is for the **Forge** version
WorldEdit is written and targetted for Java 6, but you can use newer * `worldedit-core` contains WorldEdit
versions of Java to compile WorldEdit, though the compiler will give * `worldedit-bukkit` is the Bukkit plugin
you warnings. However, if you plan on compiling for Forge, you have * `worldedit-forge` is the Forge mod
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).
The Java Development Kit is required, so install the latest version ## To compile...
either from Oracle's website or, if you're a Linux/BSD user, you
can also try using OpenJDK.
* [Get Oracle JDK 7 and 8](http://www.oracle.com/technetwork/java/javase/downloads/index-jsp-138363.html) ### On Windows
* [Get Oracle JDK 6](http://www.oracle.com/technetwork/java/javasebusiness/downloads/java-archive-downloads-javase6-419409.html)
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 ### On Linux, BSD, or Mac OS X
scripts provided will automatically download these for you. If, for some
reason, compilation fails due to a missing dependency, please notify us.
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) ## Then you will find...
from the Maven website.
From WorldEdit's directory, execute the following command to compile a You will find:
Bukkit version:
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 If you want to use WorldEdit, use the `-shadow` version.
files.
### Other Variations (The -shadow version includes WorldEdit + necessary libraries.)
By default, the *Bukkit* profile is enabled, but you can disable it ## Other commands
and enable other profiles.
* `mvn clean package -P !bukkit` for just the API * `gradlew idea` will generate an [IntelliJ IDEA](http://www.jetbrains.com/idea/) module for the Forge module.
* `mvn clean package -P !bukkit -P spout` for the Spout version * `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.
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

View File

@ -1,121 +1,126 @@
/* println """
* Build script for the Forge version of WorldEdit *******************************************
*/ 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 { buildscript {
repositories { repositories {
mavenCentral() mavenCentral()
maven { maven { url = "https://oss.sonatype.org/content/repositories/snapshots/" }
name = "forge"
url = "http://files.minecraftforge.net/maven"
}
maven {
name = "sonatype"
url = "https://oss.sonatype.org/content/repositories/snapshots/"
}
jcenter() jcenter()
} }
dependencies { dependencies {
classpath 'net.minecraftforge.gradle:ForgeGradle:1.2-SNAPSHOT'
classpath 'com.github.jengelman.gradle.plugins:shadow:1.1.1' 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' if (!project.hasProperty("artifactory_contextUrl")) ext.artifactory_contextUrl = "http://localhost"
apply plugin: 'maven' if (!project.hasProperty("artifactory_user")) ext.artifactory_user = "guest"
apply plugin: 'forge' if (!project.hasProperty("artifactory_password")) ext.artifactory_password = ""
apply plugin: 'com.github.johnrengelman.shadow'
group = 'com.sk89q' if (!project.hasProperty("gitCommitHash")) {
version = '6.0.0-SNAPSHOT' + System.getProperty("worldedit.build.suffix", "") try {
archivesBaseName = "worldedit-forge" def repo = Grgit.open(project.file('.'))
ext.gitCommitHash = repo.head().abbreviatedId
description = "An in-game voxel map editor for Minecraft." } catch (Exception e) {
ext.gitCommitHash = "no_git_id"
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" }
} }
dependencies { subprojects {
compile group: 'de.schlichtherle', name: 'truezip', version:'6.8.3' apply plugin: 'java'
compile group: 'rhino', name: 'js', version:'1.7R2' apply plugin: 'maven'
compile group: 'org.yaml', name: 'snakeyaml', version:'1.9' apply plugin: 'checkstyle'
compile group: 'com.google.guava', name: 'guava', version:'10.0.1' apply plugin: 'com.github.johnrengelman.shadow'
compile group: 'com.sk89q', name: 'jchronic', version:'0.2.4a' apply plugin: 'com.jfrog.artifactory-upload'
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'
}
sourceSets { group = 'com.sk89q.worldedit'
main { version = '6.0.0-SNAPSHOT'
java { ext.internalVersion = version + ";" + gitCommitHash
srcDir 'src/main/java'
srcDir 'src/legacy/java' sourceCompatibility = 1.6
srcDir 'src/forge/java' targetCompatibility = 1.6
}
resources { checkstyle.configFile = new File(rootProject.projectDir, "config/checkstyle/checkstyle.xml")
srcDir 'src/main/resources'
srcDir 'src/forge/resources' 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 { task sourcesJar(type: Jar, dependsOn: classes) {
ext.forgeVersion = "10.13.1.1225" classifier = 'sources'
version = "1.7.10-$forgeVersion" from sourceSets.main.allSource
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'
} }
from (sourceSets.main.resources.srcDirs) { task javadocJar(type: Jar, dependsOn: javadoc) {
exclude 'mcmod.info' classifier = 'javadoc'
from javadoc.destinationDir
} }
}
// shade needed runtime dependencies artifacts {
shadowJar { archives jar
classifier 'shadow' archives sourcesJar
dependencies { archives javadocJar
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'
}
// ensure reobf happens build.dependsOn(checkstyleMain)
reobf.reobf(shadowJar) { spec -> build.dependsOn(checkstyleTest)
spec.classpath = sourceSets.main.compileClasspath; build.dependsOn(sourcesJar)
} build.dependsOn(javadocJar)
task deleteOrig(type: Delete) { shadowJar {
delete project.tasks.jar.archivePath.getPath() 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) { artifactory {
delete project.tasks.shadowJar.archivePath.getPath() 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) resolve {
build.dependsOn(shadowJar) repository {
repoKey = 'repo'
username = "${artifactory_user}"
password = "${artifactory_password}"
maven = true
}
}
}
}

View File

@ -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 Normal file → Executable file
View File

673
pom.xml
View File

@ -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>

View File

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

View File

@ -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)

View File

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

View File

@ -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)

Some files were not shown because too many files have changed in this diff Show More