Detect if compile can be safely changed to implementation

Have an old java library using deprecated ‘compile’ configuration for all dependencies.

  1. Is there a way to detect if certain dependencies can be changed from ‘compile’ to ‘implementation’ configuration, without checking library code manually? Meaning library doesn’t return any types of particular dependency and dependency is purely internal (nothing leaks into ABI)
  2. Is there a way to integrate this into build, so nobody introduces any accidental ABI leaks?

You might want to use this plugin: GitHub - autonomousapps/dependency-analysis-android-gradle-plugin: Gradle plugin for Java, Kotlin, and Android projects. Provides advice for managing dependencies and other applied plugins