Manage component dependency
To use the mPaaS component, you must add corresponding component dependencies in the mPaaS Inside project.
Procedure
In Android Studio, choose mPaaS > mPaaS Inside Access. In the dialog box that appears, click Configure/Update Components and select Start Config.
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.
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.
buildscript {
...
dependencies {
classpath 'com.android.boost.easyconfig:easyconfig:2.5.0'
}
}
Check the
build.gradle
file in the main module of the project. Make sure that the file contains the following content.
apply plugin: 'com.alipay.portal'
portal {
allSlinks true
mergeAssets true
}
apply plugin: 'com.alipay.apollo.baseline.update'
mpaascomponents{
excludeDependencies=[]
}
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:
apply plugin: 'com.alipay.apollo.baseline.update'
If the original dependencies include your custom libraries, you need to Add custom dependencies.
If compilation failed due to library conflicts, you can Solve dependency conflicts.
Upgrade the baseline
In Android Studio, choose mPaaS > mPaaS Inside Access. In the dialog box that appears, click Access/Update Baseline and select Start Config.
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
In Android Studio, select mPaaS > Component Upgrade to show the list of components.
View component status and upgrade components. If there is an update available in the upper right corner, then click and update it.
Old version
In Android Studio, select mPaaS > Component Upgrade to show the list of components.
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.
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:
bundle 'com.alipay.android.phone.mobilesdk:logging-build:2.0.2.180322162837@jar'
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. Please search for group number 41708565 with DingTalk to join DingTalk group to contact mPaaS support for confirmation. After re-customization or confirmation that re-customization is not required, you can add custom dependencies as described above.