autonomousapps / autonomousapps/dependency-analysis-gradle-plugin

Incorrect module structure advice

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

Description

**Plugin version**
1.32.0

**Gradle version**
8.4

**JDK version**
17

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

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

**Describe the bug**
We have module C, which depends on project android modules A and B, as well as on android compose dependencies.

The report contains advice that module C could be a JVM project.

```
Module structure advice
This project uses limited Android features and could be a JVM project.
* Has Android library dependencies.
```

We cannot remove Android dependencies from this module, which means, as far as I understand, we cannot make this module a JVM project. However, the check fails with the advice to change the module structure to the JVM project.

We have temporarily disabled module structure checks:

```
issues {
all {
onModuleStructure {
severity("ignore")
}
}
}
```

We have other similar modules in our project, but the reports do not contain similar advice for them.

How can we suppress this particular advice?

**To Reproduce**
Steps to reproduce the behavior:
1. Create Android module A
2. Create Android module B
3. Create a dependency of module B on module A
4. Add multiple dependency composites to module B
5. Run check on module B

**Expected behavior**
The absence of such advice for modules that cannot get rid of Android dependencies or a clear way to suppress such advice.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the module structure check with Android modules A and B, including B's Android Compose dependencies and dependency composites, using the reported plugin and Gradle versions. Trace why module B receives JVM-project advice despite Android dependencies, then ensure modules that cannot remove those dependencies do not receive the advice or have a clear suppression path.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java, kotlin
Domain
build-system
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.