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,java.lang.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.NonIncrementalTaskTask 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 Classes Modifier and Type Class Description static classExtractAnnotations.CreationAction
-
Constructor Summary
Constructors Constructor Description ExtractAnnotations()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voiddoTaskAction()org.gradle.api.file.FileCollectiongetBootClasspath()Boot classpath: typically android.jarorg.gradle.api.file.FileCollectiongetClasspath()java.lang.StringgetEncoding()The encoding to use when reading source files.booleangetHasAndroidAnnotations()org.gradle.api.file.FileCollectiongetLibraries()abstract org.gradle.api.provider.Property<com.android.build.gradle.internal.services.LintClassLoaderBuildService>getLintClassLoaderBuildService()abstract com.android.build.gradle.internal.lint.LintToolgetLintTool()abstract org.gradle.api.file.RegularFilePropertygetOutput()The output .zip file to write the annotations database to, if anyorg.gradle.api.file.FileTreegetSource()abstract org.gradle.api.provider.Property<java.lang.String>getStrictTypedefRetention()abstract org.gradle.api.file.RegularFilePropertygetTypedefFile()The output .txt file to write the typedef recipe file to.voidsetBootClasspath(org.gradle.api.file.FileCollection bootClasspath)voidsetEncoding(java.lang.String encoding)voidsource(java.lang.Object source)Used by the variant API-
Methods inherited from class com.android.build.gradle.internal.tasks.AndroidVariantTask
getVariantName, setVariantName
-
Methods inherited from class com.android.build.gradle.internal.tasks.BaseTask
getAnalyticsService, getProjectPath, getWorkerExecutor, recordTaskAction
-
Methods 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, property, setActions, setDependsOn, setDescription, setDidWork, setEnabled, setFinalizedBy, setGroup, setMustRunAfter, setOnlyIf, setOnlyIf, setProperty, setShouldRunAfter, shouldRunAfter, usesService
-
Methods inherited from class org.gradle.api.internal.AbstractTask
appendParallelSafeAction, doNotTrackState, getAsDynamicObject, getConvention, getIdentityPath, getImpliesSubProjects, getOnlyIf, getReasonNotToTrackState, getRequiredServices, getServices, getSharedResources, getStandardOutputCapture, getTaskActions, getTaskIdentity, getTemporaryDirFactory, hasTaskActions, injectIntoNewInstance, isEnabled, isHasCustomActions, prependParallelSafeAction, setImpliesSubProjects
-
-
-
-
Method Detail
-
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 org.gradle.api.file.FileCollection getClasspath()
-
source
public void source(java.lang.Object source)
Used by the variant API
-
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
@NonNull @Input public java.lang.String 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
public void setEncoding(java.lang.String encoding)
-
getStrictTypedefRetention
@Input public abstract org.gradle.api.provider.Property<java.lang.String> 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()
-
-