MobileUI LogoMobileUI

3. Project Structure

Learn how our cross-platform projects are laid out.

A cross-platform app project that was generated with the MobileUI Android Studio Plugin is a Gradle® project with three sub-projects (or modules). This means, you can work with them in Android Studio like with any other Gradle project.

If you are new to Gradle, you may refer to the Gradle User Manual to learn more about Gradle's Multi-Project Builds that are used here.

The Modules of a MobileUI Project

  1. app-common: Shared Java/Kotlin and layout code (XML files, CSS, images)

    This module is a standard Java library project. As such, it follows all conventions for project layout that are discussed in the official docs about Organizing Gradle Projects. It contains shared Java or Kotlin logic, resources and MobileUI assets like layouts, CSS-files and more. Please refer to the Assets and Images section to learn more about assets.

  2. app-android: The Android app

    This module is a standard Android app module. Android Studio detects this as an Android module and offers to you all required tooling to build, run and debug the Android app. The app-android module depends on the app-common module, pulling all logic and assets from there. Android-specific code resides within the module's own folder.
    To learn more about the structure of the Android module, please refer to Android's Project overview documentation.

  3. app-ios: The iOS app

    The app-ios is a Java module that is configured to build as a RoboVM-based iOS app. The Gradle build file contains the RoboVM plugin that requires additional configurations contained in robovm.xml and others. This module is detected by the RoboVM Plugin for Android Studio, giving you build-, run- and debug-capabilities during development.
    To learn more about RoboVMs project layout, please refer to RoboVM's Project and Code Structure documentation.

Note: The app-ios module can only be built on macOS as RoboVM requires Xcode.

Your project typically displays like this:

project structure