संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
लिंट
Gradle के एपीआई के इस्तेमाल की पुष्टि करने के लिए, Lint की जांच
नया अपडेट |
रिलीज़ किया गया जांचा और परखा हुआ वर्शन |
रिलीज़ कैंडिडेट |
बीटा रिलीज़ |
ऐल्फ़ा रिलीज़ |
20 मई, 2025 |
- |
- |
- |
1.0.0-alpha05 |
डिपेंडेंसी का एलान करना
Lint पर डिपेंडेंसी जोड़ने के लिए, आपको अपने प्रोजेक्ट में Google Maven रिपॉज़िटरी जोड़नी होगी. ज़्यादा जानकारी के लिए, Google की Maven रिपॉज़िटरी पढ़ें.
अपने ऐप्लिकेशन या मॉड्यूल के लिए, build.gradle
फ़ाइल में उन आर्टफ़ैक्ट की डिपेंडेंसी जोड़ें जिनकी आपको ज़रूरत है:
ग्रूवी
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 को बेहतर बनाने में मदद मिलती है. अगर आपको कोई नई समस्या मिलती है या इस लाइब्रेरी को बेहतर बनाने के लिए आपके पास कोई सुझाव है, तो हमें बताएं. नई लाइब्रेरी बनाने से पहले, कृपया इस लाइब्रेरी में मौजूद मौजूदा समस्याओं पर एक नज़र डालें. किसी मौजूदा समस्या पर अपना वोट जोड़ने के लिए, स्टार बटन पर क्लिक करें.
नई समस्या बनाना
ज़्यादा जानकारी के लिए, समस्या ट्रैकर का दस्तावेज़ देखें.
इस आर्टफ़ैक्ट के लिए रिलीज़ नोट उपलब्ध नहीं हैं.
वर्शन 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
से बदल दिया जाना चाहिए.
- 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
कॉल की जांच करने की सुविधा जोड़ें, क्योंकि ये गड़बड़ियां हो सकती हैं.
- इंटरनल टाइप से आने वाले तरीकों, प्रॉपर्टी, फ़ील्ड के इस्तेमाल को पकड़ने के लिए जांच जोड़ें.
गड़बड़ियां ठीक की गईं
Project.isolated
का इस्तेमाल करने की अनुमति देने के लिए, GradleProjectIsolation
चेक को ठीक करें.
configureEach
के बिना Project.tasks.withType<Task>()
के इस्तेमाल का पता लगाने के लिए, WithTypeWithoutConfigureEach
की जांच करने की सुविधा को ठीक करें.
- इंटरनल एपीआई के पूरी तरह से इस्तेमाल किए जाने की जांच करने के लिए,
InternalGradleApiUsage
की जांच ठीक करें.
वर्शन 1.0.0-alpha03
11 दिसंबर, 2024
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
का इस्तेमाल करने का सुझाव दिया जाता है.
Property<File>
के इस्तेमाल को पकड़कर, RegularFileProperty
या DirectoryProperty
का इस्तेमाल करने का सुझाव दें, क्योंकि यह डायरेक्ट्री बनाम फ़ाइल के इस्तेमाल को लागू कर रहा है.
वर्शन 1.0.0-alpha02
4 सितंबर, 2024
androidx.lint:lint-gradle:1.0.0-alpha02
रिलीज़ हो गया है. वर्शन 1.0.0-alpha02 में ये कमिट शामिल हैं.
नई सुविधाएं
- इस्तेमाल करने की सलाह नहीं दी गई
GradleRunner.withPluginClasspath
एपीआई के लिए जांच जोड़ी गई.
- ऐसे एपीआई के लिए जांच की सुविधा जोड़ी गई है जो लेज़ी कॉन्फ़िगरेशन के लिए समस्या पैदा करते हैं. इसके लिए,
configureEach
को कॉल किए बिना TaskContainer.withType
को कॉल करने पर, उन्हें फ़्लैग किया जाता है.
Project.getRootProject
, Project.findProject
, Project.getParent
, Project.findProperty
, Project.getProperties
, Project.hasProperty
, Project.property
को फ़्लैग करके, Gradle प्रोजेक्ट को अलग करने में समस्या पैदा करने वाले एपीआई के लिए जांच जोड़ी गई है.
वर्शन 1.0.0-alpha01
21 फ़रवरी, 2024
androidx.lint:lint-gradle:1.0.0-alpha01
रिलीज़ हो गया है. 1.0.0-alpha01 वर्शन में ये कमिट शामिल हैं.
नई सुविधाएं
- Gradle प्लग इन के लेखकों के लिए, लिंट की जांच का शुरुआती सेट. इससे उन्हें अपने कोड में गड़बड़ियों का पता लगाने में मदद मिलती है. इनका इस्तेमाल,
java-gradle-plugin
लागू करने वाले Gradle प्रोजेक्ट में किया जा सकता है. यह इंटरनल Gradle और Android Gradle प्लग-इन एपीआई के इस्तेमाल और ईगर टास्क कॉन्फ़िगरेशन को पकड़ लेगा.
इस पेज पर मौजूद कॉन्टेंट और कोड सैंपल कॉन्टेंट के लाइसेंस में बताए गए लाइसेंस के हिसाब से हैं. Java और OpenJDK, 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."]]