com.android.manifmerger
Class ManifestMerger2

java.lang.Object
  extended by com.android.manifmerger.ManifestMerger2

@Immutable
public class ManifestMerger2
extends java.lang.Object

merges android manifest files, idempotent.


Nested Class Summary
static interface ManifestMerger2.AutoAddingProperty
          Defines a property that can add or override itself into an XML document.
static class ManifestMerger2.Invoker<T extends ManifestMerger2.Invoker<T>>
          This class will hold all invocation parameters for the manifest merging tool.
static class ManifestMerger2.MapBasedKeyBasedValueResolver<T>
          Helper class for map based placeholders key value pairs.
static class ManifestMerger2.MergeFailureException
           
static class ManifestMerger2.MergeType
          Defines the merging type expected from the tool.
static class ManifestMerger2.SystemProperty
          List of manifest files properties that can be directly overridden without using a placeholder.
 
Method Summary
static ManifestMerger2.Invoker newMerger(java.io.File mainManifestFile, com.android.utils.ILogger logger, ManifestMerger2.MergeType mergeType)
          Creates a new ManifestMerger2.Invoker instance to invoke the merging tool to merge manifest files for an application.
protected  void performSystemPropertiesInjection(com.android.manifmerger.MergingReport.Builder mergingReport, XmlDocument xmlDocument)
          Perform ManifestMerger2.SystemProperty injection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

newMerger

public static ManifestMerger2.Invoker newMerger(@NonNull
                                                java.io.File mainManifestFile,
                                                @NonNull
                                                com.android.utils.ILogger logger,
                                                @NonNull
                                                ManifestMerger2.MergeType mergeType)
Creates a new ManifestMerger2.Invoker instance to invoke the merging tool to merge manifest files for an application.

Parameters:
mainManifestFile - application main manifest file.
logger - the logger interface to use.
Returns:
an ManifestMerger2.Invoker instance that will allow further customization and trigger the merging tool.

performSystemPropertiesInjection

protected void performSystemPropertiesInjection(com.android.manifmerger.MergingReport.Builder mergingReport,
                                                XmlDocument xmlDocument)
Perform ManifestMerger2.SystemProperty injection.

Parameters:
mergingReport - to log actions and errors.
xmlDocument - the xml document to inject into.