All Products
Document Center

Compile and package

Last Updated: Mar 10, 2021

This topic describes how to compile and package mPaaS Inside projects.

Configure the packaging plug-in

mPaaS supports a near-native packaging mode by providing mPaaS Gradle plug-in. The mPaaS Gradle plug-in has two versions: the stable version and the beta version.

  • The stable version of the mPaaS Gradle plug-in is based on Android Gradle Plugin V3.0.1 and requires Gradle V4.4.

    1. classpath '
  • The beta version of the mPaaS Gradle plug-in is based on Android Gradle Plugin V3.5.3. mPaaS Gradle V3.5.x is provided.

  1. classpath ''
Note: Use the beta version only when necessary. When you use the beta version, remove apply plugin:''.

Introduce plug-ins

If your project is created by using the Android Studio mPaaS plug-in or converted from a native project, you only need to check whether the following steps are already completed.

  1. Introduce the following plug-ins to the build.gradle file in the root directory of your project.
  1. classpath ''
  2. classpath '' // You can also use the beta version.
  1. Use the plug-ins in the main project.


apply plugin: ‘’apply plugin: ‘’portal {allSlinks truemergeAssets true}mpaascomponents{// Add the mPaaS bundles that you do not need (if any) to this array.excludeDependencies=[“”]}

  1. Step 3: Make sure that the file contains `quinoxless=true`.
  2. Step 4: Make sure that the root directory contains the mpaas_packages.json file. If the root directory does not contain the file, use the Android Studio mPaaS plug-in to install the baseline. For more information, see **mPaaS** > **Upgrade the baseline**.
  3. ## Package
  4. You can use the Build button provided by Android Studio to directly package, or you can use Gradle Wrapper to run the following command to package in script mode.

./gradlew clean assembleDebug