-
-
Notifications
You must be signed in to change notification settings - Fork 133
Description
Plugin version
2.18.0 and 2.19.0 (latest)
Gradle version
8.14.2
JDK version
21
(Optional) Android Gradle Plugin (AGP) version
8.9.3
Describe the bug
The plugin does not correctly interpret the transformation and generates an invalid change:
dependency-analysis-gradle-plugin/src/main/kotlin/com/autonomousapps/model/Advice.kt
Lines 53 to 55 in d3f3106
require(fromConfiguration != toConfiguration) { | |
"Change advice cannot be from and to the same configuration ($fromConfiguration in this case)" | |
} |
To Reproduce
I have this Android library module:
dependencies {
testImplementation(testFixtures(projects.libraries.applicationConfiguration))
}
but the test class that uses the fixtures in located in the testDebug
sourceSet.
Expected behavior
The advice generated should properly handle build variant, and propose this change
dependencies {
- testImplementation(testFixtures(projects.libraries.applicationConfiguration))
+ testDebugImplementation(testFixtures(projects.libraries.applicationConfiguration))
}
Additional context
What is a bit concerning is that, even after making this change, DAGP still shows the same error Change advice cannot be from and to the same configuration (testImplementation in this case)
while there is no testImplementation
hardcoded in the build file. Although there might be other convention plugins that are adding dependencies, the log message does not help. It would be great to show the coordinates as well.