Package com.android.build.gradle.tasks
Class ExtractAnnotations
java.lang.Object
org.gradle.api.internal.AbstractTask
org.gradle.api.DefaultTask
com.android.build.gradle.internal.tasks.BaseTask
com.android.build.gradle.internal.tasks.AndroidVariantTask
com.android.build.gradle.internal.tasks.NonIncrementalTask
com.android.build.gradle.tasks.ExtractAnnotations
- All Implemented Interfaces:
com.android.build.gradle.internal.tasks.VariantAwareTask,Comparable<org.gradle.api.Task>,org.gradle.api.internal.DynamicObjectAware,org.gradle.api.internal.TaskInternal,org.gradle.api.plugins.ExtensionAware,org.gradle.api.Task,org.gradle.util.Configurable<org.gradle.api.Task>
@CacheableTask
public abstract class ExtractAnnotations
extends com.android.build.gradle.internal.tasks.NonIncrementalTask
Task which extracts annotations from the source files, and writes them to one of two possible
destinations:
- A "external annotations" file (pointed to by
getOutput()) which records the annotations in a zipped XML format for use by the IDE and by lint to associate the (source retention) annotations back with the compiled code
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface org.gradle.api.Task
org.gradle.api.Task.Namer -
Field Summary
Fields inherited from class com.android.build.gradle.internal.tasks.AndroidVariantTask
variantNameFields inherited from interface org.gradle.api.Task
TASK_ACTION, TASK_CONSTRUCTOR_ARGS, TASK_DEPENDS_ON, TASK_DESCRIPTION, TASK_GROUP, TASK_NAME, TASK_OVERWRITE, TASK_TYPE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidorg.gradle.api.file.FileCollectionBoot classpath: typically android.jarabstract org.gradle.api.file.ConfigurableFileCollectionThe encoding to use when reading source files.booleanorg.gradle.api.file.FileCollectionabstract org.gradle.api.provider.Property<com.android.build.gradle.internal.services.LintClassLoaderBuildService>abstract com.android.build.gradle.internal.lint.LintToolabstract org.gradle.api.file.RegularFilePropertyThe output .zip file to write the annotations database to, if anyorg.gradle.api.file.FileTreeabstract org.gradle.api.provider.Property<String>abstract org.gradle.api.file.RegularFilePropertyThe output .txt file to write the typedef recipe file to.voidsetBootClasspath(org.gradle.api.file.FileCollection bootClasspath) voidsetEncoding(String encoding) Methods inherited from class com.android.build.gradle.internal.tasks.NonIncrementalTask
taskActionMethods inherited from class com.android.build.gradle.internal.tasks.AndroidVariantTask
getVariantName, setVariantNameMethods inherited from class com.android.build.gradle.internal.tasks.BaseTask
getAnalyticsService, getProjectPath, getWorkerExecutor, recordTaskActionMethods inherited from class org.gradle.api.DefaultTask
compareTo, configure, dependsOn, doFirst, doFirst, doFirst, doLast, doLast, doLast, finalizedBy, getActions, getAnt, getDependsOn, getDescription, getDestroyables, getDidWork, getEnabled, getExtensions, getFinalizedBy, getGroup, getInputs, getLocalState, getLogger, getLogging, getMustRunAfter, getName, getOutputs, getPath, getProject, getShouldRunAfter, getState, getTaskDependencies, getTemporaryDir, getTimeout, hasProperty, mustRunAfter, onlyIf, onlyIf, onlyIf, property, setActions, setDependsOn, setDescription, setDidWork, setEnabled, setFinalizedBy, setGroup, setMustRunAfter, setOnlyIf, setOnlyIf, setOnlyIf, setProperty, setShouldRunAfter, shouldRunAfter, usesServiceMethods inherited from class org.gradle.api.internal.AbstractTask
appendParallelSafeAction, doNotTrackState, getAsDynamicObject, getConvention, getIdentityPath, getImpliesSubProjects, getLifecycleDependencies, getOnlyIf, getReasonNotToTrackState, getReasonTaskIsIncompatibleWithConfigurationCache, getRequiredServices, getServices, getSharedResources, getStandardOutputCapture, getTaskActions, getTaskIdentity, getTemporaryDirFactory, hasTaskActions, injectIntoNewInstance, isCompatibleWithConfigurationCache, isEnabled, isHasCustomActions, notCompatibleWithConfigurationCache, prependParallelSafeAction, setImpliesSubProjectsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.gradle.api.Task
doNotTrackState, getConvention, notCompatibleWithConfigurationCacheMethods inherited from interface com.android.build.gradle.internal.tasks.VariantAwareTask
getAnalyticsService
-
Constructor Details
-
ExtractAnnotations
public ExtractAnnotations()
-
-
Method Details
-
getLintTool
public abstract com.android.build.gradle.internal.lint.LintTool getLintTool() -
getSource
@NonNull @PathSensitive(NAME_ONLY) @InputFiles @IgnoreEmptyDirectories public org.gradle.api.file.FileTree getSource() -
getClasspath
@CompileClasspath public abstract org.gradle.api.file.ConfigurableFileCollection getClasspath() -
getBootClasspath
@CompileClasspath public org.gradle.api.file.FileCollection getBootClasspath()Boot classpath: typically android.jar -
setBootClasspath
public void setBootClasspath(org.gradle.api.file.FileCollection bootClasspath) -
getLibraries
@CompileClasspath public org.gradle.api.file.FileCollection getLibraries() -
getOutput
@OutputFile public abstract org.gradle.api.file.RegularFileProperty getOutput()The output .zip file to write the annotations database to, if any -
getTypedefFile
@OutputFile public abstract org.gradle.api.file.RegularFileProperty getTypedefFile()The output .txt file to write the typedef recipe file to. A "recipe" file is a file which describes typedef classes, typically ones that should be deleted. It is generated by thisExtractAnnotationstask and consumed by thecom.android.tools.lint.typedefs.TypedefRemover. -
getEncoding
The encoding to use when reading source files. The output file will ignore this and will always be a UTF-8 encoded .xml file inside the annotations zip file. -
setEncoding
-
getStrictTypedefRetention
-
getLintClassLoaderBuildService
@Internal public abstract org.gradle.api.provider.Property<com.android.build.gradle.internal.services.LintClassLoaderBuildService> getLintClassLoaderBuildService() -
doTaskAction
protected void doTaskAction()- Specified by:
doTaskActionin classcom.android.build.gradle.internal.tasks.NonIncrementalTask
-
getHasAndroidAnnotations
@Input public boolean getHasAndroidAnnotations()
-