[ 
https://issues.apache.org/jira/browse/SOLR-18302?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18097970#comment-18097970
 ] 

ASF subversion and git services commented on SOLR-18302:
--------------------------------------------------------

Commit c7123d1f90a4860bc79a0386520f8a9f94109680 in solr's branch 
refs/heads/branch_10x from Serhiy Bzhezytskyy
[ https://gitbox.apache.org/repos/asf?p=solr.git;h=c7123d1f90a ]

SOLR-18302: dependency-analysis (DAGP) — reporting + build hygiene (#4612)

Adds the Dependency Analysis Gradle Plugin (com.autonomousapps
build-health) as an opt-in `analyzeDependencies` task — it reports
advice, doesn't fail the build, since api-vs-implementation calls need
human judgement rather than blanket enforcement.

- Remove redundant project() declarations that solr-core already
  provides via api (24 across 17 modules) — cutterslade-era
  "state the obvious" leftovers.
- Force kotlin-metadata-jvm to Solr's Kotlin so DAGP can analyze
  :solr:ui (autonomousapps/dependency-analysis-gradle-plugin#1661;
  temporary).
- Ensure lockfile doesn't have spotless or DAGP related special configurations.

Co-authored-by: David Smiley <[email protected]>
(cherry picked from commit af89e0379f3e499a46a88b7c7483aa5c0ea6e474)

Backport note: solr/ui/build.gradle.kts's dependency cleanup was dropped
here. branch_10x's Compose UI module has a structurally different
dependency set than main (no androidx-navigation3/adaptive deps, older
compose.* plugin accessors instead of libs.compose.* catalog aliases),
so main's DAGP-driven unused-dependency findings don't transfer without
re-running the analysis against this branch's actual UI code.

Also kept solr:core's `implementation libs.eclipse.jetty.io` as it was
on this branch, instead of moving it to testImplementation-only as this
commit did on main. Running analyzeDependencies against branch_10x
afterward confirmed it: unlike on main, solr:core's main-scope code here
still uses it directly, so the original main-scope declaration is kept
and the now-redundant testImplementation duplicate is dropped.


> Adopt the dependency-analysis (build-health) Gradle plugin
> ----------------------------------------------------------
>
>                 Key: SOLR-18302
>                 URL: https://issues.apache.org/jira/browse/SOLR-18302
>             Project: Solr
>          Issue Type: Task
>          Components: Build
>            Reporter: Serhiy Bzhezytskyy
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 7h
>  Remaining Estimate: 0h
>
> Follow-up to SOLR-18289 (Gradle 9 upgrade), which removed the old cutterslade 
> dependency-analysis plugin and deferred re-introducing dependency analysis.
> This adds the com.autonomousapps.build-health ("DAGP") plugin, wired into 
> `check` in report-not-fail mode (severity: warn) so it reports advice without 
> breaking the build. It also applies the safe, mechanical subset of that 
> advice: removing genuinely-unused dependencies and correcting a few 
> test-scope declarations.
> The plugin also suggests promoting many dependencies from `implementation` to 
> `api`. Those are viral/transitive and need case-by-case human judgement, so 
> they are handled separately (as draft PRs for discussion) rather than applied 
> wholesale here.
> Discussed on the dev@ list as a follow-up to the Gradle 9 work.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to