All Products
Search
Document Center

Mobile Platform as a Service:Check configurations of the build script

Last Updated:Jul 11, 2024

This topic describes how to check configurations of the build script after you add a component and before you write code.

Procedure

  1. Check the configuration of the build.gradle file in the root directory.

    1. Check whether the EasyConfig plug-in is imported.

      classpath 'com.android.boost.easyconfig:easyconfig:?'
    2. Check whether a baseline version is specified.

      ext.mpaas_artifact = "mpaas-baseline"
      ext.mpaas_baseline = "10.1.68-41"
  2. View the configuration in the App directory to check whether the EasyConfig plug-in is applied.

    apply plugin: 'com.alipay.apollo.baseline.config'
  3. Check the version of the Android Gradle plug-in.

    Search the project for com.android.tools.build:gradle to view the version of the Android Gradle plug-in.

    • If the version of the Android Gradle plug-in is earlier than version 4.0, no special configuration is required.

    • If the version of the Android Gradle plug-in is version 4.0 or later, open the gradle.properties file and add android.enableResourceOptimizations=false. Then, in the App project, open the build.gradle file, find the signingConfigs section, and explicitly add the v1SigningEnabled true line. The following sample code shows the overall section.

      android {
          ...
          signingConfigs {
              release {
                  ...
                  v1SigningEnabled true
              }
              debug {
                  ...
                  v1SigningEnabled true
              }
          }
      }
    • If the version of the Android Gradle plug-in is version 7.0 or later, upgrade the EasyConfig plug-in to version 2.8.4 in the build.gradle file in the root directory.

      classpath 'com.android.boost.easyconfig:easyconfig:2.8.4'