| 1 | # Android project files |
| 2 | |
| 3 | This subdirectory contains the |
| 4 | |
| 5 | - Android project skeleton files in `integrated`. |
| 6 | |
| 7 | - Additional Android services in `integrated-services`. |
| 8 | |
| 9 | See |
| 10 | - [Android Services](https://castle-engine.io/android_services) |
| 11 | - [Adding New Android Services](https://castle-engine.io/adding_new_android_services) |
| 12 | |
| 13 | ## Why `integrated` name? |
| 14 | |
| 15 | The name `integrated` indicates that the project can be integrated with services using Java code. |
| 16 | |
| 17 | History: we used to have 2 project types: `basic` (no Java at all, just use `NativeActivity`) and `integrated` (own Java code, services possible). With time, `basic` project type became useless (no gain from using it; and it was a trap for users, trying to use it and surprised that a lot of things don't work, e.g. audio; and it was unnecessary burden to maintain). So now we only support `integrated`. |
| 18 | |
| 19 | ## Upgrading Gradle version |
| 20 | |
| 21 | The project contains also Gradle setup to build the project. |
| 22 | |
| 23 | Upgrading Gradle: |
| 24 | |
| 25 | 1. Create any project using Gradle, e.g. build any CGE project for Android: |
| 26 | |
| 27 | ``` |
| 28 | cd ..../castle-openai/ |
| 29 | castle-engine package --target=android --fast --mode=debug |
| 30 | cd castle-engine-output/android/project # for subsequent commands |
| 31 | ``` |
| 32 | |
| 33 | Note: You cannot directly upgrade Gradle here, in `integrated` project skeleton that doesn't build. You really need some new project, really any project using Gradle (doesn't even have to be CGE project). |
| 34 | |
| 35 | 2. Upgrade Gradle wrapper: |
| 36 | |
| 37 | - See latest Gradle version on https://docs.gradle.org/current/userguide/gradle_wrapper.html |
| 38 | - Change `gradle/wrapper/gradle-wrapper.properties` to use new version |
| 39 | - Run `bash ./gradlew wrapper --gradle-version 8.7` or `./gradlew wrapper --gradle-version latest` |
| 40 | - Copy `gradle/wrapper/` contents (2 files: `gradle-wrapper.properties`, `gradle-wrapper.jar`) over CGE files in `integrated/gradle/wrapper`. |
| 41 | |
| 42 | See https://docs.gradle.org/current/userguide/gradle_wrapper.html#sec:upgrading_wrapper for explanation. |