Contributing and Building the App - EmiyaSyahriel/CrossLauncher GitHub Wiki
Cloning
This is the process to download the source code from GitHub to your machine, and to contribute changes.
Build-only
- Using git command line (make sure you have git command line installed)
git clone --recurse-submodules https://github.com/EmiyaSyahriel/CrossLauncher.git
- Using GitHub Desktop
- Expand the Repository List (click
Current Repositoryat top left) - Click
AddButton →Clone Repository - Select CrossLauncher repo in
Your Repositoriesor use your repo URL
- Expand the Repository List (click
Warning : If you plan to build the app directly using Android machine, some Git GUI like MGit did not immediately initialize submodules, you should use it only after you clone the repo using command line.
The source code is now ready, you can build it and test it your self.
For Contribution Work
- Fork the repository to your preferred GitHub account
- Make sure you've setup your SSH key in your current machine for pushing
- Clone to your local machine
- Using git command line
git clone --recurse-submodules https://[email protected]:{your-username}/CrossLauncher
- Using GitHub Desktop
- Expand the Repository List (click
Current Repositoryat top left) - Click
AddButton →Clone Repository - Select CrossLauncher repo in
Your Repositoriesor use your repo URL
- Expand the Repository List (click
Warning : If you plan to build the app directly using Android machine, some Git GUI like MGit did not immediately initialize submodules, you should use it only after you clone the repo using command line.
- Now the repository is ready for contribution works, here is how to contribute codes :
- Change anything in the source, it can be code or resources.
- Commit and push your change to your GitHub
- Make a pull request to the main repo EmiyaSyahriel/CrossLauncher
- Wait for me (EmiyaSyahriel) and/or other contributors to review the change
- If it is approved, the change will be merged to the main repository, Congratulations!
- If it is not approved, unless the change is declined entirely, made some change according to the review note and try again.
Note : If you edit any text resource file located in
launcher_app/src/main/cpp/res, run gradle task:launcher_app:generateEmbeddedNativeSourceto include the change to the source code since these files were all embedded into source code
Building
Compile the app and install to device.
Using Android Studio
Prerequisites
- Android Studio (Bumblebee or newer), with installed components of:
- Android NDK r21
- Android SDK 33
- CMake 3.8 (usually installed with NDK)
Steps
- Clone the repository (as explained above)
- Open the Project in Android Studio
- Wait for Android Studio indexing
- Build the project configuration (hammer icon (🔨) at top right)
- Connect your Android device, make sure that your device name is available in top right side dropdown in Android Studio
- Start the app by pressing Play button (▶) at top right
Using Android SDK command line tools
Prerequisites
- Gradle 8.0.2
- Android SDK Command Line Tools, with installed components of:
- Java JDK 11 (any implementation, OpenJDK recommended)
- Android NDK r21
- Android SDK 33
- CMake 3.8 (usually installed with NDK)
Steps
- Clone the repository (as explained above)
- Open command line and
cdto the repository root - Connect your device, make sure when you execute
adb devicesyour Device ID is listed. - Execute
./gradlewto start the gradle daemon, wait for it to finish - To compile the app, Execute this:
- For debug variant (require uninstallation if release variant is present in device) :
./gradlew :launcher_app:assembleDebug
- For action build variant (same as debug, different package name) :
./gradlew :launcher_app:assembleDex
- If the compilation success, you can install it on your device by executing:
- For debug variant:
adb install ./launcher_app/build/outputs/apk/dex/launcher_app-debug.apk
- For action build variant:
adb install ./launcher_app/build/outputs/apk/dex/launcher_app-dex.apk
Note : On Windows, instead of
./gradlew, you can just typegradleworgradlew.bat
Using AndroidIDE
Directly building on Android device without PC. But as of writing, this IDE is in beta and have no Kotlin LSP yet, therefore no auto-completion and reference finding yet. This app requires big resources (such as CPU, Storage and RAM). The minimum requirements for device to build CrossLauncher using AndroidIDE is:
- RAM at least 4GB
- Storage at least 1GB (4GB including entire AndroidIDE + AndroidIDE-NDK package)
- eMMC is fine, UFS3.0 just gives slight building performance boost building CrossLauncher (about ~10%).
- ARM 64bit / aarch64 CPU, Snapdragon 625 or higher.
- Android 8 or newer
Prerequisites
- AndroidIDE (any latest version, tested on 2.5.3-beta)
- AndroidIDE-NDK r21e or newer (installation here, info about it here)
Steps
- Clone the repository, use git command line method from AndroidIDE's built-in terminal.
- Wait for AndroidIDE to do it's indexing
- Open any source code
- Start the app by pressing the Play button (▶) top right side of AndroidIDE
- When the compilation is complete, you will be prompted if you want to install the app and launch it.