You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I don't know why multiple configurations are used, but at least for Android project, I think it is sufficient to use ${variantName}RuntimeClasspath only to collect runtime dependencies included in APK.
Below are the details of the incorrect report that I found.
My Android project has multiple subprojects, and each project uses both implementation(...) and api(...) dependencies.
It seems that the ${variantName}RuntimeClasspath configuration collects both of them while implementation does only the former.
Due to this difference, in each configuration the androidx.annotation:annotation module dependency and its artifacts were resolved as follows.
All of these artifacts' modules are used to generate report.
Since no modules named androidx.annotation:annotation:1.7.0 in this list, androidx.annotation:annotation:1.5.0 remained without being overwritten.
As a result, the report includes both of the items below, while the latter is not correct.
Sometimes incorrect items are included in the generated report.
I found that it was caused by using multiple configurations to collect dependencies:
https://github.com/jaredsburrows/gradle-license-plugin/blob/0.9.7/gradle-license-plugin/src/main/kotlin/com/jaredsburrows/license/LicenseReportTask.kt#L174-L181
I don't know why multiple configurations are used, but at least for Android project, I think it is sufficient to use
${variantName}RuntimeClasspath
only to collect runtime dependencies included in APK.Below are the details of the incorrect report that I found.
My Android project has multiple subprojects, and each project uses both
implementation(...)
andapi(...)
dependencies.It seems that the
${variantName}RuntimeClasspath
configuration collects both of them whileimplementation
does only the former.Due to this difference, in each configuration the
androidx.annotation:annotation
module dependency and its artifacts were resolved as follows.${variantName}RuntimeClasspath: androidx.annotation:annotation:1.7.0;jvmRuntimeElements-published - annotation-jvm-1.7.0.jar (androidx.annotation:annotation-jvm:1.7.0) - kotlin-stdlib-1.9.22.jar (org.jetbrains.kotlin:kotlin-stdlib:1.9.22) - annotations-23.0.0.jar (org.jetbrains:annotations:23.0.0) === implementation: androidx.annotation:annotation:1.5.0;runtimeElements - annotation-1.5.0.jar (androidx.annotation:annotation:1.5.0) - kotlin-stdlib-1.9.22.jar (org.jetbrains.kotlin:kotlin-stdlib:1.9.22) - annotations-23.0.0.jar (org.jetbrains:annotations:23.0.0)
All of these artifacts' modules are used to generate report.
Since no modules named
androidx.annotation:annotation:1.7.0
in this list,androidx.annotation:annotation:1.5.0
remained without being overwritten.As a result, the report includes both of the items below, while the latter is not correct.
The same cause also includes
When I manually removed
"implementation"
fromconfigurationList
, these errors was resolved.The text was updated successfully, but these errors were encountered: