Expected
After enabling Newer Library Versions Available under Preferences, Lint will show recommended Gradle dependency/library updates in the build.gradle files.
Actual
Lint is not showing recommended Gradle dependency/library updates in the build.gradle files. There are many recommended updates as shown under the Project Structure Suggestions.
i.e. Menu: File > Project Structure... > Suggestions
Configuration
The library version numbers are saved as variables in the application level build.gradle file.
Application-level build.gradle
buildscript {
ext.build_gradle_version = '4.1.2'
ext.kotlin_version = '1.4.21'
ext.fragment_version = '1.2.4'
...
dependencies {
classpath "com.android.tools.build:gradle:$build_gradle_version"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
...
}
}
Project-level build.gradle
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
...
android {
...
}
dependencies {
implementation "androidx.fragment:fragment-ktx:$fragment_version"
...
}
Settings
- Preferences > Editor > Inspections > Newer Library Versions Available
Android Studio
- Android Studio 4.2.1
- Build #AI-202.7660.26.42.7351085, built on May 10, 2021
- Runtime version: 11.0.8+10-b944.6916264 x86_64
- VM: OpenJDK 64-Bit Server VM by N/A
- macOS 10.16
- GC: G1 Young Generation, G1 Old Generation
- Memory: 2048M
- Cores: 16
- Registry: external.system.auto.import.disabled=true
- Non-Bundled Plugins: com.android.tool.sizereduction.plugin, com.thoughtworks.gauge, mobi.hsz.idea.gitignore, org.jetbrains.kotlin, com.developerphil.adbidea, com.google.mad-scorecard, cn.wjdghd.unique.plugin.id

