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 Repository at top left)
    • Click Add Button → Clone Repository
    • Select CrossLauncher repo in Your Repositories or use your repo URL

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

  1. Fork the repository to your preferred GitHub account
  2. Make sure you've setup your SSH key in your current machine for pushing
  3. 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 Repository at top left)
    • Click Add Button → Clone Repository
    • Select CrossLauncher repo in Your Repositories or use your repo URL

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.

  1. Now the repository is ready for contribution works, here is how to contribute codes :
    1. Change anything in the source, it can be code or resources.
    2. Commit and push your change to your GitHub
    3. Make a pull request to the main repo EmiyaSyahriel/CrossLauncher
    4. 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:generateEmbeddedNativeSource to 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

  1. Clone the repository (as explained above)
  2. Open the Project in Android Studio
  3. Wait for Android Studio indexing
  4. Build the project configuration (hammer icon (🔨) at top right)
  5. Connect your Android device, make sure that your device name is available in top right side dropdown in Android Studio
  6. 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

  1. Clone the repository (as explained above)
  2. Open command line and cd to the repository root
  3. Connect your device, make sure when you execute adb devices your Device ID is listed.
  4. Execute ./gradlew to start the gradle daemon, wait for it to finish
  5. 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
  1. 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 type gradlew or gradlew.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

  1. Clone the repository, use git command line method from AndroidIDE's built-in terminal.
  2. Wait for AndroidIDE to do it's indexing
  3. Open any source code
  4. Start the app by pressing the Play button (▶) top right side of AndroidIDE
  5. When the compilation is complete, you will be prompted if you want to install the app and launch it.