Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AndroidStudio won't highlight outdate library after switch to use Kotlin DSL

Tags:

android

kotlin

Previously Android studio will automatically highlight outdated libraries like this:

enter image description here

After I changed to use full kotlin property instead to declare dependency like this:

enter image description here

Then IDE won't highlight it anymore.

enter image description here

  • I tried several ways to declare the dependency but seems if use Kotlin property instead of hardcode the dependency's name then IDE won't highlight if library outdated.
  • Q: Is there a way to highlight outdated libraries and also using the new way(declare dependency as property) to declare dependency?

Thanks for helping.

like image 666
Swifty Avatar asked Aug 31 '25 17:08

Swifty


1 Answers

Android Studio doesn't currently support dependency update suggestions with Gradle Kotlin DSL.

You need to use a plugin to check for dependency updates like this one: https://github.com/ben-manes/gradle-versions-plugin

Add this plugin in your project-level build.gradle.kts file:

plugins {
    id("com.github.ben-manes.versions") version "0.28.0"
}

And then simply run ./gradlew dependencyUpdates to check for dependency updates.

like image 163
Saurabh Thorat Avatar answered Sep 02 '25 06:09

Saurabh Thorat