All Products
Search
Document Center

Manage component dependencies (mPaaS Inside )

Last Updated: May 21, 2021
Note: To make it easier to upgrade the mPaaS SDK baseline and manage component dependencies, you need to upgrade the Android Studio mPaaS plug-in to the latest version first. For more information about how to upgrade the mPaaS plug-in, see Upgrade the mPaaS plug-in.

Manage component dependency

To use the mPaaS component, you must add corresponding component dependencies in the mPaaS Inside project.

Procedure

  1. In Android Studio, choose mPaaS > mPaaS Inside Access. In the dialog box that appears, click Configure/Update Components and select Start Config.
  2. In the displayed component management window, click the corresponding buttons to install the required components.

    • If a component is not installed, the corresponding button displays “Uninstalled”. Click this button to install the component.
    • If a component is installed, the corresponding button displays “Installed”. In this case, click on this button again will uninstall this component.

Follow-up steps

If you have not used the Android Studio mPaaS plug-in to manage component dependencies before, and this is your first time using the Component Management feature, after adding components, you also need to check or modify the following configurations.

  1. Check the build.gradle file in the root directory of the mPaaS Inside project. Make sure that the file contains the following dependencies and the version is not earlier than the version shown below.
 
  1. buildscript {
  2. ...
  3. dependencies {
  4. classpath 'com.android.boost.easyconfig:easyconfig:2.5.0'
  5. }
  6. }
  1. Check the build.gradle file in the main module of the project. Make sure that the file contains the following content.
 
  1. apply plugin: 'com.alipay.portal'
  2. portal {
  3. allSlinks true
  4. mergeAssets true
  5. }
  6. apply plugin: 'com.alipay.apollo.baseline.update'
  7. mpaascomponents{
  8. excludeDependencies=[]
  9. }
  1. If you need to call the API operations of mPaaS components in a sub-module, add the following code to the build.gradle file in the sub-module of the project:
 
  1. apply plugin: 'com.alipay.apollo.baseline.update'
  1. If the original dependencies include your custom libraries, you need to Add custom dependencies.
  2. If compilation failed due to library conflicts, you can Solve dependency conflicts.

Upgrade the baseline

  1. In Android Studio, choose mPaaS > mPaaS Inside Access. In the dialog box that appears, click Access/Update Baseline and select Start Config.
  2. Click the version dropdown box, select a new version, and then click the OK button to upgrade the baseline.

Upgrade a single component

New version

  1. In Android Studio, select mPaaS > Component Upgrade to show the list of components.
  2. View component status and upgrade components. If there is an update available in the upper right corner, then click and update it.
    Component upgrades

Old version

  1. In Android Studio, select mPaaS > Component Upgrade to show the list of components.
  2. View component status and upgrade components.
  • If the latest version is currently being used, then no upgrade is required for this component.
  • Otherwise, a later version is available for this component. Click the status button to upgrade this component.
    Components Update

Add custom dependencies

  • If this is your first time to use the component management feature to manage components and you have not upgraded the SDK, you need to write the custom libraries in the “dependencies” node in the build.gradle file of the main module of the project. For example:
 
  1. bundle 'com.alipay.android.phone.mobilesdk:logging-build:2.0.2.180322162837@jar'
  2. manifest 'com.alipay.android.phone.mobilesdk:logging-build:2.0.2.180322162837:AndroidManifest@xml'
  • If it is your first time to use the Component Management feature to manage components and upgrade the SDK, or use the Baseline Upgrade feature to upgrade the SDK, your custom dependencies may need to be re-customized based on the new version. You need to submit a ticket or contact your mPaaS support for confirmation. After re-customization or confirmation that re-customization is not required, you can add custom dependencies as described above.