Manages tasks creation.
Modifiers | Name | Description |
---|---|---|
static String |
ANDROID_GROUP |
|
static String |
BUILD_GROUP |
|
protected static String |
CONNECTED_CHECK |
|
static String |
DEFAULT_PROGUARD_CONFIG_FILE |
|
static String |
DIR_BUNDLES |
|
static String |
FILE_JACOCO_AGENT |
|
static String |
INSTALL_GROUP |
|
protected static String |
LINT_COMPILE |
|
static String |
TEST_RUNNER_ARGS_PROP |
Property used to define extra instrumentation test runner arguments. |
protected AndroidBuilder |
androidBuilder |
|
MockableAndroidJarTask |
createMockableJar |
|
protected AndroidConfig |
extension |
|
protected boolean |
isNdkTaskNeeded |
|
protected org.gradle.api.Project |
project |
|
protected SdkHandler |
sdkHandler |
|
protected org.gradle.tooling.provider.model.ToolingModelBuilderRegistry |
toolingRegistry |
Constructor and description |
---|
TaskManager
(org.gradle.api.Project project, AndroidBuilder androidBuilder, AndroidConfig extension, SdkHandler sdkHandler, DependencyManager dependencyManager, org.gradle.tooling.provider.model.ToolingModelBuilderRegistry toolingRegistry) |
Type | Name and description |
---|---|
AndroidTask<MergeResources> |
basicCreateMergeResourcesTask(TaskFactory tasks, VariantScope scope, String taskNamePrefix, File outputLocation, boolean includeDependencies, boolean process9Patch) |
void |
configureScopeForNdk(VariantScope scope) Override to configure NDK data in the scope. |
void |
createAidlTask(TaskFactory tasks, VariantScope scope) |
void |
createAnchorTasks(TaskFactory tasks, VariantScope scope) |
void |
createAndroidTestVariantTasks(TaskFactory tasks, TestVariantData variantData) Creates the tasks to build android tests. |
org.gradle.api.Task |
createAssembleTask(BaseVariantOutputData variantOutputData) |
org.gradle.api.Task |
createAssembleTask(TaskFactory tasks, BaseVariantData<? extends BaseVariantOutputData> variantData) |
void |
createBuildConfigTask(TaskFactory tasks, VariantScope scope) |
void |
createCheckManifestTask(TaskFactory tasks, VariantScope scope) |
protected void |
createConnectedTestForVariant(TaskFactory tasks, VariantScope variantScope) |
void |
createGenerateMicroApkDataTask(TaskFactory tasks, VariantScope scope, org.gradle.api.artifacts.Configuration config) |
void |
createGenerateResValuesTask(TaskFactory tasks, VariantScope scope) |
void |
createJackTask(TaskFactory tasks, VariantScope scope) |
PostCompilationData |
createJacocoTask(TaskFactory tasks, VariantScope scope, PostCompilationData pcData) |
static void |
createJarTask(TaskFactory tasks, VariantScope scope) |
AndroidTask<org.gradle.api.tasks.compile.JavaCompile> |
createJavacTask(TaskFactory tasks, VariantScope scope) Creates the task for creating *.class files using javac. |
void |
createLintTasks(TaskFactory tasks, VariantScope scope) Add tasks for running lint on individual variants. |
void |
createMergeAppManifestsTask(TaskFactory tasks, VariantScope variantScope) |
void |
createMergeAssetsTask(TaskFactory tasks, VariantScope scope) |
void |
createMergeLibManifestsTask(TaskFactory tasks, VariantScope scope) |
AndroidTask<MergeResources> |
createMergeResourcesTask(TaskFactory tasks, VariantScope scope) |
void |
createMockableJarTask() |
void |
createNdkTasks(VariantScope scope) |
void |
createPackagingTask(TaskFactory tasks, VariantScope variantScope, boolean publishApk) Creates the final packaging task, and optionally the zipalign task (if the variant is signed) |
void |
createPostCompilationTasks(TaskFactory tasks, VariantScope scope) Creates the post-compilation tasks for the given Variant. |
void |
createPreprocessResourcesTask(TaskFactory tasks, VariantScope scope) |
void |
createProcessJavaResTask(TaskFactory tasks, VariantScope scope) |
void |
createProcessResTask(TaskFactory tasks, VariantScope scope, boolean generateResourcePackage) |
void |
createProcessResTask(TaskFactory tasks, VariantScope scope, File symbolLocation, boolean generateResourcePackage) |
protected void |
createProcessTestManifestTask(TaskFactory tasks, VariantScope scope) |
void |
createRenderscriptTask(TaskFactory tasks, VariantScope scope) |
void |
createReportTasks(List<BaseVariantData<? extends BaseVariantOutputData>> variantDataList) |
void |
createSplitAbiTasks(VariantScope scope) |
void |
createSplitResourcesTasks(VariantScope scope) Creates the split resources packages task if necessary. |
void |
createTasksBeforeEvaluate(TaskFactory tasks) Create tasks before the evaluation (on plugin apply). |
void |
createTasksForVariantData(TaskFactory tasks, BaseVariantData<? extends BaseVariantOutputData> variantData) Creates the tasks for a given BaseVariantData. |
void |
createTopLevelTestTasks(TaskFactory tasks, boolean hasFlavors) |
void |
createUnitTestVariantTasks(TaskFactory tasks, TestVariantData variantData) Creates the tasks to build unit tests. |
ZipAlign |
createZipAlignTask(String name, File inputFile, File outputFile) creates a zip align. |
protected AndroidTaskRegistry |
getAndroidTasks() |
protected AndroidConfig |
getExtension() |
GlobalScope |
getGlobalScope() |
org.gradle.api.tasks.Copy |
getJacocoAgentTask() |
Set<File> |
getJniFolders(VariantScope scope) Calculate the list of folders that can contain jni artifacts for this variant. |
protected org.gradle.api.logging.Logger |
getLogger() |
protected Collection<Object> |
getNdkBuildable(BaseVariantData variantData) Returns a collection of buildables that creates native object. |
File |
maybeCreateProguardTasks(TaskFactory tasks, VariantScope scope, PostCompilationData pcData) Creates the proguarding task for the given Variant if necessary. |
static void |
optionalDependsOn(org.gradle.api.Task main, org.gradle.api.Task... dependencies) |
static void |
optionalDependsOn(org.gradle.api.Task main, List<?> dependencies) |
void |
resolveDependencies(VariantDependencies variantDeps, VariantDependencies testedVariantDeps, String testedProjectPath) |
static void |
setJavaCompilerTask(AndroidTask<? extends org.gradle.api.tasks.compile.AbstractCompile> javaCompilerTask, TaskFactory tasks, VariantScope scope) Makes the given task the one used by top-level "compile" task. |
Property used to define extra instrumentation test runner arguments.
Override to configure NDK data in the scope.
Creates the tasks to build android tests.
Creates the task for creating *.class files using javac. These tasks are created regardless of whether Jack is used or not, but assemble will not depend on them if it is. They are always used when running unit tests.
Add tasks for running lint on individual variants. We've already added a lint task earlier which runs on all variants.
Creates the final packaging task, and optionally the zipalign task (if the variant is signed)
publishApk
- if true the generated APK gets published.Creates the post-compilation tasks for the given Variant. These tasks create the dex file from the .class files, plus optional intermediary steps like proguard and jacoco
Creates the split resources packages task if necessary. AAPT will produce split packages for all --split provided parameters. These split packages should be signed and moved unchanged to the APK build output directory.
Create tasks before the evaluation (on plugin apply). This is useful for tasks that could be referenced by custom build logic.
Creates the tasks for a given BaseVariantData.
Creates the tasks to build unit tests.
creates a zip align. This does not use convention mapping, and is meant to let other plugin create zip align tasks.
name
- the name of the taskinputFile
- the input fileoutputFile
- the output fileCalculate the list of folders that can contain jni artifacts for this variant.
Returns a collection of buildables that creates native object. A buildable is considered to be any object that can be used as the argument to Task.dependsOn. This could be a Task or a BuildableModelElement (e.g. BinarySpec).
Creates the proguarding task for the given Variant if necessary.
Makes the given task the one used by top-level "compile" task.