Skip to content

Use of constant from inner static class not detected #1504

@joshfriend

Description

@joshfriend

Plugin version
2.19.0

Gradle version
8.12

JDK version
17

(Optional) Kotlin and Kotlin Gradle Plugin (KGP) version
2.1.20

Describe the bug
Found an issue where when a kotlin project depends on a java project, and the only use of the java project is importing an inner static class and using it in code, DAGP reports the dependency is unused. For example I import Inner and use Inner.CONSTANT which is not detected but importing Inner.CONSTANT directly is detected.

To Reproduce
Steps to reproduce the behavior:

  1. Run buildHealth task in dagp-inner-static-class-constant.zip

Expected behavior
No advice should be given

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions