Update wiki Building-locally.md for AS Chipmunk (#6761)

This commit is contained in:
SomeTroglodyte
2022-05-11 15:19:56 +02:00
committed by GitHub
parent 45739a172d
commit addfddb2ec

View File

@ -24,14 +24,14 @@ So first things first - the initial "No assumptions" setup to have Unciv run fro
- Click "+" to add a new configuration
- Choose "Application"
- Give the configuration a name, we recommend "Desktop"
- Set the module classpath (the box to the right of the Java selection) to `Unciv.desktop`, main class to `com.unciv.app.desktop.DesktopLauncher` and `<repo_folder>\android\assets\` as the Working directory, OK to close the window
- Set the module classpath (the box to the right of the Java selection) to `Unciv.desktop.main` (`Unciv.desktop` for Bumblebee or below), main class to `com.unciv.app.desktop.DesktopLauncher` and `<repo_folder>\android\assets\` as the Working directory, OK to close the window
- If you get a `../../docs/uniques.md (No such file or directory)` error that means you forgot to set the working directory!
- Select the Desktop configuration (or however you chose to name it) and click the green arrow button to run! Or you can use the next button -the green critter with six legs and two feelers - to start debugging.
- I also recommend going to Settings > Version Control > Commit and turning off 'Before commit - perform code analysis'
Unciv uses Gradle to specify dependencies and how to run. In the background, the Gradle gnomes will be off fetching the packages (a one-time effort) and, once that's done, will build the project!
Unciv uses Grade 7.2 and the Android Gradle Plugin 7.1.0
Unciv uses Gradle 7.2 and the Android Gradle Plugin 7.1.0
Note advanced build commands as described in the next paragraph, specifically the `gradlew desktop:dist` one to build a jar, run just fine in Android Studio's terminal (Alt+F12), with most dependencies already taken care of.
@ -72,7 +72,7 @@ The simple multiplayer host included in the sources can be set up to debug or ru
- In Android Studio, Run > Edit configurations.
- Click "+" to add a new configuration
- Choose "Application" and name the config, e.g. "UncivServer"
- Set the module to `Unciv.server`, main class to `com.unciv.app.server.DesktopLauncher` and `<repo_folder>/android/assets/` as the Working directory, OK to close the window.
- Set the module to `Unciv.server.main` (`Unciv.server` for Studio versions Bumblebee or below), main class to `com.unciv.app.server.DesktopLauncher` and `<repo_folder>/android/assets/` as the Working directory, OK to close the window.
- Select the UncivServer configuration and click the green arrow button to run! Or start a debug session as above.
To build a jar file, refer to [Without Android Studio](#Without-Android-Studio) and replace 'desktop' with 'server'. That is, run `./gradlew server:dist` and when it's done look for /server/build/libs/UncivServer.jar