autonomousapps / autonomousapps/dependency-analysis-gradle-plugin

Incorrect advice when use java-test-fixtures plugin with mixed code(java, kotlin)

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

Description

**Plugin version**
2.19.0

**Gradle version**
8.14.2

**JDK version**
21

**Describe the bug**
The plugin advices to get rid of the required testFixtures dependency.

**To Reproduce**
There are two modules: A and B. Module B applies the plugin "java-test-fixture" and contains mixed code (Java, Kotlin) in the testFixtures sourceSet. Module A uses testFixtures from Module B.

If you remove the unused Java class from the testFixtures sourceSet, the plugin works as expected.

`./gradlew :android-library:projectHealth`

[TestFixturesReproducer2.zip](https://github.com/user-attachments/files/20988255/TestFixturesReproducer2.zip)

**Expected behavior**
No advices

Contributor guide

Open the contributing guide

Research direction

Unpack TestFixturesReproducer2.zip and run ./gradlew :android-library:projectHealth to reproduce the advice. Compare modules A and B, focusing on B's java-test-fixtures testFixtures sourceSet with mixed Java and Kotlin code. Done means the required testFixtures dependency remains needed and no incorrect advice is emitted.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, 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.