Enum Class ManifestMerger2.Invoker.Feature

java.lang.Object
java.lang.Enum<ManifestMerger2.Invoker.Feature>
com.android.manifmerger.ManifestMerger2.Invoker.Feature
All Implemented Interfaces:
Serializable, Comparable<ManifestMerger2.Invoker.Feature>, Constable
Enclosing class:
ManifestMerger2.Invoker

public static enum ManifestMerger2.Invoker.Feature extends Enum<ManifestMerger2.Invoker.Feature>
Optional behavior of the merging tool can be turned on by setting these Feature.
  • Enum Constant Details

    • KEEP_INTERMEDIARY_STAGES

      public static final ManifestMerger2.Invoker.Feature KEEP_INTERMEDIARY_STAGES
      Keep all intermediary merged files during the merging process. This is particularly useful for debugging/tracing purposes.
    • EXTRACT_FQCNS

      public static final ManifestMerger2.Invoker.Feature EXTRACT_FQCNS
      Perform a sweep after all merging activities to remove all fully qualified class names and replace them with the equivalent short version.
    • REMOVE_TOOLS_DECLARATIONS

      public static final ManifestMerger2.Invoker.Feature REMOVE_TOOLS_DECLARATIONS
      Perform a sweep after all merging activities to remove all tools: decorations.
    • NO_PLACEHOLDER_REPLACEMENT

      public static final ManifestMerger2.Invoker.Feature NO_PLACEHOLDER_REPLACEMENT
      Do no perform placeholders replacement.
    • MAKE_AAPT_SAFE

      public static final ManifestMerger2.Invoker.Feature MAKE_AAPT_SAFE
      Encode unresolved placeholders to be AAPT friendly.
    • SKIP_BLAME

      public static final ManifestMerger2.Invoker.Feature SKIP_BLAME
      Clients will not request the blame history
    • SKIP_XML_STRING

      public static final ManifestMerger2.Invoker.Feature SKIP_XML_STRING
      Clients will only request the merged XML documents, not XML pretty printed documents
    • TEST_ONLY

      public static final ManifestMerger2.Invoker.Feature TEST_ONLY
      Add android:testOnly="true" attribute to prevent APK from being uploaded to Play store.
    • NO_IMPLICIT_PERMISSION_ADDITION

      public static final ManifestMerger2.Invoker.Feature NO_IMPLICIT_PERMISSION_ADDITION
      Do not perform implicit permission addition.
    • ADVANCED_PROFILING

      public static final ManifestMerger2.Invoker.Feature ADVANCED_PROFILING
      Perform Studio advanced profiling manifest modifications
    • ADD_DYNAMIC_FEATURE_ATTRIBUTES

      public static final ManifestMerger2.Invoker.Feature ADD_DYNAMIC_FEATURE_ATTRIBUTES
      Mark this application as a feature split
    • DEBUGGABLE

      public static final ManifestMerger2.Invoker.Feature DEBUGGABLE
      Set the android:debuggable flag to the application.
    • HANDLE_VALUE_CONFLICTS_AUTOMATICALLY

      public static final ManifestMerger2.Invoker.Feature HANDLE_VALUE_CONFLICTS_AUTOMATICALLY
      When there are attribute value conflicts, automatically pick the higher priority value.

      This is for example used in the IDE when we need to merge a new manifest template into an existing one and we don't want to abort the merge.

      (This will log a warning.)

    • ADD_ANDROIDX_MULTIDEX_APPLICATION_IF_NO_NAME

      public static final ManifestMerger2.Invoker.Feature ADD_ANDROIDX_MULTIDEX_APPLICATION_IF_NO_NAME
      Adds the AndroidX name of AndroidXConstants.MULTI_DEX_APPLICATION as application name if none is specified. Used for legacy multidex.
    • ADD_SUPPORT_MULTIDEX_APPLICATION_IF_NO_NAME

      public static final ManifestMerger2.Invoker.Feature ADD_SUPPORT_MULTIDEX_APPLICATION_IF_NO_NAME
      Adds the pre-AndroidX name of AndroidXConstants.MULTI_DEX_APPLICATION as application name if none is specified. Used for legacy multidex.
    • FULLY_NAMESPACE_LOCAL_RESOURCES

      public static final ManifestMerger2.Invoker.Feature FULLY_NAMESPACE_LOCAL_RESOURCES
      Rewrite local resource references with fully qualified namespace
    • DISABLE_PACKAGE_NAME_UNIQUENESS_CHECK

      public static final ManifestMerger2.Invoker.Feature DISABLE_PACKAGE_NAME_UNIQUENESS_CHECK
    • ENFORCE_UNIQUE_PACKAGE_NAME

      public static final ManifestMerger2.Invoker.Feature ENFORCE_UNIQUE_PACKAGE_NAME
      Enforce that dependencies manifests don't have duplicated package names.
    • DISABLE_MINSDKLIBRARY_CHECK

      public static final ManifestMerger2.Invoker.Feature DISABLE_MINSDKLIBRARY_CHECK
      Unsafely disables minSdkVersion check in libraries.
    • CHECK_IF_PACKAGE_IN_MAIN_MANIFEST

      public static final ManifestMerger2.Invoker.Feature CHECK_IF_PACKAGE_IN_MAIN_MANIFEST
      Warn if the package attribute is present in the main manifest, or throw an exception if it's present and not equal to the component's namespace.

      This is used in AGP because users must migrate to the new namespace DSL.

    • DISABLE_STRIP_LIBRARY_TARGET_SDK

      public static final ManifestMerger2.Invoker.Feature DISABLE_STRIP_LIBRARY_TARGET_SDK
      Removes target SDK for library manifest
    • KEEP_GOING_AFTER_ERRORS

      public static final ManifestMerger2.Invoker.Feature KEEP_GOING_AFTER_ERRORS
      If set, merger will continue merging after any errors, allowing to surface errors in the "merged manifest" editor view.
    • VALIDATE_EXTRACT_NATIVE_LIBS_FROM_DEPENDENCIES

      public static final ManifestMerger2.Invoker.Feature VALIDATE_EXTRACT_NATIVE_LIBS_FROM_DEPENDENCIES
      Warn if the SdkConstants.ATTR_EXTRACT_NATIVE_LIBS attribute is set to true in a dependency manifest but not set to true in the merged manifest.
  • Method Details

    • values

      public static ManifestMerger2.Invoker.Feature[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static ManifestMerger2.Invoker.Feature valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null