refactor(build): build the IP-clearance row with the kotlinx.html DSL - #246
Open
adityamparikh wants to merge 2 commits into
Open
adityamparikh wants to merge 2 commits into
adityamparikh wants to merge 2 commits into
Conversation
Add generateIpClearanceLicenseReport, which writes build/generated/license/ip-clearance-licenses.xml: the "all items depended upon by the project are covered by approved licenses" row of the Incubator IP-clearance status document, listing group:artifact and license for every bundled dependency as reported by the CycloneDX SBOM. A dependency missing from the SBOM fails the task, the same completeness gate the binary LICENSE uses. Add the generateLicenseDocs aggregate (LICENSE, NOTICE and the IP-clearance row) and make check depend on it, so a plain ./gradlew build leaves all three in build/generated/license/. CI uploads that directory as the solr-mcp-license-docs artifact. Extract the SBOM license lookup into a shared SbomLicenses helper used by both license tasks. Document the row on the Licensing & Notices page, in AGENTS.md and in buildSrc/README.md, including a table of the generated files with the Gradle task that produces each. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Aditya Parikh <aditya.m.parikh@gmail.com>
Replace the whitespace-literal construction of the IP-clearance row with a type-safe kotlinx.html DSL whose shape mirrors the XML it emits, and move the checklist wording and row indent into named constants. The library escapes text itself. The date, wording and all dependency entries are unchanged; only insignificant whitespace in the row differs. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Signed-off-by: Aditya Parikh <aditya.m.parikh@gmail.com>
adityamparikh
marked this pull request as ready for review
October 5, 2026 01:26
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Builds the Incubator IP-clearance row (
generateIpClearanceLicenseReport) with the type-safekotlinx.htmlDSL instead ofXMLStreamWriterplus whitespace string literals.Before, the element structure was buried in literals like
"\n ", so the shape of the emitted XML could only be recovered by replaying the whitespace. Now the code mirrors the XML:CHECKLIST_WORDING,ROW_INDENT); oneprependIndentreplaces the hand-written indentation.buildSrc-only dependency:org.jetbrains.kotlinx:kotlinx-html-jvm:0.12.0(Apache-2.0). It is not on the shipped classpath, so it does not appear in the binaryLICENSE.Output
The date, the checklist wording and all 157 dependency entries are unchanged. Only insignificant whitespace in the row differs: the checklist sentence is one line instead of hand-wrapped, and the
<li>indent is 18 spaces instead of 20.Testing
./gradlew build(JDK 25, clean tree, includingrat) — 421 tests, 0 failed, 0 skipped.ip-clearance-licenses.xmlis well-formed; parsed, it matches the previous output (date, prose, 157 items).LICENSEis byte-identical.@epugh, please review.
🤖 Generated with Claude Code