autonomousapps / dependency-analysis-gradle-plugin

Gradle plugin for JVM projects written in Java, Kotlin, Groovy, or Scala; and Android projects written in Java or Kotlin. Provides advice for managing dependencies and other applied plugins
Apache License 2.0
1.67k stars 115 forks source link

feat: allow to force app behavior for pure Java projects #1139

Closed Vampire closed 2 months ago

Vampire commented 4 months ago

Currently if only the java plugin is applied, but not one of a small set of known application-like plugins, a project is not analyzed.

This PR allows to set a property on the extensions that can force application behavior even if none of the known application-like plugins is applied.

autonomousapps commented 2 months ago

I'm ok with this conceptually, but I think we can do better than the proposed name. Also, for consistency, I'd prefer it to be exposed as a function. I think there's only one other property that is currently exposed directly. Maybe...

dependencyAnalysis {
  app()
}

I'm not convinced that's the best either! So I'm open to pushback if you have other ideas.

I kind of think it should go into an inner DSL, but I don't know what that would look like right now, so I'm content with it as a top-level function inside the outermost DSL.

Vampire commented 2 months ago

I don't have a better naming idea right now either, so I changed it to the one you proposed.