با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
پرز
Lint برای تأیید استفاده از Gradle API ها را بررسی می کند
آخرین به روز رسانی | انتشار پایدار | کاندید را آزاد کنید | نسخه بتا | انتشار آلفا |
---|
20 مه 2025 | - | - | - | 1.0.0-alpha05 |
اعلام وابستگی ها
برای افزودن وابستگی به Lint، باید مخزن Google Maven را به پروژه خود اضافه کنید. برای اطلاعات بیشتر، مخزن Maven Google را بخوانید.
وابستگیهای مصنوعات مورد نیاز خود را در فایل build.gradle
برای برنامه یا ماژول خود اضافه کنید:
شیار
plugins {
id("com.android.lint")
}
dependencies {
lintChecks "androidx.lint:lint-gradle:1.0.0-alpha05"
}
کاتلین
plugins {
id("com.android.lint")
}
dependencies {
lintChecks("androidx.lint:lint-gradle:1.0.0-alpha05")
}
برای اطلاعات بیشتر درباره وابستگیها، به افزودن وابستگیهای ساخت نگاه کنید.
بازخورد
بازخورد شما به بهتر شدن Jetpack کمک می کند. اگر مسائل جدیدی کشف کردید یا ایده هایی برای بهبود این کتابخانه دارید، به ما اطلاع دهید. لطفاً قبل از ایجاد کتابخانه جدید، به مسائل موجود در این کتابخانه نگاهی بیندازید. با کلیک کردن روی دکمه ستاره می توانید رای خود را به یک موضوع موجود اضافه کنید.
یک شماره جدید ایجاد کنید
برای اطلاعات بیشتر به مستندات ردیاب مشکل مراجعه کنید.
هیچ یادداشت انتشار برای این مصنوع وجود ندارد.
نسخه 1.0
نسخه 1.0.0-alpha05
20 مه 2025
androidx.lint:lint-gradle:1.0.0-alpha05
منتشر شد. نسخه 1.0.0-alpha05 حاوی این تعهدات است.
ویژگی های جدید
- یک بررسی اضافه کنید تا در مورد استفاده از
configurations.create
و configurations.maybeCreate
هشدار دهید زیرا اینها باعث می شوند که پیکربندی مشتاقانه با Gradle 8.14 شروع شود و بنابراین باید با configurations.register
جایگزین شود. - یک چک اضافه کنید تا موارد استفاده از APIهای داخلی پلاگین Kotlin Gradle را دریافت کنید
- چکی اضافه کنید تا موارد استفاده از
evaluationDependsOn
و evaluationDependsOnChildren
کودکان ارزیابی شود، زیرا با ویژگی پروژههای جدا شده ایمن نیست.
نسخه 1.0.0-alpha04
23 آوریل 2025
androidx.lint:lint-gradle:1.0.0-alpha04
منتشر شد. نسخه 1.0.0-alpha04 حاوی این تعهدات است.
ویژگی های جدید
- چکی برای تماسهای تصادفی
Provider<String>.toString
اضافه کنید زیرا احتمالاً باگ هستند. - برای استفاده از روشها، ویژگیها، فیلدهایی که از انواع داخلی میآیند، چک را اضافه کنید.
رفع اشکال
- بررسی
GradleProjectIsolation
را رفع کنید تا امکان استفاده از Project.isolated
فراهم شود. - برای دریافت موارد استفاده از
Project.tasks.withType<Task>()
بدون configureEach
تیک WithTypeWithoutConfigureEach
رفع کنید. - بررسی
InternalGradleApiUsage
را رفع کنید تا استفادههای کاملاً واجد شرایط APIهای داخلی را دریافت کنید.
نسخه 1.0.0-alpha03
11 دسامبر 2024
androidx.lint:lint-gradle:1.0.0-alpha03
منتشر شد. نسخه 1.0.0-alpha03 حاوی این تعهدات است.
ویژگی های جدید
- تماسها را با
Provider<>.toString
بگیرید زیرا تقریباً همیشه برای انجام این کار باگ است. - فراخوانی های توابع پسوند مجموعه Kotlin را در
TaskContainer
بگیرید زیرا باعث ایجاد مشتاقانه Task
می شود. - تماسهای
ConfigurableFileCollection.from
ارسال در یک Configuration
را دریافت کنید، زیرا باعث وضوح مشتاقانه در پیکربندی میشود که پیشنهاد میکند از project.files(configuration)
یا configuration.incoming.artifactView {}.files
استفاده کنید. - موارد استفاده از
Property<File>
را دریافت کنید که پیشنهاد می کند از RegularFileProperty
یا DirectoryProperty
استفاده کنید زیرا دایرکتوری use در مقابل فایل را اعمال می کند.
نسخه 1.0.0-alpha02
4 سپتامبر 2024
androidx.lint:lint-gradle:1.0.0-alpha02
منتشر شد. نسخه 1.0.0-alpha02 حاوی این تعهدات است.
ویژگی های جدید
- یک بررسی برای
GradleRunner.withPluginClasspath
API دلسرد شده اضافه شد. - بررسیهایی برای APIهایی اضافه شد که برای پیکربندی تنبل مشکلساز هستند، با پرچمگذاری تماسها به
TaskContainer.withType
بدون فراخوانی configureEach
.- بررسیهایی برای APIهایی که برای Gradle Project Isotation مشکلساز هستند با علامتگذاری تماسها به
Project.getRootProject
، Project.findProject
، Project.getParent
، Project.findProperty
، Project.getProperties
، Project.hasProperty
، Project.property
اضافه شد.
نسخه 1.0.0-alpha01
21 فوریه 2024
androidx.lint:lint-gradle:1.0.0-alpha01
منتشر شد. نسخه 1.0.0-alpha01 حاوی این commit ها است.
ویژگی های جدید
- مجموعه اولیهای از بررسیهای لینت برای نویسندگان پلاگین Gradle تا به آنها کمک کند تا اشتباهات کد خود را پیدا کنند. انتظار می رود از آنها در پروژه های Gradle استفاده شود که از
java-gradle-plugin
استفاده می کنند. استفاده از APIهای داخلی Gradle و Android Gradle Plugin و پیکربندی کار مشتاق را جلب خواهد کرد.
محتوا و نمونه کدها در این صفحه مشمول پروانههای توصیفشده در پروانه محتوا هستند. جاوا و OpenJDK علامتهای تجاری یا علامتهای تجاری ثبتشده Oracle و/یا وابستههای آن هستند.
تاریخ آخرین بهروزرسانی 2025-07-29 بهوقت ساعت هماهنگ جهانی.
[[["درک آسان","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-29 بهوقت ساعت هماهنگ جهانی."],[],[],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."]]