autonomousapps / dependency-analysis-gradle-plugin

Gradle plugin for JVM projects written in Java, Kotlin, Groovy, or Scala; and Android projects written in Java or Kotlin. Provides advice for managing dependencies and other applied plugins
Apache License 2.0
1.82k stars 120 forks source link

ignoreKtx(true) is not working #1283

Open emartynov opened 1 month ago

emartynov commented 1 month ago

Plugin version 2.1.4

Gradle version 8.10.2

JDK version 23

(Optional) Kotlin and Kotlin Gradle Plugin (KGP) version 2.0.20

(Optional) Android Gradle Plugin (AGP) version 8.6.2

(Optional) reason output for bugs relating to incorrect advice ./gradlew sha:vide:reason --id androidx.lifecycle:lifecycle-runtime:2.8.6

:shared:video-player
\--- io.coil-kt:coil-base:2.7.0
      \--- androidx.lifecycle:lifecycle-runtime:2.8.6

Source: developDebug, main
--------------------------
(no usages)

./gradlew sha:vide:reason --id libs.androidx.lifecycle.runtime

Shortest path from :shared:video-player to androidx.lifecycle:lifecycle-runtime-ktx:2.8.6 (libs.androidx.lifecycle.runtime) for nowsecureReleaseUnitTestRuntimeClasspath:
:shared:video-player
\--- androidx.lifecycle:lifecycle-runtime-ktx:2.8.6

Source: developDebug, main
--------------------------
(no usages)

Describe the bug The ktx dependency is proposed to be removed and the normal dependency is proposed to be added even we have

dependencyAnalysis {
    structure {
        ignoreKtx(true) // default is false
    }
}

In the root folder.

Expected behavior ignoreKtx is respected

Additional context Plugin is applied in root folder and then applied in every module. The ignoreKts is applied in the root file.