lint
| Latest Update | Stable Release | Release Candidate | Beta Release | Alpha Release |
|---|---|---|---|---|
| May 20, 2025 | - | - | - | 1.0.0-alpha05 |
Declaring dependencies
To add a dependency on Lint, you must add the Google Maven repository to your project. Read Google's Maven repository for more information.
Add the dependencies for the artifacts you need in the build.gradle file for
your app or module:
Groovy
plugins { id("com.android.lint") } dependencies { lintChecks "androidx.lint:lint-gradle:1.0.0-alpha05" }
Kotlin
plugins { id("com.android.lint") } dependencies { lintChecks("androidx.lint:lint-gradle:1.0.0-alpha05") }
For more information about dependencies, see Add build dependencies.
Feedback
Your feedback helps make Jetpack better. Let us know if you discover new issues or have ideas for improving this library. Please take a look at the existing issues in this library before you create a new one. You can add your vote to an existing issue by clicking the star button.
See the Issue Tracker documentation for more information.
There are no release notes for this artifact.
Version 1.0
Version 1.0.0-alpha05
May 20, 2025
androidx.lint:lint-gradle:1.0.0-alpha05 is released. Version 1.0.0-alpha05 contains these commits.
New Features
- Add a check to warn about usages of
configurations.createandconfigurations.maybeCreateas these cause eager realization of that configuration starting with Gradle 8.14 and thus should be replaced withconfigurations.register. - Add a check to catch usages of internal Kotlin Gradle Plugin APIs
- Add a check to catch usages of
evaluationDependsOnandevaluationDependsOnChildrenas it is not safe with Isolated Projects feature.
Version 1.0.0-alpha04
April 23, 2025
androidx.lint:lint-gradle:1.0.0-alpha04 is released. Version 1.0.0-alpha04 contains these commits.
New Features
- Add a check for accidental
Provider<String>.toStringcalls as they are likely bugs. - Add check to catch uses of methods, properties, fields coming from internal types.
Bug Fixes
- Fix
GradleProjectIsolationcheck to allow usage ofProject.isolated. - Fix
WithTypeWithoutConfigureEachcheck to catch uses ofProject.tasks.withType<Task>()withoutconfigureEach. - Fix
InternalGradleApiUsagecheck to catch fully qualified usages of internal APIs.
Version 1.0.0-alpha03
December 11, 2024
androidx.lint:lint-gradle:1.0.0-alpha03 is released. Version 1.0.0-alpha03 contains these commits.
New Features
- Catch calls to
Provider<>.toStringas it is nearly always a bug to do that. - Catch calls of Kotlin collection extension functions on
TaskContaineras these cause eagerTaskcreation. - Catch calls to
ConfigurableFileCollection.frompassing in aConfigurationas that causes eager resolution of the configuration suggesting to useproject.files(configuration)orconfiguration.incoming.artifactView {}.files. - Catch usages of
Property<File>suggesting to useRegularFilePropertyorDirectoryPropertyas it is enforcing the use directory vs file.
Version 1.0.0-alpha02
September 4, 2024
androidx.lint:lint-gradle:1.0.0-alpha02 is released. Version 1.0.0-alpha02 contains these commits.
New Features
- Added a check for discouraged
GradleRunner.withPluginClasspathAPI. - Added checks for APIs that are problematic for lazy configuration by flagging calls to
TaskContainer.withTypewithout callingconfigureEach.- Added checks for APIs that are problematic for Gradle Project Isotation by flagging calls to
Project.getRootProject,Project.findProject,Project.getParent,Project.findProperty,Project.getProperties,Project.hasProperty,Project.property.
- Added checks for APIs that are problematic for Gradle Project Isotation by flagging calls to
Version 1.0.0-alpha01
February 21, 2024
androidx.lint:lint-gradle:1.0.0-alpha01 is released. Version 1.0.0-alpha01 contains these commits.
New Features
- An initial set of lint checks for Gradle Plugin authors to help them catch mistakes in their code. They are expected to be used on Gradle projects that apply
java-gradle-plugin. It will catch uses of internal Gradle and Android Gradle Plugin APIs and eager task configuration.