autonomousapps / autonomousapps/dependency-analysis-gradle-plugin

Support Kotlin multiplatform

Open
#228 4 comments 10 reactions 0 assignees View on GitHub
enhancement sponsorable toolchain:kotlin
Dominant language
Kotlin
Stars
2.2k
Forks
158
Avg merge
16h 25m
Merged PRs (30d)
46

Description

Running the `buildHealth` task on [`apollo-android`](https://github.com/apollographql/apollo-android) returns useful information but it looks like the plugin has some difficulties coping with multiplatform projects. For an exemple:

```
$ ./gradlew clean :apollo-normalized-cache-sqlite:aggregateAdvice

> Task :apollo-normalized-cache-sqlite:aggregateAdvice
Unused dependencies which should be removed:
- null(project(":apollo-api"))

Transitively used dependencies that should be declared directly as indicated:
- null(project(":apollo-api"))
- api("org.jetbrains.kotlin:kotlin-stdlib:1.3.72")
- api(project(":apollo-normalized-cache-api"))
- api("androidx.sqlite:sqlite:2.1.0")
- api("com.squareup.sqldelight:runtime-jvm:1.3.0")
```

* the configuration of `apollo-api` is not recognized and `null` is displayed instead
* `:apollo-normalized-cache-api` is already added as a `api` dependency on the `commonMain` sourceSet so I _think_ it shouldn't be reported
* the module has both JVM and Android targets and it's not clear whether the report is taking into account JVM, Android or both

This can be reproduced with the [`dependency-analysis`](https://github.com/martinbonnin/apollo-android/tree/dependency-analysis) branch

Contributor guide

Open the contributing guide

Research direction

Start with the reproduction on the dependency-analysis branch and run ./gradlew clean :apollo-normalized-cache-sqlite:aggregateAdvice. Inspect the Kotlin multiplatform configuration for apollo-api and apollo-normalized-cache-api, including their commonMain, JVM, and Android targets. Done means the report recognizes the configuration, avoids the incorrect null entries, and clearly accounts for the applicable targets.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.