2014-04-06 10:33:05 +08:00
Compiling
=========
2018-10-04 14:15:35 +08:00
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 8 or newer.
2016-12-03 12:21:03 +08:00
You only need one version of the JDK installed.
2014-04-06 10:33:05 +08:00
2016-12-03 12:21:03 +08:00
The build process uses Gradle, which you do *not* need to download. WorldEdit is a multi-module project with four modules:
2014-04-06 10:33:05 +08:00
2016-12-03 12:21:03 +08:00
* `worldedit-core` contains the WorldEdit API
2014-11-15 03:27:39 +08:00
* `worldedit-bukkit` is the Bukkit plugin
2016-12-03 12:21:03 +08:00
* `worldedit-sponge` is the Sponge plugin
2014-11-15 03:27:39 +08:00
* `worldedit-forge` is the Forge mod
2014-04-06 10:33:05 +08:00
2014-11-15 03:27:39 +08:00
## To compile...
2014-04-06 10:33:05 +08:00
2014-11-15 03:27:39 +08:00
### On Windows
2014-04-06 10:33:05 +08:00
2014-11-15 03:27:39 +08:00
1. Shift + right click the folder with WorldEdit's files and click "Open command prompt".
2015-09-16 09:07:56 +08:00
2. `gradlew clean setupDecompWorkspace`
2014-11-15 03:27:39 +08:00
3. `gradlew build`
2014-04-06 10:33:05 +08:00
2014-11-15 03:27:39 +08:00
### On Linux, BSD, or Mac OS X
2014-04-06 10:33:05 +08:00
2014-11-15 03:27:39 +08:00
1. In your terminal, navigate to the folder with WorldEdit's files (`cd /folder/of/worldedit/files`)
2015-09-16 09:10:22 +08:00
2. `./gradlew clean setupDecompWorkspace`
2014-11-15 03:27:39 +08:00
3. `./gradlew build`
2014-04-06 10:33:05 +08:00
2014-11-15 03:27:39 +08:00
## Then you will find...
2014-04-06 10:33:05 +08:00
2014-11-15 03:27:39 +08:00
You will find:
2014-04-06 10:33:05 +08:00
2014-11-15 03:27:39 +08:00
* The core WorldEdit API in **worldedit-core/build/libs**
* WorldEdit for Bukkit in **worldedit-bukkit/build/libs**
2016-12-03 12:21:03 +08:00
* WorldEdit for Sponge in **worldedit-sponge/build/libs**
2014-11-15 03:27:39 +08:00
* WorldEdit for Forge in **worldedit-forge/build/libs**
2014-04-06 10:33:05 +08:00
2016-12-01 20:55:39 +08:00
If you want to use WorldEdit, use the `-dist` version.
2014-04-06 10:33:05 +08:00
2016-12-01 20:55:39 +08:00
(The -dist version includes WorldEdit + necessary libraries.)
2014-04-06 10:33:05 +08:00
2016-12-03 12:21:03 +08:00
### Note regarding `setupDecompWorkspace`
`setupDecompWorkspace` requires more memory than is usually given to Gradle by default.
If it fails, you should put `org.gradle.jvmargs=-Xmx3G` in `gradle.properties` .
Please don't commit this change!
2014-11-15 03:27:39 +08:00
## Other commands
2014-04-24 04:37:42 +08:00
2016-12-03 12:21:03 +08:00
* `gradlew idea` will generate an [IntelliJ IDEA ](http://www.jetbrains.com/idea/ ) module for each folder.
* `gradlew eclipse` will generate an [Eclipse ](https://www.eclipse.org/downloads/ ) project for each folder.
2015-09-16 09:10:22 +08:00
* Use `setupCIWorkspace` instead of `setupDecompWorkspace` if you are doing this on a CI server.