@Mojo(name="manifest-merger", defaultPhase=PROCESS_RESOURCES) public class ManifestMergerMojo extends AbstractAndroidMojo
AndroidManifest.xml
file.
http://tools.android.com/tech-docs/new-build-system/user-guide/manifest-mergerModifier and Type | Field and Description |
---|---|
protected Boolean |
manifestMergeLibraries
Merge Manifest with library projects.
|
protected File |
manifestMergeReportFile
Merge Manifest with library projects.
|
protected UsesSdk |
manifestUsesSdk
Update the uses-sdk tag.
|
protected Integer |
manifestVersionCode
Update the
android:versionCode attribute with the specified parameter. |
protected Boolean |
manifestVersionCodeUpdateFromVersion
Update the
android:versionCode attribute automatically from the project version
e.g 3.2.1 will become version code 3002001. |
protected String |
manifestVersionDigits
The number of digits per version element.
|
protected String |
manifestVersionName
Update the
android:versionName with the specified parameter. |
protected String |
manifestVersionNamingPattern
Optionally use a pattern to match version elements for automatic generation of version codes,
useful in case of complex version naming schemes.
|
aaptExtraArgs, aaptVerbose, adbConnectionTimeout, androidManifestFile, assetsDirectory, attachJar, attachSources, combinedAssets, configurations, customPackage, dependencyGraphBuilder, destinationManifestFile, device, devices, deviceThreads, ENV_ANDROID_HOME, ENV_ANDROID_NDK_HOME, execution, extractedDependenciesDirectory, extractedDependenciesJavaResources, extractedDependenciesJavaSources, finalName, genDirectory, generateApk, ips, nativeLibrariesDirectory, ndkOutputDirectory, proguardFile, project, projectHelper, projectOutputDirectory, release, renameManifestPackage, resourceDirectory, resourceOverlayDirectories, resourceOverlayDirectory, resources, session, sourceDirectory, sourceEncoding, SUPPORTED_PACKAGING_TYPES, targetDirectory, undeployBeforeDeploy
Constructor and Description |
---|
ManifestMergerMojo() |
Modifier and Type | Method and Description |
---|---|
void |
execute() |
void |
manifestMergerV2() |
copyFolder, deployApk, deployBuiltApk, deployDependencies, doWithDevices, extractInstrumentationRunnerFromAndroidManifest, extractPackageNameFromAndroidArtifact, extractPackageNameFromAndroidManifest, extractPackageNameFromAndroidManifestXmlTree, extractPackageNameFromApk, getAndroidManifestPackageName, getAndroidNdk, getAndroidSdk, getArtifactResolverHelper, getDependencyResolver, getDirectDependencyArtifacts, getJack, getLibraryUnpackDirectory, getNativeHelper, getRelevantCompileArtifacts, getResourceOverlayDirectories, getTransitiveDependencyArtifacts, getTransitiveDependencyArtifacts, getUnpackedAarClassesJar, getUnpackedApkLibSourceFolder, getUnpackedLibAssetsFolder, getUnpackedLibFolder, getUnpackedLibHelper, getUnpackedLibNativesFolder, getUnpackedLibResourceFolder, getUnpackedLibsDirectory, initAndroidDebugBridge, isAPKBuild, isInstrumentationTest, resolveArtifactToFile, undeployApk, undeployApk, waitForInitialDeviceList
@Parameter(property="android.manifestMerger.versionName", defaultValue="${project.version}") protected String manifestVersionName
android:versionName
with the specified parameter. If left empty it
will use the version number of the project. Exposed via the project property
android.manifestMerger.versionName
.@Parameter(property="android.manifestMerger.versionCode", defaultValue="1") protected Integer manifestVersionCode
android:versionCode
attribute with the specified parameter. Exposed via
the project property android.manifestMerger.versionCode
.@Parameter(property="android.manifest.versionCodeUpdateFromVersion", defaultValue="false") protected Boolean manifestVersionCodeUpdateFromVersion
android:versionCode
attribute automatically from the project version
e.g 3.2.1 will become version code 3002001. As described in this blog post
http://www.simpligility.com/2010/11/release-version-management-for-your-android-application/
but done without using resource filtering. The value is exposed via the project property
property android.manifest.versionCodeUpdateFromVersion
and the resulting value
as android.manifest.versionCode
.
For the purpose of generating the versionCode, if a version element is missing it is presumed to be 0.
The maximum values for the version increment and version minor values are 999,
the version major should be no larger than 2000. Any other suffixes do not
participate in the version code generation.@Parameter(property="android.manifestMerger.versionNamingPattern") protected String manifestVersionNamingPattern
android.manifestMerger.versionNamingPattern
.@Parameter(property="android.manifestMerger.versionDigits", defaultValue="4,3,3") protected String manifestVersionDigits
android.manifestMerger.versionDigits
.@Parameter(property="android.manifestMerger.mergeLibraries", defaultValue="false") protected Boolean manifestMergeLibraries
android.manifestMerger.mergeLibraries
.@Parameter(property="android.manifestMerger.mergeReportFile") protected File manifestMergeReportFile
android.manifestMerger.mergeLibraries
.protected UsesSdk manifestUsesSdk
android:minSdkVersion
,
android:maxSdkVersion
and android:targetSdkVersion
public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
public void manifestMergerV2() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
Copyright © 2008–2019 simpligility technologies inc.. All rights reserved.