컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
린트
Gradle API 사용을 확인하는 린트 검사
최근 업데이트 |
안정화 버전 |
출시 후보 버전 |
베타 버전 |
알파 버전 |
2025년 5월 20일 |
- |
- |
- |
1.0.0-alpha05 |
종속 항목 선언
Lint의 종속 항목을 추가하려면 프로젝트에 Google Maven 저장소를 추가해야 합니다. 자세한 내용은 Google Maven 저장소를 읽어보세요.
다음과 같이 앱 또는 모듈의 build.gradle
파일에 필요한 아티팩트의 종속 항목을 추가합니다.
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")
}
종속 항목에 관한 자세한 내용은 빌드 종속 항목 추가를 참고하세요.
의견
제출하신 의견은 Jetpack을 개선하는 데 도움이 됩니다. 새로운 문제를 발견하거나 라이브러리 개선을 위한 아이디어가 있다면 Google에 알려 주세요. 새 문제를 제출하기 전에 이 라이브러리의 기존 문제를 살펴보시기 바랍니다. 별표 버튼을 클릭하여 기존 문제에 투표할 수 있습니다.
새로운 문제 제출하기
자세한 내용은 Issue Tracker 문서를 참고하세요.
이 아티팩트의 출시 노트는 없습니다.
버전 1.0
버전 1.0.0-alpha05
2025년 5월 20일
androidx.lint:lint-gradle:1.0.0-alpha05
이 출시되었습니다. 버전 1.0.0-alpha05에는 이 커밋이 포함되어 있습니다.
새로운 기능
configurations.create
및 configurations.maybeCreate
의 사용에 관한 경고를 추가합니다. Gradle 8.14부터 이 구성이 조기 실현되므로 configurations.register
로 대체해야 합니다.
- 내부 Kotlin Gradle 플러그인 API의 사용을 포착하는 검사를 추가합니다.
- 격리된 프로젝트 기능에서는 안전하지 않으므로
evaluationDependsOn
및 evaluationDependsOnChildren
사용을 포착하는 검사를 추가합니다.
버전 1.0.0-alpha04
2025년 4월 23일
androidx.lint:lint-gradle:1.0.0-alpha04
이 출시되었습니다. 버전 1.0.0-alpha04에는 이 커밋이 포함되어 있습니다.
새로운 기능
- 실수로 인한
Provider<String>.toString
호출이 버그일 수 있으므로 이를 확인하는 검사를 추가합니다.
- 내부 유형에서 발생하는 메서드, 속성, 필드의 사용을 포착하는 검사를 추가합니다.
버그 수정
Project.isolated
사용을 허용하도록 GradleProjectIsolation
검사를 수정합니다.
configureEach
없이 Project.tasks.withType<Task>()
사용을 포착하도록 WithTypeWithoutConfigureEach
검사를 수정했습니다.
- 내부 API의 정규화된 사용을 포착하도록
InternalGradleApiUsage
검사를 수정했습니다.
버전 1.0.0-alpha03
2024년 12월 11일
androidx.lint:lint-gradle:1.0.0-alpha03
이 출시되었습니다. 버전 1.0.0-alpha03에는 이 커밋이 포함되어 있습니다.
새로운 기능
Provider<>.toString
호출을 포착합니다. 거의 항상 버그가 발생하기 때문입니다.
TaskContainer
에서 Kotlin 컬렉션 확장 함수의 호출을 포착합니다. 이로 인해 조기 Task
생성이 발생하기 때문입니다.
Configuration
를 전달하는 ConfigurableFileCollection.from
호출을 포착합니다. 이렇게 하면 구성이 조기에 확인되어 project.files(configuration)
또는 configuration.incoming.artifactView {}.files
를 사용하도록 제안합니다.
- 디렉터리 대 파일 사용을 시행하므로
RegularFileProperty
또는 DirectoryProperty
를 사용하라고 제안하는 Property<File>
사용을 포착합니다.
버전 1.0.0-alpha02
2024년 9월 4일
androidx.lint:lint-gradle:1.0.0-alpha02
이 출시되었습니다. 버전 1.0.0-alpha02에는 이 커밋이 포함되어 있습니다.
새로운 기능
- 권장되지 않는
GradleRunner.withPluginClasspath
API에 대한 검사를 추가했습니다.
configureEach
를 호출하지 않고 TaskContainer.withType
호출을 신고하여 지연 구성에 문제가 있는 API에 대한 검사를 추가했습니다.
Project.getRootProject
, Project.findProject
, Project.getParent
, Project.findProperty
, Project.getProperties
, Project.hasProperty
, Project.property
호출을 신고하여 Gradle 프로젝트 격리와 관련된 문제가 있는 API에 대한 검사를 추가했습니다.
버전 1.0.0-alpha01
2024년 2월 21일
androidx.lint:lint-gradle:1.0.0-alpha01
이 출시되었습니다. 버전 1.0.0-alpha01에 포함된 커밋을 확인하세요.
새로운 기능
- Gradle 플러그인 작성자가 코드의 실수를 포착하는 데 도움이 되는 초기 린트 검사 세트입니다.
java-gradle-plugin
를 적용하는 Gradle 프로젝트에서 사용될 것으로 예상됩니다. 내부 Gradle 및 Android Gradle 플러그인 API와 조기 작업 구성의 사용을 포착합니다.
이 페이지에 나와 있는 콘텐츠와 코드 샘플에는 콘텐츠 라이선스에서 설명하는 라이선스가 적용됩니다. 자바 및 OpenJDK는 Oracle 및 Oracle 계열사의 상표 또는 등록 상표입니다.
최종 업데이트: 2025-07-27(UTC)
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["필요한 정보가 없음","missingTheInformationINeed","thumb-down"],["너무 복잡함/단계 수가 너무 많음","tooComplicatedTooManySteps","thumb-down"],["오래됨","outOfDate","thumb-down"],["번역 문제","translationIssue","thumb-down"],["샘플/코드 문제","samplesCodeIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-07-27(UTC)"],[],[],null,["# lint\n====\n\nAPI Reference \n[androidx.lint](/reference/kotlin/androidx/lint/package-summary) \nLint checks to verify usage of Gradle APIs \n\n| Latest Update | Stable Release | Release Candidate | Beta Release | Alpha Release |\n|---------------|----------------|-------------------|--------------|----------------------------------------------------------------|\n| May 20, 2025 | - | - | - | [1.0.0-alpha05](/jetpack/androidx/releases/lint#1.0.0-alpha05) |\n\nDeclaring dependencies\n----------------------\n\nTo add a dependency on Lint, you must add the Google Maven repository to your\nproject. Read [Google's Maven repository](/studio/build/dependencies#google-maven)\nfor more information.\n\nAdd the dependencies for the artifacts you need in the `build.gradle` file for\nyour app or module: \n\n### Groovy\n\n```groovy\nplugins {\n id(\"com.android.lint\")\n}\ndependencies {\n lintChecks \"androidx.lint:lint-gradle:1.0.0-alpha05\"\n}\n```\n\n### Kotlin\n\n```kotlin\nplugins {\n id(\"com.android.lint\")\n}\ndependencies {\n lintChecks(\"androidx.lint:lint-gradle:1.0.0-alpha05\")\n}\n```\n\nFor more information about dependencies, see [Add build dependencies](/studio/build/dependencies).\n\nFeedback\n--------\n\nYour feedback helps make Jetpack better. Let us know if you discover new issues or have\nideas for improving this library. Please take a look at the\n[existing issues](https://issuetracker.google.com/issues?q=componentid:1518777%20status:open)\nin this library before you create a new one. You can add your vote to an existing issue by\nclicking the star button.\n\n[Create a new issue](https://issuetracker.google.com/issues/new?component=1518777&template=1946997)\n\nSee the [Issue Tracker documentation](https://developers.google.com/issue-tracker)\nfor more information.\n\nThere are no release notes for this artifact.\n\nVersion 1.0\n-----------\n\n### Version 1.0.0-alpha05\n\nMay 20, 2025\n\n`androidx.lint:lint-gradle:1.0.0-alpha05` is released. Version 1.0.0-alpha05 contains [these commits](https://android.googlesource.com/platform/frameworks/support/+log/7bbd2bffb18b5a7d6ab44019d31979acc72315a7..cd41781824511ce4d5c4a05d2df4aaaee669f0bc/lint/lint-gradle).\n\n**New Features**\n\n- Add a check to warn about usages of `configurations.create` and `configurations.maybeCreate` as these cause eager realization of that configuration starting with Gradle 8.14 and thus should be replaced with `configurations.register`.\n- Add a check to catch usages of internal Kotlin Gradle Plugin APIs\n- Add a check to catch usages of `evaluationDependsOn` and `evaluationDependsOnChildren` as it is not safe with Isolated Projects feature.\n\n### Version 1.0.0-alpha04\n\nApril 23, 2025\n\n`androidx.lint:lint-gradle:1.0.0-alpha04` is released. Version 1.0.0-alpha04 contains [these commits](https://android.googlesource.com/platform/frameworks/support/+log/2ffcbb08c7221e79b12c0ef234bcfb5517d10ece..7bbd2bffb18b5a7d6ab44019d31979acc72315a7/lint/lint-gradle).\n\n**New Features**\n\n- Add a check for accidental `Provider\u003cString\u003e.toString` calls as they are likely bugs.\n- Add check to catch uses of methods, properties, fields coming from internal types.\n\n**Bug Fixes**\n\n- Fix `GradleProjectIsolation` check to allow usage of `Project.isolated`.\n- Fix `WithTypeWithoutConfigureEach` check to catch uses of `Project.tasks.withType\u003cTask\u003e()` without `configureEach`.\n- Fix `InternalGradleApiUsage` check to catch fully qualified usages of internal APIs.\n\n### Version 1.0.0-alpha03\n\nDecember 11, 2024\n\n`androidx.lint:lint-gradle:1.0.0-alpha03` is released. Version 1.0.0-alpha03 contains [these commits](https://android.googlesource.com/platform/frameworks/support/+log/9cd42c5cbf5e69b0223d5b0c357593175182f365..2ffcbb08c7221e79b12c0ef234bcfb5517d10ece/lint/lint-gradle).\n\n**New Features**\n\n- Catch calls to `Provider\u003c\u003e.toString` as it is nearly always a bug to do that.\n- Catch calls of Kotlin collection extension functions on `TaskContainer` as these cause eager `Task` creation.\n- Catch calls to `ConfigurableFileCollection.from` passing in a `Configuration` as that causes eager resolution of the configuration suggesting to use `project.files(configuration)` or `configuration.incoming.artifactView {}.files`.\n- Catch usages of `Property\u003cFile\u003e` suggesting to use `RegularFileProperty` or `DirectoryProperty` as it is enforcing the use directory vs file.\n\n### Version 1.0.0-alpha02\n\nSeptember 4, 2024\n\n`androidx.lint:lint-gradle:1.0.0-alpha02` is released. Version 1.0.0-alpha02 contains [these commits](https://android.googlesource.com/platform/frameworks/support/+log/e1b82c49c59d8e976ce558aba5586f6c61bc9054..9cd42c5cbf5e69b0223d5b0c357593175182f365/lint/lint-gradle).\n\n**New Features**\n\n- Added a check for discouraged `GradleRunner.withPluginClasspath` API.\n- Added checks for APIs that are problematic for lazy configuration by flagging calls to `TaskContainer.withType` without calling `configureEach`.\n - 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`.\n\n### Version 1.0.0-alpha01\n\nFebruary 21, 2024\n\n`androidx.lint:lint-gradle:1.0.0-alpha01` is released. [Version 1.0.0-alpha01 contains these commits.](https://android.googlesource.com/platform/frameworks/support/+log/e1b82c49c59d8e976ce558aba5586f6c61bc9054/lint/lint-gradle)\n\n**New Features**\n\n- 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."]]