[build] Replace TPN generation with checked-in file + skill#11284
[build] Replace TPN generation with checked-in file + skill#11284jonathanpeppers wants to merge 6 commits intomainfrom
Conversation
Delete ~31 files of xaprepare TPN generation infrastructure: - ThirdPartyNotice/ThirdPartyNoticeGroup base classes, TPNAttribute, ThirdPartyLicenseType, CommonLicenses, Step_ThirdPartyNotices, Scenario_ThirdPartyNotices - All 19 TPN definition files in ThirdPartyNotices/ - Dead CreateThirdPartyNotices MSBuild task - license-data/ template files (Apache-2.0, GPLv2, GPLv3, Mono-MIT) Merge both TPN sets (build-deps + shipped-deps) into a single THIRD-PARTY-NOTICES.TXT at the repo root (26 entries). Update packaging (License.targets, create-installers.targets) to reference the checked-in file instead of the generated one. Add .github/skills/update-tpn/SKILL.md with full dependency catalog and audit workflow for maintaining the TPN file going forward. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Use upstream URL (Tessil/robin-map) instead of fork (xamarin/robin-map) to match the TPN entry. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
This PR removes the xaprepare-based third-party notices (TPN) generation pipeline and replaces it with a single checked-in THIRD-PARTY-NOTICES.TXT at the repo root, plus a new update-tpn skill to guide future audits/updates.
Changes:
- Check in a merged
THIRD-PARTY-NOTICES.TXT(build + shipped dependencies) using the Microsoft OSS header format. - Update NuGet/installer packaging targets to ship the checked-in TPN file instead of a generated
$(XAInstallPrefix)file. - Delete the xaprepare TPN generation infrastructure (scenario/step/types/data) and the unused prep task + license-data templates; add a new
.github/skills/update-tpnskill doc.
Reviewed changes
Copilot reviewed 37 out of 37 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| THIRD-PARTY-NOTICES.TXT | Replaces the old generated notices with a single checked-in merged TPN file. |
| build-tools/installers/create-installers.targets | Switch installer TPN input from generated $(XAInstallPrefix) to checked-in $(XamarinAndroidSourcePath) file. |
| build-tools/create-packs/License.targets | Switch NuGet packaging to include the checked-in root TPN file. |
| .github/skills/update-tpn/SKILL.md | Adds a skill/workflow doc for auditing/updating the checked-in TPN file. |
| build-tools/xaprepare/xaprepare/Scenarios/Scenario_Standard.cs | Stops running TPN generation as part of the standard xaprepare scenario. |
| build-tools/xaprepare/xaprepare/Steps/Step_ThirdPartyNotices.cs | Removes the step that generated TPN files. |
| build-tools/xaprepare/xaprepare/Scenarios/Scenario_ThirdPartyNotices.cs | Removes the dedicated scenario for generating TPN files. |
| build-tools/xaprepare/xaprepare/ConfigAndData/CommonLicenses.cs | Removes shared license-template path constants used only by the removed TPN generator. |
| build-tools/xaprepare/xaprepare/Application/TPNAttribute.cs | Removes the attribute used to discover TPN entries. |
| build-tools/xaprepare/xaprepare/Application/ThirdPartyNoticeGroup.cs | Removes TPN grouping type used only by the removed generator. |
| build-tools/xaprepare/xaprepare/Application/ThirdPartyNotice.cs | Removes the base type for generator-driven TPN entries. |
| build-tools/xaprepare/xaprepare/Application/ThirdPartyLicenseType.cs | Removes generator-specific license header selection enum. |
| build-tools/xa-prep-tasks/Xamarin.Android.BuildTools.PrepTasks/CreateThirdPartyNotices.cs | Removes an unused MSBuild task for generating TPN output. |
| build-tools/license-data/Apache-2.0.txt | Removes template license text file (no longer needed without generation). |
| build-tools/license-data/GPLv2.txt | Removes template license text file (no longer needed without generation). |
| build-tools/license-data/GPLv3.txt | Removes template license text file (no longer needed without generation). |
| build-tools/license-data/Mono-MIT.txt | Removes template license text file (no longer needed without generation). |
| build-tools/xaprepare/xaprepare/ThirdPartyNotices/aapt2.cs | Removes per-dependency TPN definition (generator no longer used). |
| build-tools/xaprepare/xaprepare/ThirdPartyNotices/bionic.cs | Removes per-dependency TPN definition (generator no longer used). |
| build-tools/xaprepare/xaprepare/ThirdPartyNotices/bundletool.cs | Removes per-dependency TPN definition (generator no longer used). |
| build-tools/xaprepare/xaprepare/ThirdPartyNotices/ELFSharp.cs | Removes per-dependency TPN definition (generator no longer used). |
| build-tools/xaprepare/xaprepare/ThirdPartyNotices/Java.Interop.cs | Removes per-dependency TPN definition (generator no longer used). |
| build-tools/xaprepare/xaprepare/ThirdPartyNotices/K4os.Compression.LZ4.cs | Removes per-dependency TPN definition (generator no longer used). |
| build-tools/xaprepare/xaprepare/ThirdPartyNotices/libunwind.cs | Removes per-dependency TPN definition (generator no longer used). |
| build-tools/xaprepare/xaprepare/ThirdPartyNotices/libzip.cs | Removes per-dependency TPN definition (generator no longer used). |
| build-tools/xaprepare/xaprepare/ThirdPartyNotices/LibZipSharp.cs | Removes per-dependency TPN definition (generator no longer used). |
| build-tools/xaprepare/xaprepare/ThirdPartyNotices/lz4.cs | Removes per-dependency TPN definition (generator no longer used). |
| build-tools/xaprepare/xaprepare/ThirdPartyNotices/mono.cs | Removes per-dependency TPN definitions/grouping (generator no longer used). |
| build-tools/xaprepare/xaprepare/ThirdPartyNotices/r8.cs | Removes per-dependency TPN definition (generator no longer used). |
| build-tools/xaprepare/xaprepare/ThirdPartyNotices/robin-map.cs | Removes per-dependency TPN definition (generator no longer used). |
| build-tools/xaprepare/xaprepare/ThirdPartyNotices/StrongNameSigner.cs | Removes per-dependency TPN definition (generator no longer used). |
| build-tools/xaprepare/xaprepare/ThirdPartyNotices/Xamarin.Android.Build.Tasks.cs | Removes per-component TPN definitions/grouping (generator no longer used). |
| build-tools/xaprepare/xaprepare/ThirdPartyNotices/Xamarin.Android.NunitLite.cs | Removes per-component TPN definition (generator no longer used). |
| build-tools/xaprepare/xaprepare/ThirdPartyNotices/Xamarin.Android.Tools.Aidl.cs | Removes per-component TPN definition (generator no longer used). |
| build-tools/xaprepare/xaprepare/ThirdPartyNotices/Xamarin.Android.Tools.JavadocImporter.cs | Removes per-component TPN definition (generator no longer used). |
| build-tools/xaprepare/xaprepare/ThirdPartyNotices/xaprepare.cs | Removes per-component TPN definition (generator no longer used). |
| build-tools/xaprepare/xaprepare/ThirdPartyNotices/xxHash.cs | Removes per-dependency TPN definitions (generator no longer used). |
Show actual fork URLs from .gitmodules for lz4 (dotnet/lz4) and robin-map (xamarin/robin-map), with upstream URLs noted. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
/review |
|
✅ Android PR Reviewer completed successfully! |
|
Compared the checked-in
All 22 entries from the shipped version are preserved exactly as-is. |
There was a problem hiding this comment.
✅ LGTM
Clean, well-structured removal of ~2,550 lines of TPN generation infrastructure, replaced by a checked-in THIRD-PARTY-NOTICES.TXT and a Copilot skill for future maintenance.
What I verified
- No dangling references — all 31 deleted files (7 infra classes, 19 TPN definitions, 4 license templates, 1 dead MSBuild task) have zero remaining references in
.cs,.csproj,.targets, or.propsfiles - TPN completeness — 26 TOC entries match 26
%%license sections; entries match the skill's dependency inventory (submodules, vendored source, NuGet packages, vendored linker, SDK tools, libzip) - MSBuild path change is sound —
$(XamarinAndroidSourcePath)is already defined inConfiguration.propsand used extensively inLicense.targetsitself (lines 9–10); switching from$(XAInstallPrefix)eliminates the dependency onxapreparegenerating the file before packaging - Old checked-in TPN entries preserved — all 7 original entries (android/platform/tools/base, bazel, constexpr-xxh3, xxHash, crc32.net, nunitlite, robin-map) are present in the merged file alongside the 19 former "shipped" entries
Step_CopyExtraResultFilesForCIstill works — it searchesXamarinAndroidSourceRootforTHIRD-PARTY-NOTICES.TXT, which now resolves to the checked-in file- CI — both public checks passing (license/cla ✅, dotnet-android ✅)
Issue summary
| Severity | Count |
|---|---|
| 💡 Suggestion | 1 |
One minor suggestion on the skill's verification step using a PowerShell-only cmdlet.
Generated by Android PR Reviewer for issue #11284 · ● 10M
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
No longer needed since the file is checked into the repo instead of generated at build time. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Verified the Extracted from |
The GPLv3 license text (gnu/binutils) uses "countries" and "country" which are flagged by PoliCheck geopolitical rules. These are verbatim license terms that cannot be modified. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
OK, latest commit fixes PoliCheck. |
Summary
Phase 2: Replace the xaprepare TPN generation infrastructure with a checked-in
THIRD-PARTY-NOTICES.TXTfile and a Copilot skill for future maintenance.Changes
Merged TPN file
THIRD-PARTY-NOTICES.TXTat the repo root (26 entries)Updated packaging
License.targetsandcreate-installers.targetsnow reference$(XamarinAndroidSourcePath)THIRD-PARTY-NOTICES.TXT(the checked-in file) instead of$(XAInstallPrefix)THIRD-PARTY-NOTICES.TXT(the generated one)Deleted ~31 files of TPN generation code (-2551 lines)
ThirdPartyNotice,ThirdPartyNoticeGroup,TPNAttribute,ThirdPartyLicenseType,CommonLicenses,Step_ThirdPartyNotices,Scenario_ThirdPartyNotices)ThirdPartyNotices/CreateThirdPartyNoticesMSBuild task (never invoked from any .targets)Apache-2.0.txt,GPLv2.txt,GPLv3.txt,Mono-MIT.txt)Step_ThirdPartyNoticesfromScenario_Standard.csAdded
update-tpnskill.github/skills/update-tpn/SKILL.mdwith full dependency catalog (all URLs, license file paths) and audit workflow for maintaining the TPN file going forward