-
Notifications
You must be signed in to change notification settings - Fork 20
Building the Project
Sesu8642 edited this page Jan 4, 2025
·
4 revisions
- Install JDK and Git
sudo apt install openjdk-17-jdk git
-
If you have other Java installations on your system, make sure Gradle is using the newly installed one.
- Option 1: set the system default:
update-alternatives --config java
- Option 2: set it only for Gradle, see https://stackoverflow.com/questions/18487406/how-do-i-tell-gradle-to-use-specific-jdk-version
- Option 1: set the system default:
-
Clone this repository
git clone https://github.com/Sesu8642/FeudalTactics
- OPTIONAL if you want to build the Android app: Download and install the Android SDK (Can alternatively be done using Android Studio)
- Go to this page: https://developer.android.com/studio/index.html#command-tools
- Download the zip file for your OS (here: Linux)
mkdir Android
unzip ./Downloads/commandlinetools-linux-<version>_latest.zip -d ./Android
cd FeudalTactics/
echo 'sdk.dir=/path/to/Android/sdk' > local.properties
// accept all licenses
/path/to/Android/sdk/cmdline-tools/bin/sdkmanager --sdk_root=/path/to/Android/sdk --licenses
- Build
// Note: The first run can fail if you didn't install the Android SDK. Just try again and it should work.
// run desktop version
./gradlew lwjgl:run
// build jar (lands in FeudalTactics/lwjgl3/build/libs/)
./gradlew lwjgl:dist
// run Android version on device or emulator
./gradlew android:installDebug android:run
// build apk
./gradlew android:assembleRelease