All Products
Search
Document Center

Mobile Platform as a Service:Upgrade component-based/mPaaS Inside integration method to AAR integration method

Last Updated:Feb 02, 2026

The native Android Archive (AAR) integration method is a native connection method that uses the latest stable versions of the Android Gradle Plugin and Gradle Wrapper to manage mPaaS baselines. You must use Android Gradle Plugin 3.5.3 and Gradle Wrapper 5.6 or later. The current stable versions are Android Gradle Plugin 3.6.x and Gradle Wrapper 6.3.

Preparations

  1. Upgrade the easyconfig plugin to version 2.8.4.

  2. Upgrade Gradle to version 5.0 or later.

Upgrade component-based integration to native AAR integration

Plugin changes

  • Update the Gradle Wrapper and Android Gradle Plugin to the required versions. You must use Gradle 5.0 or later.

  • In the `build.gradle` file in the root directory of the project, remove classpath 'com.alipay.android:android-gradle-plugin'.

  • In the bundle, remove all com.android.application plugins. All bundles use the com.android.library plugin from the native project.

  • Remove all com.alipay.bundle plugins from the bundle.

  • Remove the bundle {} DSL definition from the bundle. You can also remove the public.xml definition, or keep it if needed.

  • Remove all com.alipay.portal plugins from the portal.

  • Remove the portal {} DSL definition from the portal. You can also remove the public.xml definition, or keep it if needed.

  • Change apply plugin: 'com.alipay.apollo.baseline.update' to apply plugin: 'com.alipay.apollo.baseline.config'.

Dependency changes

  • In the dependencies node, remove all provided and bundle declarations. Import AAR dependencies using a bill of materials (BOM).

        implementation 'com.mpaas.android:push'
        implementation 'com.mpaas.android:nebula'
        implementation 'com.mpaas.android:push-hms5'
        implementation platform("com.mpaas.android:mpaas-baseline:$(latest)")
    
        testImplementation 'junit:junit:4.12'
        androidTestImplementation 'androidx.test.ext:junit:1.1.1'
        androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'

    The $(latest) variable represents the latest baseline released by mPaaS. If you use the standard baseline, you do not need to change the value of mpaas-baseline. Otherwise, change the value to the artifact of the custom baseline.

  • Remove the loading frame and customizations. For more information, see Loading frame and customizations.

Changes in using universal components

If you use the metainfo.xml file to define universal components, see Use mPaaS framework universal components.

File changes

The slinks and res_slinks files are no longer required.

Changes in using Mini Programs

To connect using the native AAR method, add the following configuration to the `AndroidManifest.xml` file:

<application>
    ···
    <meta-data android:name="nebula.android.meta.enable" android:value="true"/>
  ···
</application>

Potential problems

Later versions disable v1 signing by default. This may cause Security Guard to report an error if a v1 signature is missing. To troubleshoot this issue, see How to resolve runtime error 608 or libsgmain native errors.

Self-check

Perform a self-check. For more information, see Check the build script configuration.

Upgrade the mPaaS Inside integration method to the AAR integration method

Plugin changes

  • Update the Gradle Wrapper and Android Gradle Plugin to the required versions. You must use Gradle 5.0 or later.

  • In the build.gradle file in the root directory of the project, remove classpath 'com.alipay.android:android-gradle-plugin'.

  • Remove all com.alipay.portal plugins from the portal.

  • Remove the portal {} DSL definition from the portal. You can also remove the public.xml definition, or keep it if needed.

  • Change apply plugin: 'com.alipay.apollo.baseline.update' to apply plugin: 'com.alipay.apollo.baseline.config'.

Dependency changes

In the dependencies node, remove all provided and bundle declarations. Import AAR dependencies using a BOM.

    implementation 'com.mpaas.android:push'
    implementation 'com.mpaas.android:nebula'
    implementation 'com.mpaas.android:push-hms5'
    implementation platform("com.mpaas.android:mpaas-baseline:$(latest)")

    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'androidx.test.ext:junit:1.1.1'
    androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'

The $(latest) variable represents the latest baseline released by mPaaS. If you use the standard baseline, you do not need to change the value of mpaas-baseline. Otherwise, change the value to the artifact of the custom baseline.

Changes in using universal components

If you use the metainfo.xml file to define universal components, see Use mPaaS framework universal components.

gradle.properties changes

You no longer need to set quinoxless=true. You can keep or delete existing quinoxless=true configurations.

Potential problems

Later versions disable v1 signing by default. This may cause Security Guard to report an error if a v1 signature is missing. To troubleshoot this issue, see How to resolve runtime error 608 or libsgmain native errors.

Self-check

Perform a self-check. For more information, see Check the build script configuration.

Use the AAR integration method

  1. Add the mPaaS SDK to your project.

  2. Add required components to each module.