autonomousapps / autonomousapps/dependency-analysis-gradle-plugin
DAGP ignores output of Android artifacts transform tasks
- Dominant language
- Kotlin
- Stars
- 2.2k
- Forks
- 158
- Avg merge
- 16h 25m
- Merged PRs (30d)
- 46
Description
**Build scan link**
[Build scan](https://scans.gradle.com/s/ib3z5ovffa2is)
**Plugin version**
`2.6.1`
**Gradle version**
`8.10.2`
**JDK version**
`17`
**(Optional) Kotlin and Kotlin Gradle Plugin (KGP) version**
`2.1.0`
**(Optional) Android Gradle Plugin (AGP) version**
`8.7.3`
**Describe the bug**
The plugin ignores output of tasks that transform Android variant artifacts. This behaviour leads to an empty ABI report generated (`abi-dump.txt`) and incorrect `implementation` / `api` advices (dependency should be `implementation`).
**To Reproduce**
[Minimal reproducer](https://github.com/dkostyrev/dagp-reproducer)
Steps to reproduce the behavior:
1. `./gradlew :module:abiAnalysisRelease`
2. `cat module/build/reports/dependency-analysis/releaseMain/abi-dump.txt`
3. The report is empty
**Expected behavior**
The plugin should take into account output of tasks that transform Android variants artifacts.
**Additional context**
The plugin makes wrong assumption [here](https://github.com/autonomousapps/dependency-analysis-gradle-plugin/blob/main/src/main/kotlin/com/autonomousapps/tasks/AndroidClassesTask.kt#L23) and not taking into account JAR file [here](https://github.com/autonomousapps/dependency-analysis-gradle-plugin/blob/main/src/main/kotlin/com/autonomousapps/tasks/AndroidClassesTask.kt#L35) (which could be not empty with such transform task).
Contributor guide
Research direction
Start with src/main/kotlin/com/autonomousapps/tasks/AndroidClassesTask.kt, especially the assumptions at lines 23 and 35 about Android variant artifact outputs and JAR contents. Use the linked reproducer and run ./gradlew :module:abiAnalysisRelease, then inspect module/build/reports/dependency-analysis/releaseMain/abi-dump.txt. Done means transformed artifact output is included and the ABI report and implementation/api advice are correct.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100