All Products
Search
Document Center

Connect mPaaS Inside to the project

Last Updated: Mar 24, 2021

This topic describes how to connect mPaaS Inside to your My HTML5 Application project.

  1. In Android Studio, choose mPaaS > mPaaS Inside Access to open the mPaaS access page. Select the configuration file that you download from the mPaaS console. Then, Android Studio automatically loads the information from the configuration file and modifies the build.gradle file based on the obtained information. The purpose is to introduce a maven repository into the project and modify the version of Gradle.
    Access procedure 01

    Take note of the following items:

    • If your project is connected in Portal&Bundle mode, you also need to modify the build.gradle file to introduce the following extra plug-ins. The plug-ins help you make better use of mPaaS capabilities.
           
      1. apply plugin: 'com.alipay.library'
      2. apply plugin: 'com.alipay.apollo.baseline.update'
    • If you do not need specific components of mPaaS, write the components into strings in the group:artifact format and add the strings to the excludeDependencies array.

           
      1. mpaascomponents{
      2. // If you do not need specific components of mPaaS, write the components into strings in the "group:artifact" format and add the strings to the "excludeDependencies" array.
      3. //Example excludeDependencies=[
      4. //Example "com.alipay.android.phone.thirdparty:androidsupport-build",
      5. //Example "com.alipay.android.phone.thirdparty:androidsupportrecyclerview-build"
      6. //Example ]
      7. excludeDependencies=[
      8. ]
      9. }
  2. Compile and run your project. If the compilation succeeds and the project can run normally, the project is connected to mPaaS Inside. Now, you have connected your project to mPaaS Inside.