All Products
Search
Document Center

Upgrade Inside access mode to AAR access mode

Last Updated: Aug 25, 2021

Introduction

AAR access refers to the mode that almost uses native access. When AAR access is used, to meet the need for mPaaS baseline management, you need to use the latest stable Android Gradle Plugin and Gradle Wrapper versions. Android Gradle Plugin 3.5.3 and Gradle Wrapper 5.6 or later versions are recommended. Currently, Android Gradle Plugin 3.6.x and Gradle Wrapper 6.3 are stable.

  1. Delete mpaas_packages.json from the project.
  2. If the Gradle plug-in provided by mPaaS has been used before, the related configurations need to be deleted.
       
    1. classpath 'com.alipay.android:android-gradle-plugin:3.0.0.9.13' // Delete the configuration data in this line
  3. In the build.gradle under the project root directory, add the following code to the header.
       
    1. apply plugin: 'com.alipay.apollo.optimize'
  4. Delete the easyconfig plug-in from build.gradle under the app master project root directory .

       
    1. classpath 'com.android.boost.easyconfig:easyconfig:2.x.x'
  5. Delete build.gradle the following contents in the app module:

       
    1. apply plugin: 'com.alipay.portal' // Delete this line
  6. Delete the following plug-ins in build.grade of each module for the project:

       
    1. apply plugin: 'com.alipay.apollo.baseline.update'

    or,

       
    1. apply plugin: 'com.alipay.apollo.baseline.config'

    Uses AAR access

  7. Add mPaaS SDK to the project.

  8. Add components to use in each module.