forked from jsettlers/settlers-remake
-
Notifications
You must be signed in to change notification settings - Fork 18
Setting up IntelliJ IDEA (Linux, WIndows, OSX)
Paul Wedeck edited this page Oct 10, 2021
·
5 revisions
git clone https://github.com/paulwedeck/settlers-remake.git # clone the repository
cd settlers-remake # change into the settlers remake folder
This should have created a new directory: settlers-remake
Linux users download the command line tools at the bottom of the Android SDK page.
Windows users have two options:
- download Android Studio(which can be used as alternative to IntelliJ) and install the AndroidSDK during the installation process by following the instrctions
- or download the command line tools at the bottom of the Android SDK page.
# Mac
brew install android # install SDK Manager
android # start SDK Manager GUI
open it and select the following packages.
Install the following items
- Tools/Android SDK Build-tools version 23.0.1
- Android 4.0.3 (API 15)/SDK Platform
- Android 4.0.3 (API 15)/Google APIs
- Android 4.0.3 (API 15)/Sources for Android SDK
Create local.properties file in settlers-remake
folder to tell IntelliJ IDEA where to find the Andoid SDK.
# Mac
echo "sdk.dir=/usr/local/opt/android-sdk" >> local.properties
The file should look like this (on Windows your path will look different).
sdk.dir=/usr/local/opt/android-sdk
Run the application once with Gradle to prepare the settlers-remake
folder for IntelliJ IDEA
./gradlew run
Download the IntelliJ IDEA Community Edition and start it.
Click Import Project
Select settlers-remake/build.gradle
and click OK
In Import Project from Gradle
dialog click OK
In Gradle Project Data to Import
dialog click OK
- In the project jsettlers.main.swing, find the class SwingManagedJSettlers.
- Create a run configuration.
- To prevent a NoClassDefFoundError and to run the latest code changes, edit the run configuration.
- add a "Before launch" step by clicking the + button
- Select "Run Gradle task"
- Choose the root "settlers-remake" Gradle project
- Type in the "compileJava" task (If you like to run a test, type in "compileTestJava"
- Now you can remove the default "Make" step in "Before launch" to reduce the compile time