-
Notifications
You must be signed in to change notification settings - Fork 100
Compiling using gradle
git clone https://github.com/jsettlers/settlers-remake.git
- Download the Android SDK
- Create a new file called
local.properties
:
sdk.dir=<path to where you put your android sdk>
./gradlew run
You can also use runMapCreator
to start the map creator.
In this configuration, all maps including the test maps are available to be played.
Run on your Android device:
./gradlew runAndroid
./gradlew :assembleDist
You will find the zip files in /build/distributions
The maps in the maps/release
directory are packed into the release ZIP and the Android APK package.
You should first follow the above steps until you can run the application.
You need to download IntelliJ IDEA or Android Studio 2.0.
Start it. When prompted about the project directory, point it to where you cloned our repository to.
You should follow our guide to set up code formatting.
While many of our projects are compatible to Java 1.7 (thanks to Android) the tests all allow for Java 1.8 to be used. IntelliJ does not support different source compatibilities for tests and java files. Simply ignore the compatibility errors for now.
Download the latest eclipse for Java release.
Start eclipse. You can chose any workspace you want but I suggest you use the root directory of our git.
We recommend installing a GIT-Plugin, Checkstyle and Findbugs.
Go to File
->Import...
. Select Gradle Project
.
Click Next
until you are asked for the Project root directory
. Enter the git root there.
Click Next
. If JDK 1.8 is not your default JDK, you can set the Java home directory
.
You can now Finish
the import.
The source version is not imported correctly by eclipse. Buildship (the Eclipse Gradle plugin) does not support this.
We do not support compiling Android using eclipse, but feel free to try ;-).