public abstract class ProcessTestManifest extends ManifestProcessorTask
For both test modules and tests in androidTest process is the same, expect for how the tested application id is extracted.
Tests in androidTest get that info form the
VariantConfiguration.getTestedApplicationId(), while the test modules get the info from
the published intermediate manifest with type AndroidArtifacts.TYPE_METADATA
of the tested app.
| Modifier and Type | Class and Description |
|---|---|
static class |
ProcessTestManifest.CreationAction |
checkManifestResult| Constructor and Description |
|---|
ProcessTestManifest(org.gradle.api.model.ObjectFactory objectFactory) |
| Modifier and Type | Method and Description |
|---|---|
java.util.List<com.android.manifmerger.ManifestProvider> |
computeProviders()
Compute the final list of providers based on the manifest file collection.
|
protected void |
doFullTaskAction() |
java.io.File |
getAaptFriendlyManifestOutputFile()
The aapt friendly processed Manifest.
|
java.lang.Boolean |
getFunctionalTest() |
java.lang.Boolean |
getHandleProfiling() |
java.lang.String |
getInstrumentationRunner() |
org.gradle.api.file.FileCollection |
getManifests() |
java.lang.String |
getMinSdkVersion() |
com.android.build.gradle.internal.scope.OutputScope |
getOutputScope() |
java.util.Map<java.lang.String,java.lang.Object> |
getPlaceholdersValues() |
java.lang.String |
getTargetSdkVersion() |
java.lang.String |
getTestApplicationId() |
java.lang.String |
getTestedApplicationId() |
java.lang.String |
getTestLabel() |
java.io.File |
getTestManifestFile() |
org.gradle.api.file.FileCollection |
getTestTargetMetadata() |
java.io.File |
getTmpDir() |
void |
mergeManifestsForTestVariant(java.lang.String testApplicationId,
java.lang.String minSdkVersion,
java.lang.String targetSdkVersion,
java.lang.String testedApplicationId,
java.lang.String instrumentationRunner,
java.lang.Boolean handleProfiling,
java.lang.Boolean functionalTest,
java.lang.String testLabel,
java.io.File testManifestFile,
java.util.List<? extends com.android.manifmerger.ManifestProvider> manifestProviders,
java.util.Map<java.lang.String,java.lang.Object> manifestPlaceholders,
java.io.File outManifest,
java.io.File tmpDir)
Creates the manifest for a test variant
|
void |
setTestManifestFile(java.io.File testManifestFile) |
void |
setTmpDir(java.io.File tmpDir) |
getAaptFriendlyManifestOutputDirectory, getBundleManifestOutputDirectory, getCheckManifestResult, getInstantAppManifestOutputDirectory, getManifestOutputDirectory, getMergeBlameFile, getMetadataFeatureManifestOutputDirectory, getReportFile, outputMergeBlameContents, serializeMap, setBundleManifestOutputDirectory, setMetadataFeatureManifestOutputDirectory, setReportFiledoIncrementalTaskAction, getIncremental, getIncrementalFolder, setIncrementalFolder, taskAction$gradlegetVariantName, recordTaskAction, setVariantNamenewInputDirectory, newInputFile, newOutputDirectory, newOutputFileappendParallelSafeAction, compareTo, configure, dependsOn, doFirst, doFirst, doFirst, doLast, doLast, doLast, finalizedBy, getActions, getAnt, getAsDynamicObject, getConvention, getDependsOn, getDescription, getDestroyables, getDidWork, getEnabled, getExtensions, getFinalizedBy, getGroup, getIdentityPath, getImpliesSubProjects, getInputs, getLocalState, getLogger, getLogging, getMustRunAfter, getName, getOnlyIf, getOutputs, getPath, getProject, getServices, getShouldRunAfter, getStandardOutputCapture, getState, getTaskActions, getTaskDependencies, getTaskIdentity, getTemporaryDir, getTemporaryDirFactory, getTimeout, hasProperty, hasTaskActions, injectIntoNewInstance, isEnabled, isHasCustomActions, mustRunAfter, onlyIf, onlyIf, prependParallelSafeAction, property, replaceLogger, setActions, setDependsOn, setDescription, setDidWork, setEnabled, setFinalizedBy, setGroup, setImpliesSubProjects, setMustRunAfter, setOnlyIf, setOnlyIf, setProperty, setShouldRunAfter, shouldRunAfter, toString@Inject public ProcessTestManifest(org.gradle.api.model.ObjectFactory objectFactory)
public com.android.build.gradle.internal.scope.OutputScope getOutputScope()
protected void doFullTaskAction()
throws java.io.IOException
doFullTaskAction in class com.android.build.gradle.internal.tasks.IncrementalTaskjava.io.IOExceptionpublic void mergeManifestsForTestVariant(@NonNull
java.lang.String testApplicationId,
@NonNull
java.lang.String minSdkVersion,
@NonNull
java.lang.String targetSdkVersion,
@NonNull
java.lang.String testedApplicationId,
@NonNull
java.lang.String instrumentationRunner,
@NonNull
java.lang.Boolean handleProfiling,
@NonNull
java.lang.Boolean functionalTest,
@Nullable
java.lang.String testLabel,
@Nullable
java.io.File testManifestFile,
@NonNull
java.util.List<? extends com.android.manifmerger.ManifestProvider> manifestProviders,
@NonNull
java.util.Map<java.lang.String,java.lang.Object> manifestPlaceholders,
@NonNull
java.io.File outManifest,
@NonNull
java.io.File tmpDir)
testApplicationId - the application id of the test applicationminSdkVersion - the minSdkVersion of the test applicationtargetSdkVersion - the targetSdkVersion of the test applicationtestedApplicationId - the application id of the tested applicationinstrumentationRunner - the name of the instrumentation runnerhandleProfiling - whether or not the Instrumentation object will turn profiling on and
offfunctionalTest - whether or not the Instrumentation class should run as a functional
testtestLabel - the label for the teststestManifestFile - optionally user provided AndroidManifest.xml for testing applicationmanifestProviders - the manifest providersmanifestPlaceholders - used placeholders in the manifestoutManifest - the output location for the merged manifesttmpDir - temporary dir used for processing@Nullable public java.io.File getAaptFriendlyManifestOutputFile()
ManifestProcessorTaskgetAaptFriendlyManifestOutputFile in class ManifestProcessorTask@Nullable @InputFile @Optional public java.io.File getTestManifestFile()
public void setTestManifestFile(@Nullable
java.io.File testManifestFile)
public java.io.File getTmpDir()
public void setTmpDir(java.io.File tmpDir)
@Input public java.lang.String getTestApplicationId()
@Input @Optional public java.lang.String getTestedApplicationId()
@Input public java.lang.String getMinSdkVersion()
@Input public java.lang.String getTargetSdkVersion()
@Input public java.lang.String getInstrumentationRunner()
@Input public java.lang.Boolean getHandleProfiling()
@Input public java.lang.Boolean getFunctionalTest()
@Input @Optional public java.lang.String getTestLabel()
@Input public java.util.Map<java.lang.String,java.lang.Object> getPlaceholdersValues()
@InputFiles @Optional public org.gradle.api.file.FileCollection getTestTargetMetadata()
public java.util.List<com.android.manifmerger.ManifestProvider> computeProviders()
@InputFiles public org.gradle.api.file.FileCollection getManifests()