dependency-analysis-gradle-plugin icon indicating copy to clipboard operation
dependency-analysis-gradle-plugin copied to clipboard

Include exclusion instructions into advice messages

Open Egorand opened this issue 5 months ago • 1 comments

Is your feature request related to a problem? Please describe.

The plugin produced the following advice:

Advice for :amountslider-sample
Unused annotation processors that should be removed:
  kapt libs.dagger.compiler

I'd like to exclude libs.dagger.compiler from the unused annotation processors check, but since the "exclude" API has many overloads, it's unclear how to do it correctly. E.g., this doesn't work (I'm basically just passing advice output as a string):

issueHandler.onUnusedAnnotationProcessors { issue ->
  issue.exclude("kapt libs.dagger.compiler")
}

But this does:

issueHandler.onUnusedAnnotationProcessors { issue ->
  issue.exclude(libs.dagger.compiler)
}

Describe the solution you'd like

I want the advice to include instructions on proper exclusion syntax, e.g.:

Advice for :amountslider-sample
Unused annotation processors that should be removed:
  kapt libs.dagger.compiler

To exclude these annotation processors from the analysis:
  issueHandler.onUnusedAnnotationProcessors { issue ->
    issue.exclude(libs.dagger.compiler)
  }

Or something similar.

Describe alternatives you've considered

Can't think of any alternatives.

Additional context

None.

Egorand avatar Aug 07 '25 10:08 Egorand

Thanks for the request. I'm considering how best to resolve this.

autonomousapps avatar Aug 07 '25 15:08 autonomousapps