DEV Community

Cover image for Announcing Dependency Analysis Gradle Plugin 2.0.0!
Tony Robalik
Tony Robalik

Posted on

Announcing Dependency Analysis Gradle Plugin 2.0.0!

Cover photo by Sandie Clarke on Unsplash

The Dependency Analysis Plugin v2.0.0 has just been released!

Why 2.0.0?

Breaking changes, of course. The ABI has been updated, which is relevant for anyone accessing the analysis results programmatically. There has also been an important behavioral change, which will be relevant to all users.

ABI changes

The PluginAdvice class has been moved from the com.autonomousapps.advice package to the com.autonomousapps.model package, where all the other public model classes live.

The FindInlineMembersTask has been renamed to FindKotlinMagicTask, to better reflect what it actually does. This is unlikely to impact any users, but since it has public visibility, it might.

Finally, the deprecated ignoreKtx() option has been removed from the issues block. It can now only be configured from the structure block.

Behavioral changes

The plugin no longer automatically applies itself to every subproject in your build. Therefore the dependency.analysis.autoapply flag is now a no-op, and using it will either emit a warning (when the value is set to false) or fail your build (if the value is set to true, which was the old default). Users now have two choices if they want to analyze subprojects in their build:

First, you can apply the plugin directly to every module you want to analyze. This has long been the best practice for how to use this plugin.

Second, you can use the new com.autonomousapps.build-health plugin! Apply it to your settings.gradle[.kts] like so:

// settings.gradle[.kts]
plugins {
  id("com.autonomousapps.build-health") version "2.0.0"
}

// And you can configure it from the settings
// script, too!
dependencyAnalysis {
  ...
}
Enter fullscreen mode Exit fullscreen mode

This new plugin is only available from Gradle 8.8. See the wiki for more information, especially if you also use Android or Kotlin.

In order to assist users who might update to 2.0.0 without reading the release notes, the plugin has been updated to attempt to detect the case where the plugin has been applied only to the root project but not to any subproject; this would almost certainly be a user error.

Happy building!

Thanks for being a user, and please keep filing issues if you run into any bugs.

Top comments (1)

Collapse
 
domix profile image
Domingo Suarez Torres

nice job!