public class Lint
extends com.android.build.gradle.internal.tasks.BaseTask
| Modifier and Type | Class and Description |
|---|---|
static class |
Lint.ConfigAction |
static class |
Lint.GlobalConfigAction |
static class |
Lint.LintGradleIssueRegistry |
static class |
Lint.VitalConfigAction |
| Modifier and Type | Field and Description |
|---|---|
static boolean |
MODEL_LIBRARIES
Whether lint should attempt to do deep analysis of libraries.
|
| Constructor and Description |
|---|
Lint() |
| Modifier and Type | Method and Description |
|---|---|
java.io.File |
getManifestReportFile(com.android.builder.model.Variant variant) |
org.gradle.api.file.FileCollection |
getManifestsForVariant() |
java.io.File |
getOutputsDir() |
void |
lint() |
void |
lintAllVariants(com.android.builder.model.AndroidProject modelProject)
Runs lint individually on all the variants, and then compares the results
across variants and reports these
|
void |
lintSingleVariant(com.android.builder.model.AndroidProject modelProject,
com.android.builder.model.Variant variant)
Runs lint on a single specified variant
|
void |
setFatalOnly(boolean fatalOnly) |
void |
setLintOptions(com.android.build.gradle.internal.dsl.LintOptions lintOptions) |
void |
setManifestReportFile(java.io.File manifestReportFile) |
void |
setOutputsDir(java.io.File outputsDir) |
void |
setReportsDir(java.io.File reportDir) |
void |
setSdkHome(java.io.File sdkHome) |
void |
setToolingRegistry(org.gradle.tooling.provider.model.ToolingModelBuilderRegistry toolingRegistry) |
getBuilder, getBuildTools, getILogger, setAndroidBuildergetVariantName, setVariantNameaddValidator, appendParallelSafeAction, compareTo, configure, deleteAllActions, dependsOn, dependsOnTaskDidWork, doFirst, doFirst, doLast, doLast, execute, finalizedBy, getActions, getAnt, getAsDynamicObject, getConvention, getDependsOn, getDescription, getDestroyables, getDidWork, getEnabled, getExecuter, getExtensions, getFinalizedBy, getGroup, getIdentityPath, getImpliesSubProjects, getInputs, getLogger, getLogging, getMustRunAfter, getName, getOnlyIf, getOutputs, getPath, getProject, getServices, getShouldRunAfter, getStandardOutputCapture, getState, getTaskActions, getTaskDependencies, getTemporaryDir, getTemporaryDirFactory, getValidators, hasProperty, injectIntoNewInstance, isEnabled, isHasCustomActions, leftShift, mustRunAfter, onlyIf, onlyIf, prependParallelSafeAction, property, setActions, setDependsOn, setDescription, setDidWork, setEnabled, setExecuter, setFinalizedBy, setGroup, setImpliesSubProjects, setMustRunAfter, setOnlyIf, setOnlyIf, setProperty, setShouldRunAfter, shouldRunAfter, toStringpublic static final boolean MODEL_LIBRARIES
The new behavior is clearly the correct behavior (see issue #194092), but since this is a risky fix, we're putting it behind a flag now and as soon as we get some real user testing, we should enable this by default and remove the old code.
@InputFiles @Optional public org.gradle.api.file.FileCollection getManifestsForVariant()
public void setLintOptions(@NonNull
com.android.build.gradle.internal.dsl.LintOptions lintOptions)
public void setSdkHome(@NonNull
java.io.File sdkHome)
public void setToolingRegistry(org.gradle.tooling.provider.model.ToolingModelBuilderRegistry toolingRegistry)
public void setReportsDir(@Nullable
java.io.File reportDir)
public void setFatalOnly(boolean fatalOnly)
public void lint()
throws java.io.IOException
java.io.IOExceptionpublic void lintAllVariants(@NonNull
com.android.builder.model.AndroidProject modelProject)
throws java.io.IOException
java.io.IOExceptionpublic void lintSingleVariant(@NonNull
com.android.builder.model.AndroidProject modelProject,
@NonNull
com.android.builder.model.Variant variant)
public void setManifestReportFile(@Nullable
java.io.File manifestReportFile)
@Nullable
public java.io.File getManifestReportFile(@Nullable
com.android.builder.model.Variant variant)
public void setOutputsDir(@Nullable
java.io.File outputsDir)
@Nullable public java.io.File getOutputsDir()