autonomousapps / autonomousapps/dependency-analysis-gradle-plugin

Do not suggest parcelize runtime if parcelize plugin applied

Open
#1,621 5 comments 0 reactions 0 assignees View on GitHub
bug more information needed toolchain:android toolchain:kotlin
Dominant language
Kotlin
Stars
2.2k
Forks
158
Avg merge
16h 25m
Merged PRs (30d)
46

Description

**Build scan link**
Here is dependencies graph instead:
```
+--- com.adyen.checkout:components-core:5.15.0
| +--- com.adyen.checkout:checkout-core:5.15.0
| | +--- androidx.annotation:annotation:1.9.1
| | | \--- androidx.annotation:annotation-jvm:1.9.1
| | | \--- org.jetbrains.kotlin:kotlin-stdlib:1.9.24 -> 2.2.21 (*)
| | +--- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.9.0
| | | \--- org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.9.0
| | | +--- org.jetbrains:annotations:23.0.0
| | | +--- org.jetbrains.kotlinx:kotlinx-coroutines-bom:1.9.0
| | | | +--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.9.0 (c)
| | | | +--- org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.9.0 (c)
| | | | \--- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.9.0 (c)
| | | \--- org.jetbrains.kotlin:kotlin-stdlib:2.0.0 -> 2.2.21 (*)
| | +--- org.jetbrains.kotlinx:kotlinx-coroutines-android:1.9.0
| | | +--- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.9.0 (*)
| | | +--- org.jetbrains.kotlinx:kotlinx-coroutines-bom:1.9.0 (*)
| | | \--- org.jetbrains.kotlin:kotlin-stdlib:2.0.0 -> 2.2.21 (*)
| | +--- org.jetbrains.kotlin:kotlin-parcelize-runtime:1.9.25 -> 2.2.21 (*)
```
But we also have it in root added by gradle plugin

**Plugin version**
3.5.1

**Gradle version**
9.2.1

**JDK version**
17

**(Optional) Kotlin and Kotlin Gradle Plugin (KGP) version**
2.2.21

**(Optional) Android Gradle Plugin (AGP) version**
8.13.1

**(Optional) `reason` output for bugs relating to incorrect advice**
```
You asked about the dependency 'org.jetbrains.kotlin:kotlin-parcelize-runtime:2.2.21'.
You have been advised to add this dependency to 'implementation'.
------------------------------------------------------------

Shortest path from :core:datamodel to org.jetbrains.kotlin:kotlin-parcelize-runtime:2.2.21 for mpDebugCompileClasspath:
:core:datamodel
\--- org.jetbrains.kotlin:kotlin-parcelize-runtime:2.2.21
...
Source: mpDebug, main
---------------------
* Imports 1 class: kotlinx.parcelize.Parcelize (implies implementation).
```

**Describe the bug**
Not sure why but shortest path to dependency is transitive, while we have it by applying plugin in root dependencies.

**To Reproduce**
Steps to reproduce the behavior:
1. Use kotlin parcelise plugin
2. Have dependency that has transitive parcelize runtime
3. run project health

**Expected behavior**
Suggestion is not reported

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue with the Kotlin Parcelize plugin, a dependency that transitively brings in kotlin-parcelize-runtime, and the project health command. Inspect how dependency advice distinguishes plugin-provided dependencies from declared or transitive ones. Done means the kotlin-parcelize-runtime suggestion is not reported when the Parcelize plugin is applied, while genuine missing dependencies are still advised.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.