adityamparikh opened a new pull request, #269:
URL: https://github.com/apache/solr-mcp/pull/269

   ## What
   
   `./gradlew build` now runs `buildSrc`'s tests again.
   
   Since Gradle 8, the root build asks `buildSrc` only for the jar it puts on 
the build script classpath, so `:buildSrc:test` never ran. 
`LicenseNoticeTasksTest` and `RatExcludesTest` cover the LICENSE/NOTICE 
generation and the RAT excludes that every build depends on. In practice they 
only ran when someone remembered `./gradlew -p buildSrc test`, although 
`AGENTS.md` says `./gradlew build` runs them.
   
   `buildSrc/build.gradle.kts` now finalizes `jar` with `test`:
   
   ```kotlin
   tasks.jar {
       finalizedBy(tasks.test)
   }
   ```
   
   The root build can't depend on `:buildSrc:test` directly. `buildSrc` is 
neither a project nor an included build of the root build, and Gradle reports 
"Project with path ':buildSrc' not found". `dependsOn` inside `buildSrc` would 
form a cycle, because compiling the Kotlin tests needs the jar. `finalizedBy` 
runs the tests after the jar without that edge.
   
   This is what Gradle did before 8.0: a failing `buildSrc` test fails any root 
invocation, not only `build`. The tests are up to date unless `buildSrc` 
changed, so an unchanged `buildSrc` costs nothing.
   
   ## Verification
   
   - `./gradlew help` runs `:buildSrc:test` on the first invocation and reports 
it `UP-TO-DATE` on the next.
   - A deliberately broken assertion in `LicenseNoticeTasksTest` fails 
`./gradlew help` with `Execution failed for task ':buildSrc:test'`. The test 
was restored afterwards.
   - `./gradlew build` passes, and its log shows `:buildSrc:test` running.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to