[xaprepare] Delete Configuration.OperatingSystem.props generator and xaprepare project - #11959

Merged
simonrozsival merged 5 commits into
mainfrom
jonathanpeppers-xaprepare-d1-ndk-os-info
Jul 3, 2026
Merged

[xaprepare] Delete Configuration.OperatingSystem.props generator and xaprepare project#11959
simonrozsival merged 5 commits into
mainfrom
jonathanpeppers-xaprepare-d1-ndk-os-info

Conversation

@jonathanpeppers

Copy link
Copy Markdown
Member

Follow-up to #11956, which moved the JDK half of Configuration.OperatingSystem.props to Java.Interop's JdkInfo.props. The remaining NDK / OS-info half has zero real consumers, so this PR:

  1. Deletes the last generator template (Configuration.OperatingSystem.props.in).
  2. Cascades through Step_GenerateFiles, both Scenario_* classes (which now had zero steps), and every supporting OperatingSystems/, Context.*OS.cs, EssentialTools.*, ToolRunners/*, Configurables.*, Application/*, and Main.cs file that only existed to feed the scenarios.
  3. Deletes the whole build-tools/xaprepare/ project.
  4. Patches every integration point (Makefile, PrepareWindows.targets, BuildEverything.mk, CI YAML, docs) so build.cmd -t:Prepare and make prepare still work end-to-end.

Configuration.OperatingSystem.props.in placeholder audit

PlaceholderConsumers outside the .in fileAction
HostOsNamenonedrop
HostOsFlavornonedrop
HostOsReleasenonedrop
HostBitsnone (ArchiveBase.HostBits in src/Xamarin.Installer.AndroidSDK/ is an unrelated C# property)drop
NdkLlvmTagnone (the NDK toolchain OS tag is resolved elsewhere via _NdkToolchainOSTag in androidsdk.targets)drop
HostCpuCountonly Configuration.props:72 via $(MakeConcurrency)drop

$(MakeConcurrency) audit

The only definition was Configuration.props:72. A repo-wide grep of .targets, .props, .projitems, Makefile, and .mk files found zero consumers of the MSBuild property. The MakeConcurrency hits under build-tools/xaprepare/ were an unrelated C# Context.MakeConcurrency property.

Result: dropped the MakeConcurrency MSBuild property entirely (no $([System.Environment]::ProcessorCount) replacement needed) and removed the $(MakeConcurrency) bullet in Documentation/building/configuration.md.

xaprepare integration audit (grep-confirmed, patched here)

LocationChange
build-tools/xaprepare/ (entire tree)deleted — 86 tracked files
Configuration.propsdropped <Import> of the generated OS props, dropped MakeConcurrency, tidied the "between xaprepare and package creation tools" comment
.gitignoredropped Configuration.OperatingSystem.props
build-tools/scripts/PrepareWindows.targetsremoved _XAPrepareExe, _XAPrepareStandardArgs, _BuildXAPrepare target, and the Exec dotnet $(_XAPrepareExe) line. Repointed Prepare at _InstallDotNet. Kept the space-in-path guard, BootstrapTasks / workloads MSBuilds, and PrepareJavaInterop
Makefiledropped PREPARE_PROJECT, PREPARE_NET_FX, PREPARE_ARGS, PREPARE_MSBUILD_FLAGS, PREPARE_SCENARIO, PREPARE_CI_PR, PREPARE_CI, _PREPARE_CI_MODE_*, _PREPARE_ARGS, and all their conditionals. Dropped the dotnet run --project xaprepare.csproj line from prepare. Deleted the prepare-help target
build-tools/scripts/BuildEverything.mkjenkins no longer branches on PREPARE_CI_PR/PREPARE_CI; just $(MAKE) prepare && $(MAKE) leeroy
.github/workflows/copilot-setup-steps.ymldropped now-unused PREPARE_CI=1
build-tools/automation/azure-pipelines-apidocs.yamldropped PREPARE_CI=1
build-tools/automation/yaml-templates/build-linux-steps.yamldropped PREPARE_CI=1
build-tools/automation/yaml-templates/build-macos-steps.yamldropped PREPARE_CI=1
build-tools/automation/yaml-templates/commercial-build.yamldropped PREPARE_CI=1
build-tools/automation/yaml-templates/copy-extra-result-files.yamldropped **/Configuration.OperatingSystem.props glob and the stale Step_CopyExtraResultFilesForCI xaprepare-step comment
build-tools/automation/yaml-templates/generate-cgmanifest.yamldropped the stale Step_GenerateCGManifest xaprepare-step comment
build-tools/automation/yaml-templates/setup-jdk-variables.yamlrenamed $xaPrepareJdkPath$xaJdkPath for hygiene
Documentation/workflow/HowToAddNewApiLevel.mdrewrote the "Add New Platform" section to point at <_PlatformPackage> entries in src/androidsdk/androidsdk.targets instead of AndroidToolchain.cs; updated the --android-sdk-platforms=all recipe to dotnet-local build src/androidsdk/androidsdk.csproj -p:AndroidSdkPlatforms=all
Documentation/building/unix/dependencies.mdJDK-version link now points at $(MicrosoftOpenJDKVersion) in /Configuration.props instead of the deleted Configurables.cs
Documentation/building/configuration.mdremoved the $(MakeConcurrency) bullet

Historical breadcrumb comments left as-is (still accurate and useful for git-archaeology):

  • .github/skills/update-tpn/SKILL.md
  • src/AndroidBuildConfig/AndroidBuildConfig.csproj
  • src/androidsdk/androidsdk.targets
  • src/native/cmake-config/cmake-config.csproj
  • src/workloads/workloads.csproj

Verification

  • build.cmd Prepare — succeeded end-to-end on Windows (0 warnings, 0 errors). The trimmed Prepare target ran through _InstallDotNet, the space-in-path guard, Xamarin.Android.BootstrapTasks.sln, src/workloads/workloads.csproj, and PrepareJavaInterop.
  • dotnet build src\Xamarin.Android.Build.Tasks\Xamarin.Android.Build.Tasks.csproj -c Debug — 0 errors (93 pre-existing warnings from src/Mono.Android/ and generated MCW, unrelated to this change).
  • Repo-wide grep for HostOsName, HostOsFlavor, HostOsRelease, HostCpuCount, NdkLlvmTag, and the MSBuild MakeConcurrency property — clean.
  • Repo-wide grep for xaprepare — clean apart from the five intentional historical breadcrumb comments listed above.

Diff stat

102 files changed, 25 insertions(+), 7891 deletions(-).

Precedent chain

Continues the multi-slice teardown started by #11568, #11580, #11608, #11613, #11631, #11731, #11732, #11733, #11737, #11740, #11760, #11803, #11821, #11825, #11826, #11945, #11946, #11956.

Co-authored-by: Copilot App 223556219+Copilot@users.noreply.github.com

…xaprepare project
Follow-up to #11956 (which moved the JDK half of
`Configuration.OperatingSystem.props` to Java.Interop's `JdkInfo.props`).
The remaining NDK/OS-info half has zero real consumers, so this change
removes the last generator, cascades through the two Scenarios that only
existed to run it, and deletes the whole `build-tools/xaprepare/` project.
Every integration point (Makefile, PrepareWindows.targets, CI YAML, docs)
is updated in the same commit so `build.cmd -t:Prepare` and `make prepare`
still work end-to-end.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
CopilotAI review requested due to automatic review settings July 2, 2026 16:08

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR completes the xaprepare teardown by deleting the remaining Configuration.OperatingSystem.props generator (and its now-dead scenario/OS/tooling scaffolding), removing the entire build-tools/xaprepare/ project, and updating build/CI/docs so make prepare / build.cmd -t:Prepare continue to work without xaprepare.

Changes:

  • Remove generation + import of Configuration.OperatingSystem.props, and drop the unused MakeConcurrency MSBuild property.
  • Delete the build-tools/xaprepare/ project tree and the supporting scenario/OS/tool-runner/config code that only existed for xaprepare.
  • Update Makefile/Windows Prepare target/CI YAML templates and docs to remove xaprepare integration points and point at src/androidsdk/androidsdk.targets/androidsdk.csproj for platform provisioning.

Reviewed changes

Copilot reviewed 101 out of 102 changed files in this pull request and generated 1 comment.

Show a summary per file
FileDescription
MakefileRemoves xaprepare invocation/flags from prepare and deletes prepare-help.
Documentation/workflow/HowToAddNewApiLevel.mdUpdates “add platform” guidance to edit src/androidsdk/androidsdk.targets and uses src/androidsdk/androidsdk.csproj to install platforms.
Documentation/building/unix/dependencies.mdRepoints “current JDK version” reference to $(MicrosoftOpenJDKVersion) in Configuration.props.
Documentation/building/configuration.mdRemoves the $(MakeConcurrency) documentation entry.
Configuration.propsDrops OS-props import and the MakeConcurrency definition; retains only JdkInfo import + related comments.
build-tools/xaprepare/xaprepare/xaprepare.targetsDeleted (xaprepare build-time file generation targets removed).
build-tools/xaprepare/xaprepare/xaprepare.csprojDeleted (xaprepare app project removed).
build-tools/xaprepare/xaprepare/ToolRunners/ToolRunner.OutputSink.csDeleted (xaprepare tool-runner logging sink removed).
build-tools/xaprepare/xaprepare/ToolRunners/ToolRunner.csDeleted (xaprepare tool-runner base removed).
build-tools/xaprepare/xaprepare/ToolRunners/TarRunner.OutputSink.csDeleted (xaprepare tar runner removed).
build-tools/xaprepare/xaprepare/ToolRunners/TarRunner.csDeleted (xaprepare tar runner removed).
build-tools/xaprepare/xaprepare/ToolRunners/SevenZipRunner.OutputSink.csDeleted (xaprepare 7zip runner removed).
build-tools/xaprepare/xaprepare/ToolRunners/SevenZipRunner.csDeleted (xaprepare 7zip runner removed).
build-tools/xaprepare/xaprepare/ToolRunners/GitRunner.OutputSink.csDeleted (xaprepare git runner removed).
build-tools/xaprepare/xaprepare/ToolRunners/GitRunner.csDeleted (xaprepare git runner removed).
build-tools/xaprepare/xaprepare/Steps/Step_GenerateFiles.csDeleted (last generator for Configuration.OperatingSystem.props removed).
build-tools/xaprepare/xaprepare/Scenarios/Scenario_Standard.csDeleted (scenario now empty post-generator removal).
build-tools/xaprepare/xaprepare/Scenarios/Scenario_Required.csDeleted (scenario now empty post-generator removal).
build-tools/xaprepare/xaprepare/Resources/Configuration.OperatingSystem.props.inDeleted (last template removed).
build-tools/xaprepare/xaprepare/OperatingSystems/Windows.csDeleted (xaprepare OS model removed).
build-tools/xaprepare/xaprepare/OperatingSystems/Unix.csDeleted (xaprepare OS model removed).
build-tools/xaprepare/xaprepare/OperatingSystems/NoOS.csDeleted (xaprepare OS model removed).
build-tools/xaprepare/xaprepare/OperatingSystems/MacOS.csDeleted (xaprepare OS model removed).
build-tools/xaprepare/xaprepare/OperatingSystems/Linux.UbuntuCommon.csDeleted (xaprepare OS model removed).
build-tools/xaprepare/xaprepare/OperatingSystems/Linux.csDeleted (xaprepare OS model removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Dependencies/Windows.csDeleted (xaprepare dependency stubs removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Dependencies/MacOS.csDeleted (xaprepare dependency stubs removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Dependencies/Linux.UbuntuCommon.csDeleted (xaprepare dependency stubs removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Dependencies/Linux.Ubuntu.csDeleted (xaprepare dependency stubs removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Dependencies/Linux.Mint.csDeleted (xaprepare dependency stubs removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Dependencies/Linux.Gentoo.csDeleted (xaprepare dependency stubs removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Dependencies/Linux.Fedora.csDeleted (xaprepare dependency stubs removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Dependencies/Linux.DebianCommon.csDeleted (xaprepare dependency stubs removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Dependencies/Linux.Debian.csDeleted (xaprepare dependency stubs removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Dependencies/Linux.Arch.csDeleted (xaprepare dependency stubs removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Configurables.Windows.csDeleted (xaprepare configurables removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Configurables.Unix.csDeleted (xaprepare configurables removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Configurables.MacOS.csDeleted (xaprepare configurables removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Configurables.Linux.csDeleted (xaprepare configurables removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Configurables.csDeleted (xaprepare configurables removed).
build-tools/xaprepare/xaprepare/BuildInfo.cs.inDeleted (xaprepare generated build-info removed).
build-tools/xaprepare/xaprepare/Application/VersionFetchers.csDeleted (xaprepare version parsing infra removed).
build-tools/xaprepare/xaprepare/Application/Utilities.Windows.csDeleted (xaprepare utilities removed).
build-tools/xaprepare/xaprepare/Application/Utilities.Unix.csDeleted (xaprepare utilities removed).
build-tools/xaprepare/xaprepare/Application/ThumbTwiddler.csDeleted (xaprepare TUI/progress UI removed).
build-tools/xaprepare/xaprepare/Application/Step.csDeleted (xaprepare step infra removed).
build-tools/xaprepare/xaprepare/Application/SizeFormatter.csDeleted (xaprepare utility removed).
build-tools/xaprepare/xaprepare/Application/SimpleActionStep.csDeleted (xaprepare step infra removed).
build-tools/xaprepare/xaprepare/Application/SevenZipVersionParser.csDeleted (xaprepare version parsing removed).
build-tools/xaprepare/xaprepare/Application/ScenarioNoScenario.csDeleted (xaprepare scenario infra removed).
build-tools/xaprepare/xaprepare/Application/ScenarioAttribute.csDeleted (xaprepare scenario infra removed).
build-tools/xaprepare/xaprepare/Application/Scenario.csDeleted (xaprepare scenario infra removed).
build-tools/xaprepare/xaprepare/Application/RegexProgramVersionParser.csDeleted (xaprepare version parsing removed).
build-tools/xaprepare/xaprepare/Application/PropertiesChangedEventArgs.csDeleted (xaprepare property infra removed).
build-tools/xaprepare/xaprepare/Application/Properties.Defaults.cs.inDeleted (xaprepare generated defaults removed).
build-tools/xaprepare/xaprepare/Application/Properties.csDeleted (xaprepare property infra removed).
build-tools/xaprepare/xaprepare/Application/ProgramVersionParser.csDeleted (xaprepare version parsing removed).
build-tools/xaprepare/xaprepare/Application/Program.csDeleted (xaprepare dependency infra removed).
build-tools/xaprepare/xaprepare/Application/ProcessStandardStreamWrapper.csDeleted (xaprepare process output wrapper removed).
build-tools/xaprepare/xaprepare/Application/LoggingVerbosity.csDeleted (xaprepare logging infra removed).
build-tools/xaprepare/xaprepare/Application/Log.Windows.csDeleted (xaprepare logging infra removed).
build-tools/xaprepare/xaprepare/Application/Log.Unix.csDeleted (xaprepare logging infra removed).
build-tools/xaprepare/xaprepare/Application/KnownProperties.csDeleted (xaprepare property constants removed).
build-tools/xaprepare/xaprepare/Application/KnownConditions.csDeleted (xaprepare condition constants removed).
build-tools/xaprepare/xaprepare/Application/GeneratedPlaceholdersFile.csDeleted (xaprepare generator infra removed).
build-tools/xaprepare/xaprepare/Application/GeneratedFile.csDeleted (xaprepare generator infra removed).
build-tools/xaprepare/xaprepare/Application/Extensions.DictionaryOfProgramVersionParser.csDeleted (xaprepare helper removed).
build-tools/xaprepare/xaprepare/Application/ExecutionMode.csDeleted (xaprepare execution-mode infra removed).
build-tools/xaprepare/xaprepare/Application/EssentialTools.Unix.csDeleted (xaprepare essential tools infra removed).
build-tools/xaprepare/xaprepare/Application/EssentialTools.MacOS.csDeleted (xaprepare essential tools infra removed).
build-tools/xaprepare/xaprepare/Application/EssentialTools.Linux.csDeleted (xaprepare essential tools infra removed).
build-tools/xaprepare/xaprepare/Application/EssentialTools.csDeleted (xaprepare essential tools infra removed).
build-tools/xaprepare/xaprepare/Application/DownloadStatus.csDeleted (xaprepare download infra removed).
build-tools/xaprepare/xaprepare/Application/DetermineWindowsVersion.Windows.csDeleted (xaprepare OS detection removed).
build-tools/xaprepare/xaprepare/Application/Context.Windows.csDeleted (xaprepare context removed).
build-tools/xaprepare/xaprepare/Application/Context.MacOS.csDeleted (xaprepare context removed).
build-tools/xaprepare/xaprepare/Application/Context.Linux.csDeleted (xaprepare context removed).
build-tools/xaprepare/xaprepare/Application/CompressionFormat.csDeleted (xaprepare compression infra removed).
build-tools/xaprepare/xaprepare/Application/Characters.csDeleted (xaprepare UI chars removed).
build-tools/xaprepare/xaprepare/Application/AppObject.csDeleted (xaprepare base type removed).
build-tools/xaprepare/xaprepare/app.manifestDeleted (xaprepare Windows manifest removed).
build-tools/xaprepare/xaprepare/App.configDeleted (xaprepare legacy app config removed).
build-tools/xaprepare/xaprepare.slnDeleted (xaprepare solution removed).
build-tools/xaprepare/README.mdDeleted (xaprepare documentation removed).
build-tools/xaprepare/.gitignoreDeleted (xaprepare-specific ignore file removed).
build-tools/scripts/PrepareWindows.targetsRemoves xaprepare build/run steps; repoints Prepare to dotnet + bootstrap/workloads + Java.Interop prepare.
build-tools/scripts/BuildEverything.mkSimplifies jenkins to always make prepare && make leeroy.
build-tools/automation/yaml-templates/setup-jdk-variables.yamlRenames internal variable used to compute JAVA_HOME path ($xaPrepareJdkPath$xaJdkPath).
build-tools/automation/yaml-templates/generate-cgmanifest.yamlRemoves stale comment referencing the old xaprepare step.
build-tools/automation/yaml-templates/copy-extra-result-files.yamlRemoves collection of the now-deleted Configuration.OperatingSystem.props and tidies comment.
build-tools/automation/yaml-templates/commercial-build.yamlDrops PREPARE_CI=1 from make jenkins invocation.
build-tools/automation/yaml-templates/build-macos-steps.yamlDrops PREPARE_CI=1 from make jenkins invocation.
build-tools/automation/yaml-templates/build-linux-steps.yamlDrops PREPARE_CI=1 from make jenkins invocation.
build-tools/automation/azure-pipelines-apidocs.yamlDrops PREPARE_CI=1 from make prepare invocation.
.gitignoreRemoves Configuration.OperatingSystem.props ignore entry since it’s no longer generated.
.github/workflows/copilot-setup-steps.ymlDrops PREPARE_CI=1 from make jenkins invocation.
Comments suppressed due to low confidence (1)

Configuration.props:9

  • 💡 MaintainabilityDoNotLoadOSProperties now only guards importing JdkInfo.props (since Configuration.OperatingSystem.props was removed). Adding a short comment here would prevent future confusion about what this switch actually disables.
 <Import
Project="$(MSBuildThisFileDirectory)external\Java.Interop\bin\Build$(Configuration)\JdkInfo.props"
Condition=" Exists('$(MSBuildThisFileDirectory)external\Java.Interop\bin\Build$(Configuration)\JdkInfo.props') And '$(DoNotLoadOSProperties)' != 'True' "
/>

Comment threadDocumentation/workflow/HowToAddNewApiLevel.md Outdated
jonathanpeppersand others added 4 commits July 2, 2026 11:19
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
xaprepare previously ran `git submodule update` via
Step_PrepareExternalGitDependencies + Context.MainAsync's
SelectedScenario.NeedsGitSubmodules block. With xaprepare gone,
nothing initialized submodules for the `checkout: self` blocks
in azure-pipelines-public.yaml, so the Bootstrap solution build
failed with MSB4019 trying to import
external/xamarin-android-tools/src/Microsoft.Android.Build.BaseTasks/MSBuildReferences.projitems.
Add `submodules: recursive` to the three `checkout: self` steps
(macOS, Windows, Linux) to match azure-pipelines-nightly.yaml,
azure-pipelines-apidocs.yaml, azure-pipelines.yaml, and
stage-java-interop-tests.yaml (all already set it).
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
xaprepare's Context.WriteBuildToolsInventoryCsv() produced
bin/Build$(Configuration)/buildtoolsinventory.csv listing the
Android SDK/NDK/JDK/dotnet component versions, required by
Section 4.e.i.D of the Executive Order on Cybersecurity build
system security requirements (per PR #6833). The file is
consumed as the AndroidBuildToolsInventory pipeline artifact
by build-macos-steps.yaml, build-macos.yaml (1ES), and
commercial-build.yaml.
With xaprepare gone this file was no longer being generated,
so the macOS `upload build tools inventory` task failed with:
Path does not exist: .../bin/BuildRelease/buildtoolsinventory.csv
Add build-tools/build-tools-inventory/build-tools-inventory.proj
which reads the versions from Configuration.props, eng/Versions.props,
and the _PlatformPackage ItemGroup in androidsdk.targets (the
single sources of truth) and writes the CSV via WriteLinesToFile.
Wire it into Makefile `prepare` and PrepareWindows.targets `Prepare`
so the file is produced by `make prepare` and `build.cmd -t:Prepare`.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
xaprepare's Step_GenerateCGManifest ran on every CI `make prepare`
invocation (because `PREPARE_CI=1` implied `-a` which selected
Scenario_Standard). generate-cgmanifest.yaml was wired into
build-linux-steps, build-macos-steps, build-windows-steps, and
commercial-build, but the internal 1ES apidocs pipeline was
missed. Component Governance depends on the manifest for git
submodule registrations that its native detectors can't
enumerate.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

@simonrozsivalsimonrozsival left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@simonrozsival
simonrozsival merged commit be5272c into mainJul 3, 2026
42 checks passed
@simonrozsival
simonrozsival deleted the jonathanpeppers-xaprepare-d1-ndk-os-info branch July 3, 2026 07:06
jonathanpeppers added a commit that referenced this pull request Jul 16, 2026
## Summary
- delete the unused `Android`, `Emulator`, and legacy `JdkInfo` BootstrapTasks
- move the one surviving trace logger adapter into `CheckApiCompatibility`
- remove BootstrapTasks' `Xamarin.Android.Tools.AndroidSdk` dependency by parsing the three API metadata fields used by `GenerateSupportedPlatforms` directly
- delete the redundant `Xamarin.Android.BootstrapTasks.sln` and build BootstrapTasks directly in CI
- make `build-tools/scripts/Prepare.proj` the cross-platform source of truth for post-install Prepare orchestration
- delete `PrepareWindows.targets` by moving its Windows-only .NET installation and toolchain-path guard into `Prepare.proj`
This follows the wholesale xaprepare removal in #11959.
## BootstrapTasks cleanup
The deleted `Android` and `Emulator` wrappers had no task registration or invocation. The deleted `JdkInfo` task was superseded by `Java.Interop.BootstrapTasks.JdkInfo`; its only remaining indirect use was a generic logger callback used by `CheckApiCompatibility`.
The initial dependency audit also surfaced a narrow surviving use of `AndroidVersion` and `AndroidVersions` in `GenerateSupportedPlatforms`. That task only needed `VersionCodeFull`, target-framework version ordering, and `Stable`, so it now parses those existing item metadata values directly while preserving the prior max-stable and supported-platform ordering semantics. This removes the broader `Xamarin.Android.Tools.AndroidSdk` project reference without duplicating its model.
`Xamarin.Android.BootstrapTasks.sln` only contained BootstrapTasks and `xa-prep-tasks`, which is already a BootstrapTasks project reference. Its Makefile, Windows, and Azure Pipelines consumers now use the project/common orchestrator directly.
## Prepare orchestration
| Before | After |
| --- | --- |
| Unix Makefile listed four commands | Unix installs .NET, then invokes `Prepare.proj` once |
| `PrepareWindows.targets` installed .NET and listed the same four operations | The solution imports `Prepare.proj`, which installs .NET and checks the toolchain path on Windows |
| Java.Interop was called separately by each wrapper | `Prepare.proj` imports `DotNet.targets` and calls the existing `PrepareJavaInterop` target |
`Prepare.proj` preserves this order:
1. restore/build BootstrapTasks
2. restore/build workloads
3. run `PrepareJavaInterop` and its `PrepareOpenJDK` dependency
4. build the build-tools inventory
The Unix wrapper launches the orchestrator with system `dotnet`; imported `DotNet.targets` continues to use the repo-local `$(DotNetPreviewTool)` for Java.Interop.
On Windows, `Prepare.proj` also owns the conditional .NET installation and Android toolchain path guard previously kept in `PrepareWindows.targets`.
## Verification
- `dotnet build build-tools\Xamarin.Android.Tools.BootstrapTasks\Xamarin.Android.Tools.BootstrapTasks.csproj -c Debug`: passed, 0 warnings
- `build.cmd -t:Prepare -c Debug`: passed end to end
- expected outputs confirmed:
- `bin\BuildDebug\net10.0\Xamarin.Android.Tools.BootstrapTasks.dll`
- `external\Java.Interop\bin\BuildDebug\JdkInfo.props`
- `bin\BuildDebug\buildtoolsinventory.csv`
- system-`dotnet` invocation of `Prepare.proj`: passed, 0 warnings; binlog inspected with `binlogtool`
- `dotnet-local.cmd build src\Xamarin.Android.Build.Tasks\Xamarin.Android.Build.Tasks.csproj -c Debug`: passed with 17 pre-existing generated-code/Javac warnings
- old solution/task/orchestration references: no matches
- GNU make was unavailable on the Windows host; the equivalent system-`dotnet` command emitted by `SYSTEM_DOTNET_BINLOG` was run directly instead
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Šimon Rozsíval <simon@rozsival.com>
@github-actionsgithub-actionsBot locked and limited conversation to collaborators Aug 2, 2026
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@jonathanpeppers@simonrozsival
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
 blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
Skip to content

[xaprepare] Delete Configuration.OperatingSystem.props generator and xaprepare project - #11959

Merged
simonrozsival merged 5 commits into
mainfrom
jonathanpeppers-xaprepare-d1-ndk-os-info
Jul 3, 2026
Merged

[xaprepare] Delete Configuration.OperatingSystem.props generator and xaprepare project#11959
simonrozsival merged 5 commits into
mainfrom
jonathanpeppers-xaprepare-d1-ndk-os-info

Conversation

@jonathanpeppers

Copy link
Copy Markdown
Member

Follow-up to #11956, which moved the JDK half of Configuration.OperatingSystem.props to Java.Interop's JdkInfo.props. The remaining NDK / OS-info half has zero real consumers, so this PR:

  1. Deletes the last generator template (Configuration.OperatingSystem.props.in).
  2. Cascades through Step_GenerateFiles, both Scenario_* classes (which now had zero steps), and every supporting OperatingSystems/, Context.*OS.cs, EssentialTools.*, ToolRunners/*, Configurables.*, Application/*, and Main.cs file that only existed to feed the scenarios.
  3. Deletes the whole build-tools/xaprepare/ project.
  4. Patches every integration point (Makefile, PrepareWindows.targets, BuildEverything.mk, CI YAML, docs) so build.cmd -t:Prepare and make prepare still work end-to-end.

Configuration.OperatingSystem.props.in placeholder audit

PlaceholderConsumers outside the .in fileAction
HostOsNamenonedrop
HostOsFlavornonedrop
HostOsReleasenonedrop
HostBitsnone (ArchiveBase.HostBits in src/Xamarin.Installer.AndroidSDK/ is an unrelated C# property)drop
NdkLlvmTagnone (the NDK toolchain OS tag is resolved elsewhere via _NdkToolchainOSTag in androidsdk.targets)drop
HostCpuCountonly Configuration.props:72 via $(MakeConcurrency)drop

$(MakeConcurrency) audit

The only definition was Configuration.props:72. A repo-wide grep of .targets, .props, .projitems, Makefile, and .mk files found zero consumers of the MSBuild property. The MakeConcurrency hits under build-tools/xaprepare/ were an unrelated C# Context.MakeConcurrency property.

Result: dropped the MakeConcurrency MSBuild property entirely (no $([System.Environment]::ProcessorCount) replacement needed) and removed the $(MakeConcurrency) bullet in Documentation/building/configuration.md.

xaprepare integration audit (grep-confirmed, patched here)

LocationChange
build-tools/xaprepare/ (entire tree)deleted — 86 tracked files
Configuration.propsdropped <Import> of the generated OS props, dropped MakeConcurrency, tidied the "between xaprepare and package creation tools" comment
.gitignoredropped Configuration.OperatingSystem.props
build-tools/scripts/PrepareWindows.targetsremoved _XAPrepareExe, _XAPrepareStandardArgs, _BuildXAPrepare target, and the Exec dotnet $(_XAPrepareExe) line. Repointed Prepare at _InstallDotNet. Kept the space-in-path guard, BootstrapTasks / workloads MSBuilds, and PrepareJavaInterop
Makefiledropped PREPARE_PROJECT, PREPARE_NET_FX, PREPARE_ARGS, PREPARE_MSBUILD_FLAGS, PREPARE_SCENARIO, PREPARE_CI_PR, PREPARE_CI, _PREPARE_CI_MODE_*, _PREPARE_ARGS, and all their conditionals. Dropped the dotnet run --project xaprepare.csproj line from prepare. Deleted the prepare-help target
build-tools/scripts/BuildEverything.mkjenkins no longer branches on PREPARE_CI_PR/PREPARE_CI; just $(MAKE) prepare && $(MAKE) leeroy
.github/workflows/copilot-setup-steps.ymldropped now-unused PREPARE_CI=1
build-tools/automation/azure-pipelines-apidocs.yamldropped PREPARE_CI=1
build-tools/automation/yaml-templates/build-linux-steps.yamldropped PREPARE_CI=1
build-tools/automation/yaml-templates/build-macos-steps.yamldropped PREPARE_CI=1
build-tools/automation/yaml-templates/commercial-build.yamldropped PREPARE_CI=1
build-tools/automation/yaml-templates/copy-extra-result-files.yamldropped **/Configuration.OperatingSystem.props glob and the stale Step_CopyExtraResultFilesForCI xaprepare-step comment
build-tools/automation/yaml-templates/generate-cgmanifest.yamldropped the stale Step_GenerateCGManifest xaprepare-step comment
build-tools/automation/yaml-templates/setup-jdk-variables.yamlrenamed $xaPrepareJdkPath$xaJdkPath for hygiene
Documentation/workflow/HowToAddNewApiLevel.mdrewrote the "Add New Platform" section to point at <_PlatformPackage> entries in src/androidsdk/androidsdk.targets instead of AndroidToolchain.cs; updated the --android-sdk-platforms=all recipe to dotnet-local build src/androidsdk/androidsdk.csproj -p:AndroidSdkPlatforms=all
Documentation/building/unix/dependencies.mdJDK-version link now points at $(MicrosoftOpenJDKVersion) in /Configuration.props instead of the deleted Configurables.cs
Documentation/building/configuration.mdremoved the $(MakeConcurrency) bullet

Historical breadcrumb comments left as-is (still accurate and useful for git-archaeology):

  • .github/skills/update-tpn/SKILL.md
  • src/AndroidBuildConfig/AndroidBuildConfig.csproj
  • src/androidsdk/androidsdk.targets
  • src/native/cmake-config/cmake-config.csproj
  • src/workloads/workloads.csproj

Verification

  • build.cmd Prepare — succeeded end-to-end on Windows (0 warnings, 0 errors). The trimmed Prepare target ran through _InstallDotNet, the space-in-path guard, Xamarin.Android.BootstrapTasks.sln, src/workloads/workloads.csproj, and PrepareJavaInterop.
  • dotnet build src\Xamarin.Android.Build.Tasks\Xamarin.Android.Build.Tasks.csproj -c Debug — 0 errors (93 pre-existing warnings from src/Mono.Android/ and generated MCW, unrelated to this change).
  • Repo-wide grep for HostOsName, HostOsFlavor, HostOsRelease, HostCpuCount, NdkLlvmTag, and the MSBuild MakeConcurrency property — clean.
  • Repo-wide grep for xaprepare — clean apart from the five intentional historical breadcrumb comments listed above.

Diff stat

102 files changed, 25 insertions(+), 7891 deletions(-).

Precedent chain

Continues the multi-slice teardown started by #11568, #11580, #11608, #11613, #11631, #11731, #11732, #11733, #11737, #11740, #11760, #11803, #11821, #11825, #11826, #11945, #11946, #11956.

Co-authored-by: Copilot App 223556219+Copilot@users.noreply.github.com

…xaprepare project
Follow-up to #11956 (which moved the JDK half of
`Configuration.OperatingSystem.props` to Java.Interop's `JdkInfo.props`).
The remaining NDK/OS-info half has zero real consumers, so this change
removes the last generator, cascades through the two Scenarios that only
existed to run it, and deletes the whole `build-tools/xaprepare/` project.
Every integration point (Makefile, PrepareWindows.targets, CI YAML, docs)
is updated in the same commit so `build.cmd -t:Prepare` and `make prepare`
still work end-to-end.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
CopilotAI review requested due to automatic review settings July 2, 2026 16:08

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR completes the xaprepare teardown by deleting the remaining Configuration.OperatingSystem.props generator (and its now-dead scenario/OS/tooling scaffolding), removing the entire build-tools/xaprepare/ project, and updating build/CI/docs so make prepare / build.cmd -t:Prepare continue to work without xaprepare.

Changes:

  • Remove generation + import of Configuration.OperatingSystem.props, and drop the unused MakeConcurrency MSBuild property.
  • Delete the build-tools/xaprepare/ project tree and the supporting scenario/OS/tool-runner/config code that only existed for xaprepare.
  • Update Makefile/Windows Prepare target/CI YAML templates and docs to remove xaprepare integration points and point at src/androidsdk/androidsdk.targets/androidsdk.csproj for platform provisioning.

Reviewed changes

Copilot reviewed 101 out of 102 changed files in this pull request and generated 1 comment.

Show a summary per file
FileDescription
MakefileRemoves xaprepare invocation/flags from prepare and deletes prepare-help.
Documentation/workflow/HowToAddNewApiLevel.mdUpdates “add platform” guidance to edit src/androidsdk/androidsdk.targets and uses src/androidsdk/androidsdk.csproj to install platforms.
Documentation/building/unix/dependencies.mdRepoints “current JDK version” reference to $(MicrosoftOpenJDKVersion) in Configuration.props.
Documentation/building/configuration.mdRemoves the $(MakeConcurrency) documentation entry.
Configuration.propsDrops OS-props import and the MakeConcurrency definition; retains only JdkInfo import + related comments.
build-tools/xaprepare/xaprepare/xaprepare.targetsDeleted (xaprepare build-time file generation targets removed).
build-tools/xaprepare/xaprepare/xaprepare.csprojDeleted (xaprepare app project removed).
build-tools/xaprepare/xaprepare/ToolRunners/ToolRunner.OutputSink.csDeleted (xaprepare tool-runner logging sink removed).
build-tools/xaprepare/xaprepare/ToolRunners/ToolRunner.csDeleted (xaprepare tool-runner base removed).
build-tools/xaprepare/xaprepare/ToolRunners/TarRunner.OutputSink.csDeleted (xaprepare tar runner removed).
build-tools/xaprepare/xaprepare/ToolRunners/TarRunner.csDeleted (xaprepare tar runner removed).
build-tools/xaprepare/xaprepare/ToolRunners/SevenZipRunner.OutputSink.csDeleted (xaprepare 7zip runner removed).
build-tools/xaprepare/xaprepare/ToolRunners/SevenZipRunner.csDeleted (xaprepare 7zip runner removed).
build-tools/xaprepare/xaprepare/ToolRunners/GitRunner.OutputSink.csDeleted (xaprepare git runner removed).
build-tools/xaprepare/xaprepare/ToolRunners/GitRunner.csDeleted (xaprepare git runner removed).
build-tools/xaprepare/xaprepare/Steps/Step_GenerateFiles.csDeleted (last generator for Configuration.OperatingSystem.props removed).
build-tools/xaprepare/xaprepare/Scenarios/Scenario_Standard.csDeleted (scenario now empty post-generator removal).
build-tools/xaprepare/xaprepare/Scenarios/Scenario_Required.csDeleted (scenario now empty post-generator removal).
build-tools/xaprepare/xaprepare/Resources/Configuration.OperatingSystem.props.inDeleted (last template removed).
build-tools/xaprepare/xaprepare/OperatingSystems/Windows.csDeleted (xaprepare OS model removed).
build-tools/xaprepare/xaprepare/OperatingSystems/Unix.csDeleted (xaprepare OS model removed).
build-tools/xaprepare/xaprepare/OperatingSystems/NoOS.csDeleted (xaprepare OS model removed).
build-tools/xaprepare/xaprepare/OperatingSystems/MacOS.csDeleted (xaprepare OS model removed).
build-tools/xaprepare/xaprepare/OperatingSystems/Linux.UbuntuCommon.csDeleted (xaprepare OS model removed).
build-tools/xaprepare/xaprepare/OperatingSystems/Linux.csDeleted (xaprepare OS model removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Dependencies/Windows.csDeleted (xaprepare dependency stubs removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Dependencies/MacOS.csDeleted (xaprepare dependency stubs removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Dependencies/Linux.UbuntuCommon.csDeleted (xaprepare dependency stubs removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Dependencies/Linux.Ubuntu.csDeleted (xaprepare dependency stubs removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Dependencies/Linux.Mint.csDeleted (xaprepare dependency stubs removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Dependencies/Linux.Gentoo.csDeleted (xaprepare dependency stubs removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Dependencies/Linux.Fedora.csDeleted (xaprepare dependency stubs removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Dependencies/Linux.DebianCommon.csDeleted (xaprepare dependency stubs removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Dependencies/Linux.Debian.csDeleted (xaprepare dependency stubs removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Dependencies/Linux.Arch.csDeleted (xaprepare dependency stubs removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Configurables.Windows.csDeleted (xaprepare configurables removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Configurables.Unix.csDeleted (xaprepare configurables removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Configurables.MacOS.csDeleted (xaprepare configurables removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Configurables.Linux.csDeleted (xaprepare configurables removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Configurables.csDeleted (xaprepare configurables removed).
build-tools/xaprepare/xaprepare/BuildInfo.cs.inDeleted (xaprepare generated build-info removed).
build-tools/xaprepare/xaprepare/Application/VersionFetchers.csDeleted (xaprepare version parsing infra removed).
build-tools/xaprepare/xaprepare/Application/Utilities.Windows.csDeleted (xaprepare utilities removed).
build-tools/xaprepare/xaprepare/Application/Utilities.Unix.csDeleted (xaprepare utilities removed).
build-tools/xaprepare/xaprepare/Application/ThumbTwiddler.csDeleted (xaprepare TUI/progress UI removed).
build-tools/xaprepare/xaprepare/Application/Step.csDeleted (xaprepare step infra removed).
build-tools/xaprepare/xaprepare/Application/SizeFormatter.csDeleted (xaprepare utility removed).
build-tools/xaprepare/xaprepare/Application/SimpleActionStep.csDeleted (xaprepare step infra removed).
build-tools/xaprepare/xaprepare/Application/SevenZipVersionParser.csDeleted (xaprepare version parsing removed).
build-tools/xaprepare/xaprepare/Application/ScenarioNoScenario.csDeleted (xaprepare scenario infra removed).
build-tools/xaprepare/xaprepare/Application/ScenarioAttribute.csDeleted (xaprepare scenario infra removed).
build-tools/xaprepare/xaprepare/Application/Scenario.csDeleted (xaprepare scenario infra removed).
build-tools/xaprepare/xaprepare/Application/RegexProgramVersionParser.csDeleted (xaprepare version parsing removed).
build-tools/xaprepare/xaprepare/Application/PropertiesChangedEventArgs.csDeleted (xaprepare property infra removed).
build-tools/xaprepare/xaprepare/Application/Properties.Defaults.cs.inDeleted (xaprepare generated defaults removed).
build-tools/xaprepare/xaprepare/Application/Properties.csDeleted (xaprepare property infra removed).
build-tools/xaprepare/xaprepare/Application/ProgramVersionParser.csDeleted (xaprepare version parsing removed).
build-tools/xaprepare/xaprepare/Application/Program.csDeleted (xaprepare dependency infra removed).
build-tools/xaprepare/xaprepare/Application/ProcessStandardStreamWrapper.csDeleted (xaprepare process output wrapper removed).
build-tools/xaprepare/xaprepare/Application/LoggingVerbosity.csDeleted (xaprepare logging infra removed).
build-tools/xaprepare/xaprepare/Application/Log.Windows.csDeleted (xaprepare logging infra removed).
build-tools/xaprepare/xaprepare/Application/Log.Unix.csDeleted (xaprepare logging infra removed).
build-tools/xaprepare/xaprepare/Application/KnownProperties.csDeleted (xaprepare property constants removed).
build-tools/xaprepare/xaprepare/Application/KnownConditions.csDeleted (xaprepare condition constants removed).
build-tools/xaprepare/xaprepare/Application/GeneratedPlaceholdersFile.csDeleted (xaprepare generator infra removed).
build-tools/xaprepare/xaprepare/Application/GeneratedFile.csDeleted (xaprepare generator infra removed).
build-tools/xaprepare/xaprepare/Application/Extensions.DictionaryOfProgramVersionParser.csDeleted (xaprepare helper removed).
build-tools/xaprepare/xaprepare/Application/ExecutionMode.csDeleted (xaprepare execution-mode infra removed).
build-tools/xaprepare/xaprepare/Application/EssentialTools.Unix.csDeleted (xaprepare essential tools infra removed).
build-tools/xaprepare/xaprepare/Application/EssentialTools.MacOS.csDeleted (xaprepare essential tools infra removed).
build-tools/xaprepare/xaprepare/Application/EssentialTools.Linux.csDeleted (xaprepare essential tools infra removed).
build-tools/xaprepare/xaprepare/Application/EssentialTools.csDeleted (xaprepare essential tools infra removed).
build-tools/xaprepare/xaprepare/Application/DownloadStatus.csDeleted (xaprepare download infra removed).
build-tools/xaprepare/xaprepare/Application/DetermineWindowsVersion.Windows.csDeleted (xaprepare OS detection removed).
build-tools/xaprepare/xaprepare/Application/Context.Windows.csDeleted (xaprepare context removed).
build-tools/xaprepare/xaprepare/Application/Context.MacOS.csDeleted (xaprepare context removed).
build-tools/xaprepare/xaprepare/Application/Context.Linux.csDeleted (xaprepare context removed).
build-tools/xaprepare/xaprepare/Application/CompressionFormat.csDeleted (xaprepare compression infra removed).
build-tools/xaprepare/xaprepare/Application/Characters.csDeleted (xaprepare UI chars removed).
build-tools/xaprepare/xaprepare/Application/AppObject.csDeleted (xaprepare base type removed).
build-tools/xaprepare/xaprepare/app.manifestDeleted (xaprepare Windows manifest removed).
build-tools/xaprepare/xaprepare/App.configDeleted (xaprepare legacy app config removed).
build-tools/xaprepare/xaprepare.slnDeleted (xaprepare solution removed).
build-tools/xaprepare/README.mdDeleted (xaprepare documentation removed).
build-tools/xaprepare/.gitignoreDeleted (xaprepare-specific ignore file removed).
build-tools/scripts/PrepareWindows.targetsRemoves xaprepare build/run steps; repoints Prepare to dotnet + bootstrap/workloads + Java.Interop prepare.
build-tools/scripts/BuildEverything.mkSimplifies jenkins to always make prepare && make leeroy.
build-tools/automation/yaml-templates/setup-jdk-variables.yamlRenames internal variable used to compute JAVA_HOME path ($xaPrepareJdkPath$xaJdkPath).
build-tools/automation/yaml-templates/generate-cgmanifest.yamlRemoves stale comment referencing the old xaprepare step.
build-tools/automation/yaml-templates/copy-extra-result-files.yamlRemoves collection of the now-deleted Configuration.OperatingSystem.props and tidies comment.
build-tools/automation/yaml-templates/commercial-build.yamlDrops PREPARE_CI=1 from make jenkins invocation.
build-tools/automation/yaml-templates/build-macos-steps.yamlDrops PREPARE_CI=1 from make jenkins invocation.
build-tools/automation/yaml-templates/build-linux-steps.yamlDrops PREPARE_CI=1 from make jenkins invocation.
build-tools/automation/azure-pipelines-apidocs.yamlDrops PREPARE_CI=1 from make prepare invocation.
.gitignoreRemoves Configuration.OperatingSystem.props ignore entry since it’s no longer generated.
.github/workflows/copilot-setup-steps.ymlDrops PREPARE_CI=1 from make jenkins invocation.
Comments suppressed due to low confidence (1)

Configuration.props:9

  • 💡 MaintainabilityDoNotLoadOSProperties now only guards importing JdkInfo.props (since Configuration.OperatingSystem.props was removed). Adding a short comment here would prevent future confusion about what this switch actually disables.
 <Import
Project="$(MSBuildThisFileDirectory)external\Java.Interop\bin\Build$(Configuration)\JdkInfo.props"
Condition=" Exists('$(MSBuildThisFileDirectory)external\Java.Interop\bin\Build$(Configuration)\JdkInfo.props') And '$(DoNotLoadOSProperties)' != 'True' "
/>

Comment threadDocumentation/workflow/HowToAddNewApiLevel.md Outdated
jonathanpeppersand others added 4 commits July 2, 2026 11:19
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
xaprepare previously ran `git submodule update` via
Step_PrepareExternalGitDependencies + Context.MainAsync's
SelectedScenario.NeedsGitSubmodules block. With xaprepare gone,
nothing initialized submodules for the `checkout: self` blocks
in azure-pipelines-public.yaml, so the Bootstrap solution build
failed with MSB4019 trying to import
external/xamarin-android-tools/src/Microsoft.Android.Build.BaseTasks/MSBuildReferences.projitems.
Add `submodules: recursive` to the three `checkout: self` steps
(macOS, Windows, Linux) to match azure-pipelines-nightly.yaml,
azure-pipelines-apidocs.yaml, azure-pipelines.yaml, and
stage-java-interop-tests.yaml (all already set it).
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
xaprepare's Context.WriteBuildToolsInventoryCsv() produced
bin/Build$(Configuration)/buildtoolsinventory.csv listing the
Android SDK/NDK/JDK/dotnet component versions, required by
Section 4.e.i.D of the Executive Order on Cybersecurity build
system security requirements (per PR #6833). The file is
consumed as the AndroidBuildToolsInventory pipeline artifact
by build-macos-steps.yaml, build-macos.yaml (1ES), and
commercial-build.yaml.
With xaprepare gone this file was no longer being generated,
so the macOS `upload build tools inventory` task failed with:
Path does not exist: .../bin/BuildRelease/buildtoolsinventory.csv
Add build-tools/build-tools-inventory/build-tools-inventory.proj
which reads the versions from Configuration.props, eng/Versions.props,
and the _PlatformPackage ItemGroup in androidsdk.targets (the
single sources of truth) and writes the CSV via WriteLinesToFile.
Wire it into Makefile `prepare` and PrepareWindows.targets `Prepare`
so the file is produced by `make prepare` and `build.cmd -t:Prepare`.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
xaprepare's Step_GenerateCGManifest ran on every CI `make prepare`
invocation (because `PREPARE_CI=1` implied `-a` which selected
Scenario_Standard). generate-cgmanifest.yaml was wired into
build-linux-steps, build-macos-steps, build-windows-steps, and
commercial-build, but the internal 1ES apidocs pipeline was
missed. Component Governance depends on the manifest for git
submodule registrations that its native detectors can't
enumerate.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

@simonrozsivalsimonrozsival left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@simonrozsival
simonrozsival merged commit be5272c into mainJul 3, 2026
42 checks passed
@simonrozsival
simonrozsival deleted the jonathanpeppers-xaprepare-d1-ndk-os-info branch July 3, 2026 07:06
jonathanpeppers added a commit that referenced this pull request Jul 16, 2026
## Summary
- delete the unused `Android`, `Emulator`, and legacy `JdkInfo` BootstrapTasks
- move the one surviving trace logger adapter into `CheckApiCompatibility`
- remove BootstrapTasks' `Xamarin.Android.Tools.AndroidSdk` dependency by parsing the three API metadata fields used by `GenerateSupportedPlatforms` directly
- delete the redundant `Xamarin.Android.BootstrapTasks.sln` and build BootstrapTasks directly in CI
- make `build-tools/scripts/Prepare.proj` the cross-platform source of truth for post-install Prepare orchestration
- delete `PrepareWindows.targets` by moving its Windows-only .NET installation and toolchain-path guard into `Prepare.proj`
This follows the wholesale xaprepare removal in #11959.
## BootstrapTasks cleanup
The deleted `Android` and `Emulator` wrappers had no task registration or invocation. The deleted `JdkInfo` task was superseded by `Java.Interop.BootstrapTasks.JdkInfo`; its only remaining indirect use was a generic logger callback used by `CheckApiCompatibility`.
The initial dependency audit also surfaced a narrow surviving use of `AndroidVersion` and `AndroidVersions` in `GenerateSupportedPlatforms`. That task only needed `VersionCodeFull`, target-framework version ordering, and `Stable`, so it now parses those existing item metadata values directly while preserving the prior max-stable and supported-platform ordering semantics. This removes the broader `Xamarin.Android.Tools.AndroidSdk` project reference without duplicating its model.
`Xamarin.Android.BootstrapTasks.sln` only contained BootstrapTasks and `xa-prep-tasks`, which is already a BootstrapTasks project reference. Its Makefile, Windows, and Azure Pipelines consumers now use the project/common orchestrator directly.
## Prepare orchestration
| Before | After |
| --- | --- |
| Unix Makefile listed four commands | Unix installs .NET, then invokes `Prepare.proj` once |
| `PrepareWindows.targets` installed .NET and listed the same four operations | The solution imports `Prepare.proj`, which installs .NET and checks the toolchain path on Windows |
| Java.Interop was called separately by each wrapper | `Prepare.proj` imports `DotNet.targets` and calls the existing `PrepareJavaInterop` target |
`Prepare.proj` preserves this order:
1. restore/build BootstrapTasks
2. restore/build workloads
3. run `PrepareJavaInterop` and its `PrepareOpenJDK` dependency
4. build the build-tools inventory
The Unix wrapper launches the orchestrator with system `dotnet`; imported `DotNet.targets` continues to use the repo-local `$(DotNetPreviewTool)` for Java.Interop.
On Windows, `Prepare.proj` also owns the conditional .NET installation and Android toolchain path guard previously kept in `PrepareWindows.targets`.
## Verification
- `dotnet build build-tools\Xamarin.Android.Tools.BootstrapTasks\Xamarin.Android.Tools.BootstrapTasks.csproj -c Debug`: passed, 0 warnings
- `build.cmd -t:Prepare -c Debug`: passed end to end
- expected outputs confirmed:
- `bin\BuildDebug\net10.0\Xamarin.Android.Tools.BootstrapTasks.dll`
- `external\Java.Interop\bin\BuildDebug\JdkInfo.props`
- `bin\BuildDebug\buildtoolsinventory.csv`
- system-`dotnet` invocation of `Prepare.proj`: passed, 0 warnings; binlog inspected with `binlogtool`
- `dotnet-local.cmd build src\Xamarin.Android.Build.Tasks\Xamarin.Android.Build.Tasks.csproj -c Debug`: passed with 17 pre-existing generated-code/Javac warnings
- old solution/task/orchestration references: no matches
- GNU make was unavailable on the Windows host; the equivalent system-`dotnet` command emitted by `SYSTEM_DOTNET_BINLOG` was run directly instead
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Šimon Rozsíval <simon@rozsival.com>
@github-actionsgithub-actionsBot locked and limited conversation to collaborators Aug 2, 2026
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@jonathanpeppers@simonrozsival
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

[xaprepare] Delete Configuration.OperatingSystem.props generator and xaprepare project - #11959

Merged
simonrozsival merged 5 commits into
mainfrom
jonathanpeppers-xaprepare-d1-ndk-os-info
Jul 3, 2026
Merged

[xaprepare] Delete Configuration.OperatingSystem.props generator and xaprepare project#11959
simonrozsival merged 5 commits into
mainfrom
jonathanpeppers-xaprepare-d1-ndk-os-info

Conversation

@jonathanpeppers

Copy link
Copy Markdown
Member

Follow-up to #11956, which moved the JDK half of Configuration.OperatingSystem.props to Java.Interop's JdkInfo.props. The remaining NDK / OS-info half has zero real consumers, so this PR:

  1. Deletes the last generator template (Configuration.OperatingSystem.props.in).
  2. Cascades through Step_GenerateFiles, both Scenario_* classes (which now had zero steps), and every supporting OperatingSystems/, Context.*OS.cs, EssentialTools.*, ToolRunners/*, Configurables.*, Application/*, and Main.cs file that only existed to feed the scenarios.
  3. Deletes the whole build-tools/xaprepare/ project.
  4. Patches every integration point (Makefile, PrepareWindows.targets, BuildEverything.mk, CI YAML, docs) so build.cmd -t:Prepare and make prepare still work end-to-end.

Configuration.OperatingSystem.props.in placeholder audit

PlaceholderConsumers outside the .in fileAction
HostOsNamenonedrop
HostOsFlavornonedrop
HostOsReleasenonedrop
HostBitsnone (ArchiveBase.HostBits in src/Xamarin.Installer.AndroidSDK/ is an unrelated C# property)drop
NdkLlvmTagnone (the NDK toolchain OS tag is resolved elsewhere via _NdkToolchainOSTag in androidsdk.targets)drop
HostCpuCountonly Configuration.props:72 via $(MakeConcurrency)drop

$(MakeConcurrency) audit

The only definition was Configuration.props:72. A repo-wide grep of .targets, .props, .projitems, Makefile, and .mk files found zero consumers of the MSBuild property. The MakeConcurrency hits under build-tools/xaprepare/ were an unrelated C# Context.MakeConcurrency property.

Result: dropped the MakeConcurrency MSBuild property entirely (no $([System.Environment]::ProcessorCount) replacement needed) and removed the $(MakeConcurrency) bullet in Documentation/building/configuration.md.

xaprepare integration audit (grep-confirmed, patched here)

LocationChange
build-tools/xaprepare/ (entire tree)deleted — 86 tracked files
Configuration.propsdropped <Import> of the generated OS props, dropped MakeConcurrency, tidied the "between xaprepare and package creation tools" comment
.gitignoredropped Configuration.OperatingSystem.props
build-tools/scripts/PrepareWindows.targetsremoved _XAPrepareExe, _XAPrepareStandardArgs, _BuildXAPrepare target, and the Exec dotnet $(_XAPrepareExe) line. Repointed Prepare at _InstallDotNet. Kept the space-in-path guard, BootstrapTasks / workloads MSBuilds, and PrepareJavaInterop
Makefiledropped PREPARE_PROJECT, PREPARE_NET_FX, PREPARE_ARGS, PREPARE_MSBUILD_FLAGS, PREPARE_SCENARIO, PREPARE_CI_PR, PREPARE_CI, _PREPARE_CI_MODE_*, _PREPARE_ARGS, and all their conditionals. Dropped the dotnet run --project xaprepare.csproj line from prepare. Deleted the prepare-help target
build-tools/scripts/BuildEverything.mkjenkins no longer branches on PREPARE_CI_PR/PREPARE_CI; just $(MAKE) prepare && $(MAKE) leeroy
.github/workflows/copilot-setup-steps.ymldropped now-unused PREPARE_CI=1
build-tools/automation/azure-pipelines-apidocs.yamldropped PREPARE_CI=1
build-tools/automation/yaml-templates/build-linux-steps.yamldropped PREPARE_CI=1
build-tools/automation/yaml-templates/build-macos-steps.yamldropped PREPARE_CI=1
build-tools/automation/yaml-templates/commercial-build.yamldropped PREPARE_CI=1
build-tools/automation/yaml-templates/copy-extra-result-files.yamldropped **/Configuration.OperatingSystem.props glob and the stale Step_CopyExtraResultFilesForCI xaprepare-step comment
build-tools/automation/yaml-templates/generate-cgmanifest.yamldropped the stale Step_GenerateCGManifest xaprepare-step comment
build-tools/automation/yaml-templates/setup-jdk-variables.yamlrenamed $xaPrepareJdkPath$xaJdkPath for hygiene
Documentation/workflow/HowToAddNewApiLevel.mdrewrote the "Add New Platform" section to point at <_PlatformPackage> entries in src/androidsdk/androidsdk.targets instead of AndroidToolchain.cs; updated the --android-sdk-platforms=all recipe to dotnet-local build src/androidsdk/androidsdk.csproj -p:AndroidSdkPlatforms=all
Documentation/building/unix/dependencies.mdJDK-version link now points at $(MicrosoftOpenJDKVersion) in /Configuration.props instead of the deleted Configurables.cs
Documentation/building/configuration.mdremoved the $(MakeConcurrency) bullet

Historical breadcrumb comments left as-is (still accurate and useful for git-archaeology):

  • .github/skills/update-tpn/SKILL.md
  • src/AndroidBuildConfig/AndroidBuildConfig.csproj
  • src/androidsdk/androidsdk.targets
  • src/native/cmake-config/cmake-config.csproj
  • src/workloads/workloads.csproj

Verification

  • build.cmd Prepare — succeeded end-to-end on Windows (0 warnings, 0 errors). The trimmed Prepare target ran through _InstallDotNet, the space-in-path guard, Xamarin.Android.BootstrapTasks.sln, src/workloads/workloads.csproj, and PrepareJavaInterop.
  • dotnet build src\Xamarin.Android.Build.Tasks\Xamarin.Android.Build.Tasks.csproj -c Debug — 0 errors (93 pre-existing warnings from src/Mono.Android/ and generated MCW, unrelated to this change).
  • Repo-wide grep for HostOsName, HostOsFlavor, HostOsRelease, HostCpuCount, NdkLlvmTag, and the MSBuild MakeConcurrency property — clean.
  • Repo-wide grep for xaprepare — clean apart from the five intentional historical breadcrumb comments listed above.

Diff stat

102 files changed, 25 insertions(+), 7891 deletions(-).

Precedent chain

Continues the multi-slice teardown started by #11568, #11580, #11608, #11613, #11631, #11731, #11732, #11733, #11737, #11740, #11760, #11803, #11821, #11825, #11826, #11945, #11946, #11956.

Co-authored-by: Copilot App 223556219+Copilot@users.noreply.github.com

…xaprepare project
Follow-up to #11956 (which moved the JDK half of
`Configuration.OperatingSystem.props` to Java.Interop's `JdkInfo.props`).
The remaining NDK/OS-info half has zero real consumers, so this change
removes the last generator, cascades through the two Scenarios that only
existed to run it, and deletes the whole `build-tools/xaprepare/` project.
Every integration point (Makefile, PrepareWindows.targets, CI YAML, docs)
is updated in the same commit so `build.cmd -t:Prepare` and `make prepare`
still work end-to-end.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
CopilotAI review requested due to automatic review settings July 2, 2026 16:08

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR completes the xaprepare teardown by deleting the remaining Configuration.OperatingSystem.props generator (and its now-dead scenario/OS/tooling scaffolding), removing the entire build-tools/xaprepare/ project, and updating build/CI/docs so make prepare / build.cmd -t:Prepare continue to work without xaprepare.

Changes:

  • Remove generation + import of Configuration.OperatingSystem.props, and drop the unused MakeConcurrency MSBuild property.
  • Delete the build-tools/xaprepare/ project tree and the supporting scenario/OS/tool-runner/config code that only existed for xaprepare.
  • Update Makefile/Windows Prepare target/CI YAML templates and docs to remove xaprepare integration points and point at src/androidsdk/androidsdk.targets/androidsdk.csproj for platform provisioning.

Reviewed changes

Copilot reviewed 101 out of 102 changed files in this pull request and generated 1 comment.

Show a summary per file
FileDescription
MakefileRemoves xaprepare invocation/flags from prepare and deletes prepare-help.
Documentation/workflow/HowToAddNewApiLevel.mdUpdates “add platform” guidance to edit src/androidsdk/androidsdk.targets and uses src/androidsdk/androidsdk.csproj to install platforms.
Documentation/building/unix/dependencies.mdRepoints “current JDK version” reference to $(MicrosoftOpenJDKVersion) in Configuration.props.
Documentation/building/configuration.mdRemoves the $(MakeConcurrency) documentation entry.
Configuration.propsDrops OS-props import and the MakeConcurrency definition; retains only JdkInfo import + related comments.
build-tools/xaprepare/xaprepare/xaprepare.targetsDeleted (xaprepare build-time file generation targets removed).
build-tools/xaprepare/xaprepare/xaprepare.csprojDeleted (xaprepare app project removed).
build-tools/xaprepare/xaprepare/ToolRunners/ToolRunner.OutputSink.csDeleted (xaprepare tool-runner logging sink removed).
build-tools/xaprepare/xaprepare/ToolRunners/ToolRunner.csDeleted (xaprepare tool-runner base removed).
build-tools/xaprepare/xaprepare/ToolRunners/TarRunner.OutputSink.csDeleted (xaprepare tar runner removed).
build-tools/xaprepare/xaprepare/ToolRunners/TarRunner.csDeleted (xaprepare tar runner removed).
build-tools/xaprepare/xaprepare/ToolRunners/SevenZipRunner.OutputSink.csDeleted (xaprepare 7zip runner removed).
build-tools/xaprepare/xaprepare/ToolRunners/SevenZipRunner.csDeleted (xaprepare 7zip runner removed).
build-tools/xaprepare/xaprepare/ToolRunners/GitRunner.OutputSink.csDeleted (xaprepare git runner removed).
build-tools/xaprepare/xaprepare/ToolRunners/GitRunner.csDeleted (xaprepare git runner removed).
build-tools/xaprepare/xaprepare/Steps/Step_GenerateFiles.csDeleted (last generator for Configuration.OperatingSystem.props removed).
build-tools/xaprepare/xaprepare/Scenarios/Scenario_Standard.csDeleted (scenario now empty post-generator removal).
build-tools/xaprepare/xaprepare/Scenarios/Scenario_Required.csDeleted (scenario now empty post-generator removal).
build-tools/xaprepare/xaprepare/Resources/Configuration.OperatingSystem.props.inDeleted (last template removed).
build-tools/xaprepare/xaprepare/OperatingSystems/Windows.csDeleted (xaprepare OS model removed).
build-tools/xaprepare/xaprepare/OperatingSystems/Unix.csDeleted (xaprepare OS model removed).
build-tools/xaprepare/xaprepare/OperatingSystems/NoOS.csDeleted (xaprepare OS model removed).
build-tools/xaprepare/xaprepare/OperatingSystems/MacOS.csDeleted (xaprepare OS model removed).
build-tools/xaprepare/xaprepare/OperatingSystems/Linux.UbuntuCommon.csDeleted (xaprepare OS model removed).
build-tools/xaprepare/xaprepare/OperatingSystems/Linux.csDeleted (xaprepare OS model removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Dependencies/Windows.csDeleted (xaprepare dependency stubs removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Dependencies/MacOS.csDeleted (xaprepare dependency stubs removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Dependencies/Linux.UbuntuCommon.csDeleted (xaprepare dependency stubs removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Dependencies/Linux.Ubuntu.csDeleted (xaprepare dependency stubs removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Dependencies/Linux.Mint.csDeleted (xaprepare dependency stubs removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Dependencies/Linux.Gentoo.csDeleted (xaprepare dependency stubs removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Dependencies/Linux.Fedora.csDeleted (xaprepare dependency stubs removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Dependencies/Linux.DebianCommon.csDeleted (xaprepare dependency stubs removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Dependencies/Linux.Debian.csDeleted (xaprepare dependency stubs removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Dependencies/Linux.Arch.csDeleted (xaprepare dependency stubs removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Configurables.Windows.csDeleted (xaprepare configurables removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Configurables.Unix.csDeleted (xaprepare configurables removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Configurables.MacOS.csDeleted (xaprepare configurables removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Configurables.Linux.csDeleted (xaprepare configurables removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Configurables.csDeleted (xaprepare configurables removed).
build-tools/xaprepare/xaprepare/BuildInfo.cs.inDeleted (xaprepare generated build-info removed).
build-tools/xaprepare/xaprepare/Application/VersionFetchers.csDeleted (xaprepare version parsing infra removed).
build-tools/xaprepare/xaprepare/Application/Utilities.Windows.csDeleted (xaprepare utilities removed).
build-tools/xaprepare/xaprepare/Application/Utilities.Unix.csDeleted (xaprepare utilities removed).
build-tools/xaprepare/xaprepare/Application/ThumbTwiddler.csDeleted (xaprepare TUI/progress UI removed).
build-tools/xaprepare/xaprepare/Application/Step.csDeleted (xaprepare step infra removed).
build-tools/xaprepare/xaprepare/Application/SizeFormatter.csDeleted (xaprepare utility removed).
build-tools/xaprepare/xaprepare/Application/SimpleActionStep.csDeleted (xaprepare step infra removed).
build-tools/xaprepare/xaprepare/Application/SevenZipVersionParser.csDeleted (xaprepare version parsing removed).
build-tools/xaprepare/xaprepare/Application/ScenarioNoScenario.csDeleted (xaprepare scenario infra removed).
build-tools/xaprepare/xaprepare/Application/ScenarioAttribute.csDeleted (xaprepare scenario infra removed).
build-tools/xaprepare/xaprepare/Application/Scenario.csDeleted (xaprepare scenario infra removed).
build-tools/xaprepare/xaprepare/Application/RegexProgramVersionParser.csDeleted (xaprepare version parsing removed).
build-tools/xaprepare/xaprepare/Application/PropertiesChangedEventArgs.csDeleted (xaprepare property infra removed).
build-tools/xaprepare/xaprepare/Application/Properties.Defaults.cs.inDeleted (xaprepare generated defaults removed).
build-tools/xaprepare/xaprepare/Application/Properties.csDeleted (xaprepare property infra removed).
build-tools/xaprepare/xaprepare/Application/ProgramVersionParser.csDeleted (xaprepare version parsing removed).
build-tools/xaprepare/xaprepare/Application/Program.csDeleted (xaprepare dependency infra removed).
build-tools/xaprepare/xaprepare/Application/ProcessStandardStreamWrapper.csDeleted (xaprepare process output wrapper removed).
build-tools/xaprepare/xaprepare/Application/LoggingVerbosity.csDeleted (xaprepare logging infra removed).
build-tools/xaprepare/xaprepare/Application/Log.Windows.csDeleted (xaprepare logging infra removed).
build-tools/xaprepare/xaprepare/Application/Log.Unix.csDeleted (xaprepare logging infra removed).
build-tools/xaprepare/xaprepare/Application/KnownProperties.csDeleted (xaprepare property constants removed).
build-tools/xaprepare/xaprepare/Application/KnownConditions.csDeleted (xaprepare condition constants removed).
build-tools/xaprepare/xaprepare/Application/GeneratedPlaceholdersFile.csDeleted (xaprepare generator infra removed).
build-tools/xaprepare/xaprepare/Application/GeneratedFile.csDeleted (xaprepare generator infra removed).
build-tools/xaprepare/xaprepare/Application/Extensions.DictionaryOfProgramVersionParser.csDeleted (xaprepare helper removed).
build-tools/xaprepare/xaprepare/Application/ExecutionMode.csDeleted (xaprepare execution-mode infra removed).
build-tools/xaprepare/xaprepare/Application/EssentialTools.Unix.csDeleted (xaprepare essential tools infra removed).
build-tools/xaprepare/xaprepare/Application/EssentialTools.MacOS.csDeleted (xaprepare essential tools infra removed).
build-tools/xaprepare/xaprepare/Application/EssentialTools.Linux.csDeleted (xaprepare essential tools infra removed).
build-tools/xaprepare/xaprepare/Application/EssentialTools.csDeleted (xaprepare essential tools infra removed).
build-tools/xaprepare/xaprepare/Application/DownloadStatus.csDeleted (xaprepare download infra removed).
build-tools/xaprepare/xaprepare/Application/DetermineWindowsVersion.Windows.csDeleted (xaprepare OS detection removed).
build-tools/xaprepare/xaprepare/Application/Context.Windows.csDeleted (xaprepare context removed).
build-tools/xaprepare/xaprepare/Application/Context.MacOS.csDeleted (xaprepare context removed).
build-tools/xaprepare/xaprepare/Application/Context.Linux.csDeleted (xaprepare context removed).
build-tools/xaprepare/xaprepare/Application/CompressionFormat.csDeleted (xaprepare compression infra removed).
build-tools/xaprepare/xaprepare/Application/Characters.csDeleted (xaprepare UI chars removed).
build-tools/xaprepare/xaprepare/Application/AppObject.csDeleted (xaprepare base type removed).
build-tools/xaprepare/xaprepare/app.manifestDeleted (xaprepare Windows manifest removed).
build-tools/xaprepare/xaprepare/App.configDeleted (xaprepare legacy app config removed).
build-tools/xaprepare/xaprepare.slnDeleted (xaprepare solution removed).
build-tools/xaprepare/README.mdDeleted (xaprepare documentation removed).
build-tools/xaprepare/.gitignoreDeleted (xaprepare-specific ignore file removed).
build-tools/scripts/PrepareWindows.targetsRemoves xaprepare build/run steps; repoints Prepare to dotnet + bootstrap/workloads + Java.Interop prepare.
build-tools/scripts/BuildEverything.mkSimplifies jenkins to always make prepare && make leeroy.
build-tools/automation/yaml-templates/setup-jdk-variables.yamlRenames internal variable used to compute JAVA_HOME path ($xaPrepareJdkPath$xaJdkPath).
build-tools/automation/yaml-templates/generate-cgmanifest.yamlRemoves stale comment referencing the old xaprepare step.
build-tools/automation/yaml-templates/copy-extra-result-files.yamlRemoves collection of the now-deleted Configuration.OperatingSystem.props and tidies comment.
build-tools/automation/yaml-templates/commercial-build.yamlDrops PREPARE_CI=1 from make jenkins invocation.
build-tools/automation/yaml-templates/build-macos-steps.yamlDrops PREPARE_CI=1 from make jenkins invocation.
build-tools/automation/yaml-templates/build-linux-steps.yamlDrops PREPARE_CI=1 from make jenkins invocation.
build-tools/automation/azure-pipelines-apidocs.yamlDrops PREPARE_CI=1 from make prepare invocation.
.gitignoreRemoves Configuration.OperatingSystem.props ignore entry since it’s no longer generated.
.github/workflows/copilot-setup-steps.ymlDrops PREPARE_CI=1 from make jenkins invocation.
Comments suppressed due to low confidence (1)

Configuration.props:9

  • 💡 MaintainabilityDoNotLoadOSProperties now only guards importing JdkInfo.props (since Configuration.OperatingSystem.props was removed). Adding a short comment here would prevent future confusion about what this switch actually disables.
 <Import
Project="$(MSBuildThisFileDirectory)external\Java.Interop\bin\Build$(Configuration)\JdkInfo.props"
Condition=" Exists('$(MSBuildThisFileDirectory)external\Java.Interop\bin\Build$(Configuration)\JdkInfo.props') And '$(DoNotLoadOSProperties)' != 'True' "
/>

Comment threadDocumentation/workflow/HowToAddNewApiLevel.md Outdated
jonathanpeppersand others added 4 commits July 2, 2026 11:19
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
xaprepare previously ran `git submodule update` via
Step_PrepareExternalGitDependencies + Context.MainAsync's
SelectedScenario.NeedsGitSubmodules block. With xaprepare gone,
nothing initialized submodules for the `checkout: self` blocks
in azure-pipelines-public.yaml, so the Bootstrap solution build
failed with MSB4019 trying to import
external/xamarin-android-tools/src/Microsoft.Android.Build.BaseTasks/MSBuildReferences.projitems.
Add `submodules: recursive` to the three `checkout: self` steps
(macOS, Windows, Linux) to match azure-pipelines-nightly.yaml,
azure-pipelines-apidocs.yaml, azure-pipelines.yaml, and
stage-java-interop-tests.yaml (all already set it).
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
xaprepare's Context.WriteBuildToolsInventoryCsv() produced
bin/Build$(Configuration)/buildtoolsinventory.csv listing the
Android SDK/NDK/JDK/dotnet component versions, required by
Section 4.e.i.D of the Executive Order on Cybersecurity build
system security requirements (per PR #6833). The file is
consumed as the AndroidBuildToolsInventory pipeline artifact
by build-macos-steps.yaml, build-macos.yaml (1ES), and
commercial-build.yaml.
With xaprepare gone this file was no longer being generated,
so the macOS `upload build tools inventory` task failed with:
Path does not exist: .../bin/BuildRelease/buildtoolsinventory.csv
Add build-tools/build-tools-inventory/build-tools-inventory.proj
which reads the versions from Configuration.props, eng/Versions.props,
and the _PlatformPackage ItemGroup in androidsdk.targets (the
single sources of truth) and writes the CSV via WriteLinesToFile.
Wire it into Makefile `prepare` and PrepareWindows.targets `Prepare`
so the file is produced by `make prepare` and `build.cmd -t:Prepare`.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
xaprepare's Step_GenerateCGManifest ran on every CI `make prepare`
invocation (because `PREPARE_CI=1` implied `-a` which selected
Scenario_Standard). generate-cgmanifest.yaml was wired into
build-linux-steps, build-macos-steps, build-windows-steps, and
commercial-build, but the internal 1ES apidocs pipeline was
missed. Component Governance depends on the manifest for git
submodule registrations that its native detectors can't
enumerate.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

@simonrozsivalsimonrozsival left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@simonrozsival
simonrozsival merged commit be5272c into mainJul 3, 2026
42 checks passed
@simonrozsival
simonrozsival deleted the jonathanpeppers-xaprepare-d1-ndk-os-info branch July 3, 2026 07:06
jonathanpeppers added a commit that referenced this pull request Jul 16, 2026
## Summary
- delete the unused `Android`, `Emulator`, and legacy `JdkInfo` BootstrapTasks
- move the one surviving trace logger adapter into `CheckApiCompatibility`
- remove BootstrapTasks' `Xamarin.Android.Tools.AndroidSdk` dependency by parsing the three API metadata fields used by `GenerateSupportedPlatforms` directly
- delete the redundant `Xamarin.Android.BootstrapTasks.sln` and build BootstrapTasks directly in CI
- make `build-tools/scripts/Prepare.proj` the cross-platform source of truth for post-install Prepare orchestration
- delete `PrepareWindows.targets` by moving its Windows-only .NET installation and toolchain-path guard into `Prepare.proj`
This follows the wholesale xaprepare removal in #11959.
## BootstrapTasks cleanup
The deleted `Android` and `Emulator` wrappers had no task registration or invocation. The deleted `JdkInfo` task was superseded by `Java.Interop.BootstrapTasks.JdkInfo`; its only remaining indirect use was a generic logger callback used by `CheckApiCompatibility`.
The initial dependency audit also surfaced a narrow surviving use of `AndroidVersion` and `AndroidVersions` in `GenerateSupportedPlatforms`. That task only needed `VersionCodeFull`, target-framework version ordering, and `Stable`, so it now parses those existing item metadata values directly while preserving the prior max-stable and supported-platform ordering semantics. This removes the broader `Xamarin.Android.Tools.AndroidSdk` project reference without duplicating its model.
`Xamarin.Android.BootstrapTasks.sln` only contained BootstrapTasks and `xa-prep-tasks`, which is already a BootstrapTasks project reference. Its Makefile, Windows, and Azure Pipelines consumers now use the project/common orchestrator directly.
## Prepare orchestration
| Before | After |
| --- | --- |
| Unix Makefile listed four commands | Unix installs .NET, then invokes `Prepare.proj` once |
| `PrepareWindows.targets` installed .NET and listed the same four operations | The solution imports `Prepare.proj`, which installs .NET and checks the toolchain path on Windows |
| Java.Interop was called separately by each wrapper | `Prepare.proj` imports `DotNet.targets` and calls the existing `PrepareJavaInterop` target |
`Prepare.proj` preserves this order:
1. restore/build BootstrapTasks
2. restore/build workloads
3. run `PrepareJavaInterop` and its `PrepareOpenJDK` dependency
4. build the build-tools inventory
The Unix wrapper launches the orchestrator with system `dotnet`; imported `DotNet.targets` continues to use the repo-local `$(DotNetPreviewTool)` for Java.Interop.
On Windows, `Prepare.proj` also owns the conditional .NET installation and Android toolchain path guard previously kept in `PrepareWindows.targets`.
## Verification
- `dotnet build build-tools\Xamarin.Android.Tools.BootstrapTasks\Xamarin.Android.Tools.BootstrapTasks.csproj -c Debug`: passed, 0 warnings
- `build.cmd -t:Prepare -c Debug`: passed end to end
- expected outputs confirmed:
- `bin\BuildDebug\net10.0\Xamarin.Android.Tools.BootstrapTasks.dll`
- `external\Java.Interop\bin\BuildDebug\JdkInfo.props`
- `bin\BuildDebug\buildtoolsinventory.csv`
- system-`dotnet` invocation of `Prepare.proj`: passed, 0 warnings; binlog inspected with `binlogtool`
- `dotnet-local.cmd build src\Xamarin.Android.Build.Tasks\Xamarin.Android.Build.Tasks.csproj -c Debug`: passed with 17 pre-existing generated-code/Javac warnings
- old solution/task/orchestration references: no matches
- GNU make was unavailable on the Windows host; the equivalent system-`dotnet` command emitted by `SYSTEM_DOTNET_BINLOG` was run directly instead
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Šimon Rozsíval <simon@rozsival.com>
@github-actionsgithub-actionsBot locked and limited conversation to collaborators Aug 2, 2026
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@jonathanpeppers@simonrozsival
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

[xaprepare] Delete Configuration.OperatingSystem.props generator and xaprepare project - #11959

Merged
simonrozsival merged 5 commits into
mainfrom
jonathanpeppers-xaprepare-d1-ndk-os-info
Jul 3, 2026
Merged

[xaprepare] Delete Configuration.OperatingSystem.props generator and xaprepare project#11959
simonrozsival merged 5 commits into
mainfrom
jonathanpeppers-xaprepare-d1-ndk-os-info

Conversation

@jonathanpeppers

Copy link
Copy Markdown
Member

Follow-up to #11956, which moved the JDK half of Configuration.OperatingSystem.props to Java.Interop's JdkInfo.props. The remaining NDK / OS-info half has zero real consumers, so this PR:

  1. Deletes the last generator template (Configuration.OperatingSystem.props.in).
  2. Cascades through Step_GenerateFiles, both Scenario_* classes (which now had zero steps), and every supporting OperatingSystems/, Context.*OS.cs, EssentialTools.*, ToolRunners/*, Configurables.*, Application/*, and Main.cs file that only existed to feed the scenarios.
  3. Deletes the whole build-tools/xaprepare/ project.
  4. Patches every integration point (Makefile, PrepareWindows.targets, BuildEverything.mk, CI YAML, docs) so build.cmd -t:Prepare and make prepare still work end-to-end.

Configuration.OperatingSystem.props.in placeholder audit

PlaceholderConsumers outside the .in fileAction
HostOsNamenonedrop
HostOsFlavornonedrop
HostOsReleasenonedrop
HostBitsnone (ArchiveBase.HostBits in src/Xamarin.Installer.AndroidSDK/ is an unrelated C# property)drop
NdkLlvmTagnone (the NDK toolchain OS tag is resolved elsewhere via _NdkToolchainOSTag in androidsdk.targets)drop
HostCpuCountonly Configuration.props:72 via $(MakeConcurrency)drop

$(MakeConcurrency) audit

The only definition was Configuration.props:72. A repo-wide grep of .targets, .props, .projitems, Makefile, and .mk files found zero consumers of the MSBuild property. The MakeConcurrency hits under build-tools/xaprepare/ were an unrelated C# Context.MakeConcurrency property.

Result: dropped the MakeConcurrency MSBuild property entirely (no $([System.Environment]::ProcessorCount) replacement needed) and removed the $(MakeConcurrency) bullet in Documentation/building/configuration.md.

xaprepare integration audit (grep-confirmed, patched here)

LocationChange
build-tools/xaprepare/ (entire tree)deleted — 86 tracked files
Configuration.propsdropped <Import> of the generated OS props, dropped MakeConcurrency, tidied the "between xaprepare and package creation tools" comment
.gitignoredropped Configuration.OperatingSystem.props
build-tools/scripts/PrepareWindows.targetsremoved _XAPrepareExe, _XAPrepareStandardArgs, _BuildXAPrepare target, and the Exec dotnet $(_XAPrepareExe) line. Repointed Prepare at _InstallDotNet. Kept the space-in-path guard, BootstrapTasks / workloads MSBuilds, and PrepareJavaInterop
Makefiledropped PREPARE_PROJECT, PREPARE_NET_FX, PREPARE_ARGS, PREPARE_MSBUILD_FLAGS, PREPARE_SCENARIO, PREPARE_CI_PR, PREPARE_CI, _PREPARE_CI_MODE_*, _PREPARE_ARGS, and all their conditionals. Dropped the dotnet run --project xaprepare.csproj line from prepare. Deleted the prepare-help target
build-tools/scripts/BuildEverything.mkjenkins no longer branches on PREPARE_CI_PR/PREPARE_CI; just $(MAKE) prepare && $(MAKE) leeroy
.github/workflows/copilot-setup-steps.ymldropped now-unused PREPARE_CI=1
build-tools/automation/azure-pipelines-apidocs.yamldropped PREPARE_CI=1
build-tools/automation/yaml-templates/build-linux-steps.yamldropped PREPARE_CI=1
build-tools/automation/yaml-templates/build-macos-steps.yamldropped PREPARE_CI=1
build-tools/automation/yaml-templates/commercial-build.yamldropped PREPARE_CI=1
build-tools/automation/yaml-templates/copy-extra-result-files.yamldropped **/Configuration.OperatingSystem.props glob and the stale Step_CopyExtraResultFilesForCI xaprepare-step comment
build-tools/automation/yaml-templates/generate-cgmanifest.yamldropped the stale Step_GenerateCGManifest xaprepare-step comment
build-tools/automation/yaml-templates/setup-jdk-variables.yamlrenamed $xaPrepareJdkPath$xaJdkPath for hygiene
Documentation/workflow/HowToAddNewApiLevel.mdrewrote the "Add New Platform" section to point at <_PlatformPackage> entries in src/androidsdk/androidsdk.targets instead of AndroidToolchain.cs; updated the --android-sdk-platforms=all recipe to dotnet-local build src/androidsdk/androidsdk.csproj -p:AndroidSdkPlatforms=all
Documentation/building/unix/dependencies.mdJDK-version link now points at $(MicrosoftOpenJDKVersion) in /Configuration.props instead of the deleted Configurables.cs
Documentation/building/configuration.mdremoved the $(MakeConcurrency) bullet

Historical breadcrumb comments left as-is (still accurate and useful for git-archaeology):

  • .github/skills/update-tpn/SKILL.md
  • src/AndroidBuildConfig/AndroidBuildConfig.csproj
  • src/androidsdk/androidsdk.targets
  • src/native/cmake-config/cmake-config.csproj
  • src/workloads/workloads.csproj

Verification

  • build.cmd Prepare — succeeded end-to-end on Windows (0 warnings, 0 errors). The trimmed Prepare target ran through _InstallDotNet, the space-in-path guard, Xamarin.Android.BootstrapTasks.sln, src/workloads/workloads.csproj, and PrepareJavaInterop.
  • dotnet build src\Xamarin.Android.Build.Tasks\Xamarin.Android.Build.Tasks.csproj -c Debug — 0 errors (93 pre-existing warnings from src/Mono.Android/ and generated MCW, unrelated to this change).
  • Repo-wide grep for HostOsName, HostOsFlavor, HostOsRelease, HostCpuCount, NdkLlvmTag, and the MSBuild MakeConcurrency property — clean.
  • Repo-wide grep for xaprepare — clean apart from the five intentional historical breadcrumb comments listed above.

Diff stat

102 files changed, 25 insertions(+), 7891 deletions(-).

Precedent chain

Continues the multi-slice teardown started by #11568, #11580, #11608, #11613, #11631, #11731, #11732, #11733, #11737, #11740, #11760, #11803, #11821, #11825, #11826, #11945, #11946, #11956.

Co-authored-by: Copilot App 223556219+Copilot@users.noreply.github.com

…xaprepare project
Follow-up to #11956 (which moved the JDK half of
`Configuration.OperatingSystem.props` to Java.Interop's `JdkInfo.props`).
The remaining NDK/OS-info half has zero real consumers, so this change
removes the last generator, cascades through the two Scenarios that only
existed to run it, and deletes the whole `build-tools/xaprepare/` project.
Every integration point (Makefile, PrepareWindows.targets, CI YAML, docs)
is updated in the same commit so `build.cmd -t:Prepare` and `make prepare`
still work end-to-end.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
CopilotAI review requested due to automatic review settings July 2, 2026 16:08

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR completes the xaprepare teardown by deleting the remaining Configuration.OperatingSystem.props generator (and its now-dead scenario/OS/tooling scaffolding), removing the entire build-tools/xaprepare/ project, and updating build/CI/docs so make prepare / build.cmd -t:Prepare continue to work without xaprepare.

Changes:

  • Remove generation + import of Configuration.OperatingSystem.props, and drop the unused MakeConcurrency MSBuild property.
  • Delete the build-tools/xaprepare/ project tree and the supporting scenario/OS/tool-runner/config code that only existed for xaprepare.
  • Update Makefile/Windows Prepare target/CI YAML templates and docs to remove xaprepare integration points and point at src/androidsdk/androidsdk.targets/androidsdk.csproj for platform provisioning.

Reviewed changes

Copilot reviewed 101 out of 102 changed files in this pull request and generated 1 comment.

Show a summary per file
FileDescription
MakefileRemoves xaprepare invocation/flags from prepare and deletes prepare-help.
Documentation/workflow/HowToAddNewApiLevel.mdUpdates “add platform” guidance to edit src/androidsdk/androidsdk.targets and uses src/androidsdk/androidsdk.csproj to install platforms.
Documentation/building/unix/dependencies.mdRepoints “current JDK version” reference to $(MicrosoftOpenJDKVersion) in Configuration.props.
Documentation/building/configuration.mdRemoves the $(MakeConcurrency) documentation entry.
Configuration.propsDrops OS-props import and the MakeConcurrency definition; retains only JdkInfo import + related comments.
build-tools/xaprepare/xaprepare/xaprepare.targetsDeleted (xaprepare build-time file generation targets removed).
build-tools/xaprepare/xaprepare/xaprepare.csprojDeleted (xaprepare app project removed).
build-tools/xaprepare/xaprepare/ToolRunners/ToolRunner.OutputSink.csDeleted (xaprepare tool-runner logging sink removed).
build-tools/xaprepare/xaprepare/ToolRunners/ToolRunner.csDeleted (xaprepare tool-runner base removed).
build-tools/xaprepare/xaprepare/ToolRunners/TarRunner.OutputSink.csDeleted (xaprepare tar runner removed).
build-tools/xaprepare/xaprepare/ToolRunners/TarRunner.csDeleted (xaprepare tar runner removed).
build-tools/xaprepare/xaprepare/ToolRunners/SevenZipRunner.OutputSink.csDeleted (xaprepare 7zip runner removed).
build-tools/xaprepare/xaprepare/ToolRunners/SevenZipRunner.csDeleted (xaprepare 7zip runner removed).
build-tools/xaprepare/xaprepare/ToolRunners/GitRunner.OutputSink.csDeleted (xaprepare git runner removed).
build-tools/xaprepare/xaprepare/ToolRunners/GitRunner.csDeleted (xaprepare git runner removed).
build-tools/xaprepare/xaprepare/Steps/Step_GenerateFiles.csDeleted (last generator for Configuration.OperatingSystem.props removed).
build-tools/xaprepare/xaprepare/Scenarios/Scenario_Standard.csDeleted (scenario now empty post-generator removal).
build-tools/xaprepare/xaprepare/Scenarios/Scenario_Required.csDeleted (scenario now empty post-generator removal).
build-tools/xaprepare/xaprepare/Resources/Configuration.OperatingSystem.props.inDeleted (last template removed).
build-tools/xaprepare/xaprepare/OperatingSystems/Windows.csDeleted (xaprepare OS model removed).
build-tools/xaprepare/xaprepare/OperatingSystems/Unix.csDeleted (xaprepare OS model removed).
build-tools/xaprepare/xaprepare/OperatingSystems/NoOS.csDeleted (xaprepare OS model removed).
build-tools/xaprepare/xaprepare/OperatingSystems/MacOS.csDeleted (xaprepare OS model removed).
build-tools/xaprepare/xaprepare/OperatingSystems/Linux.UbuntuCommon.csDeleted (xaprepare OS model removed).
build-tools/xaprepare/xaprepare/OperatingSystems/Linux.csDeleted (xaprepare OS model removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Dependencies/Windows.csDeleted (xaprepare dependency stubs removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Dependencies/MacOS.csDeleted (xaprepare dependency stubs removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Dependencies/Linux.UbuntuCommon.csDeleted (xaprepare dependency stubs removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Dependencies/Linux.Ubuntu.csDeleted (xaprepare dependency stubs removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Dependencies/Linux.Mint.csDeleted (xaprepare dependency stubs removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Dependencies/Linux.Gentoo.csDeleted (xaprepare dependency stubs removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Dependencies/Linux.Fedora.csDeleted (xaprepare dependency stubs removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Dependencies/Linux.DebianCommon.csDeleted (xaprepare dependency stubs removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Dependencies/Linux.Debian.csDeleted (xaprepare dependency stubs removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Dependencies/Linux.Arch.csDeleted (xaprepare dependency stubs removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Configurables.Windows.csDeleted (xaprepare configurables removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Configurables.Unix.csDeleted (xaprepare configurables removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Configurables.MacOS.csDeleted (xaprepare configurables removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Configurables.Linux.csDeleted (xaprepare configurables removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Configurables.csDeleted (xaprepare configurables removed).
build-tools/xaprepare/xaprepare/BuildInfo.cs.inDeleted (xaprepare generated build-info removed).
build-tools/xaprepare/xaprepare/Application/VersionFetchers.csDeleted (xaprepare version parsing infra removed).
build-tools/xaprepare/xaprepare/Application/Utilities.Windows.csDeleted (xaprepare utilities removed).
build-tools/xaprepare/xaprepare/Application/Utilities.Unix.csDeleted (xaprepare utilities removed).
build-tools/xaprepare/xaprepare/Application/ThumbTwiddler.csDeleted (xaprepare TUI/progress UI removed).
build-tools/xaprepare/xaprepare/Application/Step.csDeleted (xaprepare step infra removed).
build-tools/xaprepare/xaprepare/Application/SizeFormatter.csDeleted (xaprepare utility removed).
build-tools/xaprepare/xaprepare/Application/SimpleActionStep.csDeleted (xaprepare step infra removed).
build-tools/xaprepare/xaprepare/Application/SevenZipVersionParser.csDeleted (xaprepare version parsing removed).
build-tools/xaprepare/xaprepare/Application/ScenarioNoScenario.csDeleted (xaprepare scenario infra removed).
build-tools/xaprepare/xaprepare/Application/ScenarioAttribute.csDeleted (xaprepare scenario infra removed).
build-tools/xaprepare/xaprepare/Application/Scenario.csDeleted (xaprepare scenario infra removed).
build-tools/xaprepare/xaprepare/Application/RegexProgramVersionParser.csDeleted (xaprepare version parsing removed).
build-tools/xaprepare/xaprepare/Application/PropertiesChangedEventArgs.csDeleted (xaprepare property infra removed).
build-tools/xaprepare/xaprepare/Application/Properties.Defaults.cs.inDeleted (xaprepare generated defaults removed).
build-tools/xaprepare/xaprepare/Application/Properties.csDeleted (xaprepare property infra removed).
build-tools/xaprepare/xaprepare/Application/ProgramVersionParser.csDeleted (xaprepare version parsing removed).
build-tools/xaprepare/xaprepare/Application/Program.csDeleted (xaprepare dependency infra removed).
build-tools/xaprepare/xaprepare/Application/ProcessStandardStreamWrapper.csDeleted (xaprepare process output wrapper removed).
build-tools/xaprepare/xaprepare/Application/LoggingVerbosity.csDeleted (xaprepare logging infra removed).
build-tools/xaprepare/xaprepare/Application/Log.Windows.csDeleted (xaprepare logging infra removed).
build-tools/xaprepare/xaprepare/Application/Log.Unix.csDeleted (xaprepare logging infra removed).
build-tools/xaprepare/xaprepare/Application/KnownProperties.csDeleted (xaprepare property constants removed).
build-tools/xaprepare/xaprepare/Application/KnownConditions.csDeleted (xaprepare condition constants removed).
build-tools/xaprepare/xaprepare/Application/GeneratedPlaceholdersFile.csDeleted (xaprepare generator infra removed).
build-tools/xaprepare/xaprepare/Application/GeneratedFile.csDeleted (xaprepare generator infra removed).
build-tools/xaprepare/xaprepare/Application/Extensions.DictionaryOfProgramVersionParser.csDeleted (xaprepare helper removed).
build-tools/xaprepare/xaprepare/Application/ExecutionMode.csDeleted (xaprepare execution-mode infra removed).
build-tools/xaprepare/xaprepare/Application/EssentialTools.Unix.csDeleted (xaprepare essential tools infra removed).
build-tools/xaprepare/xaprepare/Application/EssentialTools.MacOS.csDeleted (xaprepare essential tools infra removed).
build-tools/xaprepare/xaprepare/Application/EssentialTools.Linux.csDeleted (xaprepare essential tools infra removed).
build-tools/xaprepare/xaprepare/Application/EssentialTools.csDeleted (xaprepare essential tools infra removed).
build-tools/xaprepare/xaprepare/Application/DownloadStatus.csDeleted (xaprepare download infra removed).
build-tools/xaprepare/xaprepare/Application/DetermineWindowsVersion.Windows.csDeleted (xaprepare OS detection removed).
build-tools/xaprepare/xaprepare/Application/Context.Windows.csDeleted (xaprepare context removed).
build-tools/xaprepare/xaprepare/Application/Context.MacOS.csDeleted (xaprepare context removed).
build-tools/xaprepare/xaprepare/Application/Context.Linux.csDeleted (xaprepare context removed).
build-tools/xaprepare/xaprepare/Application/CompressionFormat.csDeleted (xaprepare compression infra removed).
build-tools/xaprepare/xaprepare/Application/Characters.csDeleted (xaprepare UI chars removed).
build-tools/xaprepare/xaprepare/Application/AppObject.csDeleted (xaprepare base type removed).
build-tools/xaprepare/xaprepare/app.manifestDeleted (xaprepare Windows manifest removed).
build-tools/xaprepare/xaprepare/App.configDeleted (xaprepare legacy app config removed).
build-tools/xaprepare/xaprepare.slnDeleted (xaprepare solution removed).
build-tools/xaprepare/README.mdDeleted (xaprepare documentation removed).
build-tools/xaprepare/.gitignoreDeleted (xaprepare-specific ignore file removed).
build-tools/scripts/PrepareWindows.targetsRemoves xaprepare build/run steps; repoints Prepare to dotnet + bootstrap/workloads + Java.Interop prepare.
build-tools/scripts/BuildEverything.mkSimplifies jenkins to always make prepare && make leeroy.
build-tools/automation/yaml-templates/setup-jdk-variables.yamlRenames internal variable used to compute JAVA_HOME path ($xaPrepareJdkPath$xaJdkPath).
build-tools/automation/yaml-templates/generate-cgmanifest.yamlRemoves stale comment referencing the old xaprepare step.
build-tools/automation/yaml-templates/copy-extra-result-files.yamlRemoves collection of the now-deleted Configuration.OperatingSystem.props and tidies comment.
build-tools/automation/yaml-templates/commercial-build.yamlDrops PREPARE_CI=1 from make jenkins invocation.
build-tools/automation/yaml-templates/build-macos-steps.yamlDrops PREPARE_CI=1 from make jenkins invocation.
build-tools/automation/yaml-templates/build-linux-steps.yamlDrops PREPARE_CI=1 from make jenkins invocation.
build-tools/automation/azure-pipelines-apidocs.yamlDrops PREPARE_CI=1 from make prepare invocation.
.gitignoreRemoves Configuration.OperatingSystem.props ignore entry since it’s no longer generated.
.github/workflows/copilot-setup-steps.ymlDrops PREPARE_CI=1 from make jenkins invocation.
Comments suppressed due to low confidence (1)

Configuration.props:9

  • 💡 MaintainabilityDoNotLoadOSProperties now only guards importing JdkInfo.props (since Configuration.OperatingSystem.props was removed). Adding a short comment here would prevent future confusion about what this switch actually disables.
 <Import
Project="$(MSBuildThisFileDirectory)external\Java.Interop\bin\Build$(Configuration)\JdkInfo.props"
Condition=" Exists('$(MSBuildThisFileDirectory)external\Java.Interop\bin\Build$(Configuration)\JdkInfo.props') And '$(DoNotLoadOSProperties)' != 'True' "
/>

Comment threadDocumentation/workflow/HowToAddNewApiLevel.md Outdated
jonathanpeppersand others added 4 commits July 2, 2026 11:19
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
xaprepare previously ran `git submodule update` via
Step_PrepareExternalGitDependencies + Context.MainAsync's
SelectedScenario.NeedsGitSubmodules block. With xaprepare gone,
nothing initialized submodules for the `checkout: self` blocks
in azure-pipelines-public.yaml, so the Bootstrap solution build
failed with MSB4019 trying to import
external/xamarin-android-tools/src/Microsoft.Android.Build.BaseTasks/MSBuildReferences.projitems.
Add `submodules: recursive` to the three `checkout: self` steps
(macOS, Windows, Linux) to match azure-pipelines-nightly.yaml,
azure-pipelines-apidocs.yaml, azure-pipelines.yaml, and
stage-java-interop-tests.yaml (all already set it).
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
xaprepare's Context.WriteBuildToolsInventoryCsv() produced
bin/Build$(Configuration)/buildtoolsinventory.csv listing the
Android SDK/NDK/JDK/dotnet component versions, required by
Section 4.e.i.D of the Executive Order on Cybersecurity build
system security requirements (per PR #6833). The file is
consumed as the AndroidBuildToolsInventory pipeline artifact
by build-macos-steps.yaml, build-macos.yaml (1ES), and
commercial-build.yaml.
With xaprepare gone this file was no longer being generated,
so the macOS `upload build tools inventory` task failed with:
Path does not exist: .../bin/BuildRelease/buildtoolsinventory.csv
Add build-tools/build-tools-inventory/build-tools-inventory.proj
which reads the versions from Configuration.props, eng/Versions.props,
and the _PlatformPackage ItemGroup in androidsdk.targets (the
single sources of truth) and writes the CSV via WriteLinesToFile.
Wire it into Makefile `prepare` and PrepareWindows.targets `Prepare`
so the file is produced by `make prepare` and `build.cmd -t:Prepare`.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
xaprepare's Step_GenerateCGManifest ran on every CI `make prepare`
invocation (because `PREPARE_CI=1` implied `-a` which selected
Scenario_Standard). generate-cgmanifest.yaml was wired into
build-linux-steps, build-macos-steps, build-windows-steps, and
commercial-build, but the internal 1ES apidocs pipeline was
missed. Component Governance depends on the manifest for git
submodule registrations that its native detectors can't
enumerate.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

@simonrozsivalsimonrozsival left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@simonrozsival
simonrozsival merged commit be5272c into mainJul 3, 2026
42 checks passed
@simonrozsival
simonrozsival deleted the jonathanpeppers-xaprepare-d1-ndk-os-info branch July 3, 2026 07:06
jonathanpeppers added a commit that referenced this pull request Jul 16, 2026
## Summary
- delete the unused `Android`, `Emulator`, and legacy `JdkInfo` BootstrapTasks
- move the one surviving trace logger adapter into `CheckApiCompatibility`
- remove BootstrapTasks' `Xamarin.Android.Tools.AndroidSdk` dependency by parsing the three API metadata fields used by `GenerateSupportedPlatforms` directly
- delete the redundant `Xamarin.Android.BootstrapTasks.sln` and build BootstrapTasks directly in CI
- make `build-tools/scripts/Prepare.proj` the cross-platform source of truth for post-install Prepare orchestration
- delete `PrepareWindows.targets` by moving its Windows-only .NET installation and toolchain-path guard into `Prepare.proj`
This follows the wholesale xaprepare removal in #11959.
## BootstrapTasks cleanup
The deleted `Android` and `Emulator` wrappers had no task registration or invocation. The deleted `JdkInfo` task was superseded by `Java.Interop.BootstrapTasks.JdkInfo`; its only remaining indirect use was a generic logger callback used by `CheckApiCompatibility`.
The initial dependency audit also surfaced a narrow surviving use of `AndroidVersion` and `AndroidVersions` in `GenerateSupportedPlatforms`. That task only needed `VersionCodeFull`, target-framework version ordering, and `Stable`, so it now parses those existing item metadata values directly while preserving the prior max-stable and supported-platform ordering semantics. This removes the broader `Xamarin.Android.Tools.AndroidSdk` project reference without duplicating its model.
`Xamarin.Android.BootstrapTasks.sln` only contained BootstrapTasks and `xa-prep-tasks`, which is already a BootstrapTasks project reference. Its Makefile, Windows, and Azure Pipelines consumers now use the project/common orchestrator directly.
## Prepare orchestration
| Before | After |
| --- | --- |
| Unix Makefile listed four commands | Unix installs .NET, then invokes `Prepare.proj` once |
| `PrepareWindows.targets` installed .NET and listed the same four operations | The solution imports `Prepare.proj`, which installs .NET and checks the toolchain path on Windows |
| Java.Interop was called separately by each wrapper | `Prepare.proj` imports `DotNet.targets` and calls the existing `PrepareJavaInterop` target |
`Prepare.proj` preserves this order:
1. restore/build BootstrapTasks
2. restore/build workloads
3. run `PrepareJavaInterop` and its `PrepareOpenJDK` dependency
4. build the build-tools inventory
The Unix wrapper launches the orchestrator with system `dotnet`; imported `DotNet.targets` continues to use the repo-local `$(DotNetPreviewTool)` for Java.Interop.
On Windows, `Prepare.proj` also owns the conditional .NET installation and Android toolchain path guard previously kept in `PrepareWindows.targets`.
## Verification
- `dotnet build build-tools\Xamarin.Android.Tools.BootstrapTasks\Xamarin.Android.Tools.BootstrapTasks.csproj -c Debug`: passed, 0 warnings
- `build.cmd -t:Prepare -c Debug`: passed end to end
- expected outputs confirmed:
- `bin\BuildDebug\net10.0\Xamarin.Android.Tools.BootstrapTasks.dll`
- `external\Java.Interop\bin\BuildDebug\JdkInfo.props`
- `bin\BuildDebug\buildtoolsinventory.csv`
- system-`dotnet` invocation of `Prepare.proj`: passed, 0 warnings; binlog inspected with `binlogtool`
- `dotnet-local.cmd build src\Xamarin.Android.Build.Tasks\Xamarin.Android.Build.Tasks.csproj -c Debug`: passed with 17 pre-existing generated-code/Javac warnings
- old solution/task/orchestration references: no matches
- GNU make was unavailable on the Windows host; the equivalent system-`dotnet` command emitted by `SYSTEM_DOTNET_BINLOG` was run directly instead
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Šimon Rozsíval <simon@rozsival.com>
@github-actionsgithub-actionsBot locked and limited conversation to collaborators Aug 2, 2026
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@jonathanpeppers@simonrozsival
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
Skip to content

[xaprepare] Delete Configuration.OperatingSystem.props generator and xaprepare project - #11959

Merged
simonrozsival merged 5 commits into
mainfrom
jonathanpeppers-xaprepare-d1-ndk-os-info
Jul 3, 2026
Merged

[xaprepare] Delete Configuration.OperatingSystem.props generator and xaprepare project#11959
simonrozsival merged 5 commits into
mainfrom
jonathanpeppers-xaprepare-d1-ndk-os-info

Conversation

@jonathanpeppers

Copy link
Copy Markdown
Member

Follow-up to #11956, which moved the JDK half of Configuration.OperatingSystem.props to Java.Interop's JdkInfo.props. The remaining NDK / OS-info half has zero real consumers, so this PR:

  1. Deletes the last generator template (Configuration.OperatingSystem.props.in).
  2. Cascades through Step_GenerateFiles, both Scenario_* classes (which now had zero steps), and every supporting OperatingSystems/, Context.*OS.cs, EssentialTools.*, ToolRunners/*, Configurables.*, Application/*, and Main.cs file that only existed to feed the scenarios.
  3. Deletes the whole build-tools/xaprepare/ project.
  4. Patches every integration point (Makefile, PrepareWindows.targets, BuildEverything.mk, CI YAML, docs) so build.cmd -t:Prepare and make prepare still work end-to-end.

Configuration.OperatingSystem.props.in placeholder audit

PlaceholderConsumers outside the .in fileAction
HostOsNamenonedrop
HostOsFlavornonedrop
HostOsReleasenonedrop
HostBitsnone (ArchiveBase.HostBits in src/Xamarin.Installer.AndroidSDK/ is an unrelated C# property)drop
NdkLlvmTagnone (the NDK toolchain OS tag is resolved elsewhere via _NdkToolchainOSTag in androidsdk.targets)drop
HostCpuCountonly Configuration.props:72 via $(MakeConcurrency)drop

$(MakeConcurrency) audit

The only definition was Configuration.props:72. A repo-wide grep of .targets, .props, .projitems, Makefile, and .mk files found zero consumers of the MSBuild property. The MakeConcurrency hits under build-tools/xaprepare/ were an unrelated C# Context.MakeConcurrency property.

Result: dropped the MakeConcurrency MSBuild property entirely (no $([System.Environment]::ProcessorCount) replacement needed) and removed the $(MakeConcurrency) bullet in Documentation/building/configuration.md.

xaprepare integration audit (grep-confirmed, patched here)

LocationChange
build-tools/xaprepare/ (entire tree)deleted — 86 tracked files
Configuration.propsdropped <Import> of the generated OS props, dropped MakeConcurrency, tidied the "between xaprepare and package creation tools" comment
.gitignoredropped Configuration.OperatingSystem.props
build-tools/scripts/PrepareWindows.targetsremoved _XAPrepareExe, _XAPrepareStandardArgs, _BuildXAPrepare target, and the Exec dotnet $(_XAPrepareExe) line. Repointed Prepare at _InstallDotNet. Kept the space-in-path guard, BootstrapTasks / workloads MSBuilds, and PrepareJavaInterop
Makefiledropped PREPARE_PROJECT, PREPARE_NET_FX, PREPARE_ARGS, PREPARE_MSBUILD_FLAGS, PREPARE_SCENARIO, PREPARE_CI_PR, PREPARE_CI, _PREPARE_CI_MODE_*, _PREPARE_ARGS, and all their conditionals. Dropped the dotnet run --project xaprepare.csproj line from prepare. Deleted the prepare-help target
build-tools/scripts/BuildEverything.mkjenkins no longer branches on PREPARE_CI_PR/PREPARE_CI; just $(MAKE) prepare && $(MAKE) leeroy
.github/workflows/copilot-setup-steps.ymldropped now-unused PREPARE_CI=1
build-tools/automation/azure-pipelines-apidocs.yamldropped PREPARE_CI=1
build-tools/automation/yaml-templates/build-linux-steps.yamldropped PREPARE_CI=1
build-tools/automation/yaml-templates/build-macos-steps.yamldropped PREPARE_CI=1
build-tools/automation/yaml-templates/commercial-build.yamldropped PREPARE_CI=1
build-tools/automation/yaml-templates/copy-extra-result-files.yamldropped **/Configuration.OperatingSystem.props glob and the stale Step_CopyExtraResultFilesForCI xaprepare-step comment
build-tools/automation/yaml-templates/generate-cgmanifest.yamldropped the stale Step_GenerateCGManifest xaprepare-step comment
build-tools/automation/yaml-templates/setup-jdk-variables.yamlrenamed $xaPrepareJdkPath$xaJdkPath for hygiene
Documentation/workflow/HowToAddNewApiLevel.mdrewrote the "Add New Platform" section to point at <_PlatformPackage> entries in src/androidsdk/androidsdk.targets instead of AndroidToolchain.cs; updated the --android-sdk-platforms=all recipe to dotnet-local build src/androidsdk/androidsdk.csproj -p:AndroidSdkPlatforms=all
Documentation/building/unix/dependencies.mdJDK-version link now points at $(MicrosoftOpenJDKVersion) in /Configuration.props instead of the deleted Configurables.cs
Documentation/building/configuration.mdremoved the $(MakeConcurrency) bullet

Historical breadcrumb comments left as-is (still accurate and useful for git-archaeology):

  • .github/skills/update-tpn/SKILL.md
  • src/AndroidBuildConfig/AndroidBuildConfig.csproj
  • src/androidsdk/androidsdk.targets
  • src/native/cmake-config/cmake-config.csproj
  • src/workloads/workloads.csproj

Verification

  • build.cmd Prepare — succeeded end-to-end on Windows (0 warnings, 0 errors). The trimmed Prepare target ran through _InstallDotNet, the space-in-path guard, Xamarin.Android.BootstrapTasks.sln, src/workloads/workloads.csproj, and PrepareJavaInterop.
  • dotnet build src\Xamarin.Android.Build.Tasks\Xamarin.Android.Build.Tasks.csproj -c Debug — 0 errors (93 pre-existing warnings from src/Mono.Android/ and generated MCW, unrelated to this change).
  • Repo-wide grep for HostOsName, HostOsFlavor, HostOsRelease, HostCpuCount, NdkLlvmTag, and the MSBuild MakeConcurrency property — clean.
  • Repo-wide grep for xaprepare — clean apart from the five intentional historical breadcrumb comments listed above.

Diff stat

102 files changed, 25 insertions(+), 7891 deletions(-).

Precedent chain

Continues the multi-slice teardown started by #11568, #11580, #11608, #11613, #11631, #11731, #11732, #11733, #11737, #11740, #11760, #11803, #11821, #11825, #11826, #11945, #11946, #11956.

Co-authored-by: Copilot App 223556219+Copilot@users.noreply.github.com

…xaprepare project
Follow-up to #11956 (which moved the JDK half of
`Configuration.OperatingSystem.props` to Java.Interop's `JdkInfo.props`).
The remaining NDK/OS-info half has zero real consumers, so this change
removes the last generator, cascades through the two Scenarios that only
existed to run it, and deletes the whole `build-tools/xaprepare/` project.
Every integration point (Makefile, PrepareWindows.targets, CI YAML, docs)
is updated in the same commit so `build.cmd -t:Prepare` and `make prepare`
still work end-to-end.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
CopilotAI review requested due to automatic review settings July 2, 2026 16:08

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR completes the xaprepare teardown by deleting the remaining Configuration.OperatingSystem.props generator (and its now-dead scenario/OS/tooling scaffolding), removing the entire build-tools/xaprepare/ project, and updating build/CI/docs so make prepare / build.cmd -t:Prepare continue to work without xaprepare.

Changes:

  • Remove generation + import of Configuration.OperatingSystem.props, and drop the unused MakeConcurrency MSBuild property.
  • Delete the build-tools/xaprepare/ project tree and the supporting scenario/OS/tool-runner/config code that only existed for xaprepare.
  • Update Makefile/Windows Prepare target/CI YAML templates and docs to remove xaprepare integration points and point at src/androidsdk/androidsdk.targets/androidsdk.csproj for platform provisioning.

Reviewed changes

Copilot reviewed 101 out of 102 changed files in this pull request and generated 1 comment.

Show a summary per file
FileDescription
MakefileRemoves xaprepare invocation/flags from prepare and deletes prepare-help.
Documentation/workflow/HowToAddNewApiLevel.mdUpdates “add platform” guidance to edit src/androidsdk/androidsdk.targets and uses src/androidsdk/androidsdk.csproj to install platforms.
Documentation/building/unix/dependencies.mdRepoints “current JDK version” reference to $(MicrosoftOpenJDKVersion) in Configuration.props.
Documentation/building/configuration.mdRemoves the $(MakeConcurrency) documentation entry.
Configuration.propsDrops OS-props import and the MakeConcurrency definition; retains only JdkInfo import + related comments.
build-tools/xaprepare/xaprepare/xaprepare.targetsDeleted (xaprepare build-time file generation targets removed).
build-tools/xaprepare/xaprepare/xaprepare.csprojDeleted (xaprepare app project removed).
build-tools/xaprepare/xaprepare/ToolRunners/ToolRunner.OutputSink.csDeleted (xaprepare tool-runner logging sink removed).
build-tools/xaprepare/xaprepare/ToolRunners/ToolRunner.csDeleted (xaprepare tool-runner base removed).
build-tools/xaprepare/xaprepare/ToolRunners/TarRunner.OutputSink.csDeleted (xaprepare tar runner removed).
build-tools/xaprepare/xaprepare/ToolRunners/TarRunner.csDeleted (xaprepare tar runner removed).
build-tools/xaprepare/xaprepare/ToolRunners/SevenZipRunner.OutputSink.csDeleted (xaprepare 7zip runner removed).
build-tools/xaprepare/xaprepare/ToolRunners/SevenZipRunner.csDeleted (xaprepare 7zip runner removed).
build-tools/xaprepare/xaprepare/ToolRunners/GitRunner.OutputSink.csDeleted (xaprepare git runner removed).
build-tools/xaprepare/xaprepare/ToolRunners/GitRunner.csDeleted (xaprepare git runner removed).
build-tools/xaprepare/xaprepare/Steps/Step_GenerateFiles.csDeleted (last generator for Configuration.OperatingSystem.props removed).
build-tools/xaprepare/xaprepare/Scenarios/Scenario_Standard.csDeleted (scenario now empty post-generator removal).
build-tools/xaprepare/xaprepare/Scenarios/Scenario_Required.csDeleted (scenario now empty post-generator removal).
build-tools/xaprepare/xaprepare/Resources/Configuration.OperatingSystem.props.inDeleted (last template removed).
build-tools/xaprepare/xaprepare/OperatingSystems/Windows.csDeleted (xaprepare OS model removed).
build-tools/xaprepare/xaprepare/OperatingSystems/Unix.csDeleted (xaprepare OS model removed).
build-tools/xaprepare/xaprepare/OperatingSystems/NoOS.csDeleted (xaprepare OS model removed).
build-tools/xaprepare/xaprepare/OperatingSystems/MacOS.csDeleted (xaprepare OS model removed).
build-tools/xaprepare/xaprepare/OperatingSystems/Linux.UbuntuCommon.csDeleted (xaprepare OS model removed).
build-tools/xaprepare/xaprepare/OperatingSystems/Linux.csDeleted (xaprepare OS model removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Dependencies/Windows.csDeleted (xaprepare dependency stubs removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Dependencies/MacOS.csDeleted (xaprepare dependency stubs removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Dependencies/Linux.UbuntuCommon.csDeleted (xaprepare dependency stubs removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Dependencies/Linux.Ubuntu.csDeleted (xaprepare dependency stubs removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Dependencies/Linux.Mint.csDeleted (xaprepare dependency stubs removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Dependencies/Linux.Gentoo.csDeleted (xaprepare dependency stubs removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Dependencies/Linux.Fedora.csDeleted (xaprepare dependency stubs removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Dependencies/Linux.DebianCommon.csDeleted (xaprepare dependency stubs removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Dependencies/Linux.Debian.csDeleted (xaprepare dependency stubs removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Dependencies/Linux.Arch.csDeleted (xaprepare dependency stubs removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Configurables.Windows.csDeleted (xaprepare configurables removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Configurables.Unix.csDeleted (xaprepare configurables removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Configurables.MacOS.csDeleted (xaprepare configurables removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Configurables.Linux.csDeleted (xaprepare configurables removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Configurables.csDeleted (xaprepare configurables removed).
build-tools/xaprepare/xaprepare/BuildInfo.cs.inDeleted (xaprepare generated build-info removed).
build-tools/xaprepare/xaprepare/Application/VersionFetchers.csDeleted (xaprepare version parsing infra removed).
build-tools/xaprepare/xaprepare/Application/Utilities.Windows.csDeleted (xaprepare utilities removed).
build-tools/xaprepare/xaprepare/Application/Utilities.Unix.csDeleted (xaprepare utilities removed).
build-tools/xaprepare/xaprepare/Application/ThumbTwiddler.csDeleted (xaprepare TUI/progress UI removed).
build-tools/xaprepare/xaprepare/Application/Step.csDeleted (xaprepare step infra removed).
build-tools/xaprepare/xaprepare/Application/SizeFormatter.csDeleted (xaprepare utility removed).
build-tools/xaprepare/xaprepare/Application/SimpleActionStep.csDeleted (xaprepare step infra removed).
build-tools/xaprepare/xaprepare/Application/SevenZipVersionParser.csDeleted (xaprepare version parsing removed).
build-tools/xaprepare/xaprepare/Application/ScenarioNoScenario.csDeleted (xaprepare scenario infra removed).
build-tools/xaprepare/xaprepare/Application/ScenarioAttribute.csDeleted (xaprepare scenario infra removed).
build-tools/xaprepare/xaprepare/Application/Scenario.csDeleted (xaprepare scenario infra removed).
build-tools/xaprepare/xaprepare/Application/RegexProgramVersionParser.csDeleted (xaprepare version parsing removed).
build-tools/xaprepare/xaprepare/Application/PropertiesChangedEventArgs.csDeleted (xaprepare property infra removed).
build-tools/xaprepare/xaprepare/Application/Properties.Defaults.cs.inDeleted (xaprepare generated defaults removed).
build-tools/xaprepare/xaprepare/Application/Properties.csDeleted (xaprepare property infra removed).
build-tools/xaprepare/xaprepare/Application/ProgramVersionParser.csDeleted (xaprepare version parsing removed).
build-tools/xaprepare/xaprepare/Application/Program.csDeleted (xaprepare dependency infra removed).
build-tools/xaprepare/xaprepare/Application/ProcessStandardStreamWrapper.csDeleted (xaprepare process output wrapper removed).
build-tools/xaprepare/xaprepare/Application/LoggingVerbosity.csDeleted (xaprepare logging infra removed).
build-tools/xaprepare/xaprepare/Application/Log.Windows.csDeleted (xaprepare logging infra removed).
build-tools/xaprepare/xaprepare/Application/Log.Unix.csDeleted (xaprepare logging infra removed).
build-tools/xaprepare/xaprepare/Application/KnownProperties.csDeleted (xaprepare property constants removed).
build-tools/xaprepare/xaprepare/Application/KnownConditions.csDeleted (xaprepare condition constants removed).
build-tools/xaprepare/xaprepare/Application/GeneratedPlaceholdersFile.csDeleted (xaprepare generator infra removed).
build-tools/xaprepare/xaprepare/Application/GeneratedFile.csDeleted (xaprepare generator infra removed).
build-tools/xaprepare/xaprepare/Application/Extensions.DictionaryOfProgramVersionParser.csDeleted (xaprepare helper removed).
build-tools/xaprepare/xaprepare/Application/ExecutionMode.csDeleted (xaprepare execution-mode infra removed).
build-tools/xaprepare/xaprepare/Application/EssentialTools.Unix.csDeleted (xaprepare essential tools infra removed).
build-tools/xaprepare/xaprepare/Application/EssentialTools.MacOS.csDeleted (xaprepare essential tools infra removed).
build-tools/xaprepare/xaprepare/Application/EssentialTools.Linux.csDeleted (xaprepare essential tools infra removed).
build-tools/xaprepare/xaprepare/Application/EssentialTools.csDeleted (xaprepare essential tools infra removed).
build-tools/xaprepare/xaprepare/Application/DownloadStatus.csDeleted (xaprepare download infra removed).
build-tools/xaprepare/xaprepare/Application/DetermineWindowsVersion.Windows.csDeleted (xaprepare OS detection removed).
build-tools/xaprepare/xaprepare/Application/Context.Windows.csDeleted (xaprepare context removed).
build-tools/xaprepare/xaprepare/Application/Context.MacOS.csDeleted (xaprepare context removed).
build-tools/xaprepare/xaprepare/Application/Context.Linux.csDeleted (xaprepare context removed).
build-tools/xaprepare/xaprepare/Application/CompressionFormat.csDeleted (xaprepare compression infra removed).
build-tools/xaprepare/xaprepare/Application/Characters.csDeleted (xaprepare UI chars removed).
build-tools/xaprepare/xaprepare/Application/AppObject.csDeleted (xaprepare base type removed).
build-tools/xaprepare/xaprepare/app.manifestDeleted (xaprepare Windows manifest removed).
build-tools/xaprepare/xaprepare/App.configDeleted (xaprepare legacy app config removed).
build-tools/xaprepare/xaprepare.slnDeleted (xaprepare solution removed).
build-tools/xaprepare/README.mdDeleted (xaprepare documentation removed).
build-tools/xaprepare/.gitignoreDeleted (xaprepare-specific ignore file removed).
build-tools/scripts/PrepareWindows.targetsRemoves xaprepare build/run steps; repoints Prepare to dotnet + bootstrap/workloads + Java.Interop prepare.
build-tools/scripts/BuildEverything.mkSimplifies jenkins to always make prepare && make leeroy.
build-tools/automation/yaml-templates/setup-jdk-variables.yamlRenames internal variable used to compute JAVA_HOME path ($xaPrepareJdkPath$xaJdkPath).
build-tools/automation/yaml-templates/generate-cgmanifest.yamlRemoves stale comment referencing the old xaprepare step.
build-tools/automation/yaml-templates/copy-extra-result-files.yamlRemoves collection of the now-deleted Configuration.OperatingSystem.props and tidies comment.
build-tools/automation/yaml-templates/commercial-build.yamlDrops PREPARE_CI=1 from make jenkins invocation.
build-tools/automation/yaml-templates/build-macos-steps.yamlDrops PREPARE_CI=1 from make jenkins invocation.
build-tools/automation/yaml-templates/build-linux-steps.yamlDrops PREPARE_CI=1 from make jenkins invocation.
build-tools/automation/azure-pipelines-apidocs.yamlDrops PREPARE_CI=1 from make prepare invocation.
.gitignoreRemoves Configuration.OperatingSystem.props ignore entry since it’s no longer generated.
.github/workflows/copilot-setup-steps.ymlDrops PREPARE_CI=1 from make jenkins invocation.
Comments suppressed due to low confidence (1)

Configuration.props:9

  • 💡 MaintainabilityDoNotLoadOSProperties now only guards importing JdkInfo.props (since Configuration.OperatingSystem.props was removed). Adding a short comment here would prevent future confusion about what this switch actually disables.
 <Import
Project="$(MSBuildThisFileDirectory)external\Java.Interop\bin\Build$(Configuration)\JdkInfo.props"
Condition=" Exists('$(MSBuildThisFileDirectory)external\Java.Interop\bin\Build$(Configuration)\JdkInfo.props') And '$(DoNotLoadOSProperties)' != 'True' "
/>

Comment threadDocumentation/workflow/HowToAddNewApiLevel.md Outdated
jonathanpeppersand others added 4 commits July 2, 2026 11:19
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
xaprepare previously ran `git submodule update` via
Step_PrepareExternalGitDependencies + Context.MainAsync's
SelectedScenario.NeedsGitSubmodules block. With xaprepare gone,
nothing initialized submodules for the `checkout: self` blocks
in azure-pipelines-public.yaml, so the Bootstrap solution build
failed with MSB4019 trying to import
external/xamarin-android-tools/src/Microsoft.Android.Build.BaseTasks/MSBuildReferences.projitems.
Add `submodules: recursive` to the three `checkout: self` steps
(macOS, Windows, Linux) to match azure-pipelines-nightly.yaml,
azure-pipelines-apidocs.yaml, azure-pipelines.yaml, and
stage-java-interop-tests.yaml (all already set it).
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
xaprepare's Context.WriteBuildToolsInventoryCsv() produced
bin/Build$(Configuration)/buildtoolsinventory.csv listing the
Android SDK/NDK/JDK/dotnet component versions, required by
Section 4.e.i.D of the Executive Order on Cybersecurity build
system security requirements (per PR #6833). The file is
consumed as the AndroidBuildToolsInventory pipeline artifact
by build-macos-steps.yaml, build-macos.yaml (1ES), and
commercial-build.yaml.
With xaprepare gone this file was no longer being generated,
so the macOS `upload build tools inventory` task failed with:
Path does not exist: .../bin/BuildRelease/buildtoolsinventory.csv
Add build-tools/build-tools-inventory/build-tools-inventory.proj
which reads the versions from Configuration.props, eng/Versions.props,
and the _PlatformPackage ItemGroup in androidsdk.targets (the
single sources of truth) and writes the CSV via WriteLinesToFile.
Wire it into Makefile `prepare` and PrepareWindows.targets `Prepare`
so the file is produced by `make prepare` and `build.cmd -t:Prepare`.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
xaprepare's Step_GenerateCGManifest ran on every CI `make prepare`
invocation (because `PREPARE_CI=1` implied `-a` which selected
Scenario_Standard). generate-cgmanifest.yaml was wired into
build-linux-steps, build-macos-steps, build-windows-steps, and
commercial-build, but the internal 1ES apidocs pipeline was
missed. Component Governance depends on the manifest for git
submodule registrations that its native detectors can't
enumerate.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

@simonrozsivalsimonrozsival left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@simonrozsival
simonrozsival merged commit be5272c into mainJul 3, 2026
42 checks passed
@simonrozsival
simonrozsival deleted the jonathanpeppers-xaprepare-d1-ndk-os-info branch July 3, 2026 07:06
jonathanpeppers added a commit that referenced this pull request Jul 16, 2026
## Summary
- delete the unused `Android`, `Emulator`, and legacy `JdkInfo` BootstrapTasks
- move the one surviving trace logger adapter into `CheckApiCompatibility`
- remove BootstrapTasks' `Xamarin.Android.Tools.AndroidSdk` dependency by parsing the three API metadata fields used by `GenerateSupportedPlatforms` directly
- delete the redundant `Xamarin.Android.BootstrapTasks.sln` and build BootstrapTasks directly in CI
- make `build-tools/scripts/Prepare.proj` the cross-platform source of truth for post-install Prepare orchestration
- delete `PrepareWindows.targets` by moving its Windows-only .NET installation and toolchain-path guard into `Prepare.proj`
This follows the wholesale xaprepare removal in #11959.
## BootstrapTasks cleanup
The deleted `Android` and `Emulator` wrappers had no task registration or invocation. The deleted `JdkInfo` task was superseded by `Java.Interop.BootstrapTasks.JdkInfo`; its only remaining indirect use was a generic logger callback used by `CheckApiCompatibility`.
The initial dependency audit also surfaced a narrow surviving use of `AndroidVersion` and `AndroidVersions` in `GenerateSupportedPlatforms`. That task only needed `VersionCodeFull`, target-framework version ordering, and `Stable`, so it now parses those existing item metadata values directly while preserving the prior max-stable and supported-platform ordering semantics. This removes the broader `Xamarin.Android.Tools.AndroidSdk` project reference without duplicating its model.
`Xamarin.Android.BootstrapTasks.sln` only contained BootstrapTasks and `xa-prep-tasks`, which is already a BootstrapTasks project reference. Its Makefile, Windows, and Azure Pipelines consumers now use the project/common orchestrator directly.
## Prepare orchestration
| Before | After |
| --- | --- |
| Unix Makefile listed four commands | Unix installs .NET, then invokes `Prepare.proj` once |
| `PrepareWindows.targets` installed .NET and listed the same four operations | The solution imports `Prepare.proj`, which installs .NET and checks the toolchain path on Windows |
| Java.Interop was called separately by each wrapper | `Prepare.proj` imports `DotNet.targets` and calls the existing `PrepareJavaInterop` target |
`Prepare.proj` preserves this order:
1. restore/build BootstrapTasks
2. restore/build workloads
3. run `PrepareJavaInterop` and its `PrepareOpenJDK` dependency
4. build the build-tools inventory
The Unix wrapper launches the orchestrator with system `dotnet`; imported `DotNet.targets` continues to use the repo-local `$(DotNetPreviewTool)` for Java.Interop.
On Windows, `Prepare.proj` also owns the conditional .NET installation and Android toolchain path guard previously kept in `PrepareWindows.targets`.
## Verification
- `dotnet build build-tools\Xamarin.Android.Tools.BootstrapTasks\Xamarin.Android.Tools.BootstrapTasks.csproj -c Debug`: passed, 0 warnings
- `build.cmd -t:Prepare -c Debug`: passed end to end
- expected outputs confirmed:
- `bin\BuildDebug\net10.0\Xamarin.Android.Tools.BootstrapTasks.dll`
- `external\Java.Interop\bin\BuildDebug\JdkInfo.props`
- `bin\BuildDebug\buildtoolsinventory.csv`
- system-`dotnet` invocation of `Prepare.proj`: passed, 0 warnings; binlog inspected with `binlogtool`
- `dotnet-local.cmd build src\Xamarin.Android.Build.Tasks\Xamarin.Android.Build.Tasks.csproj -c Debug`: passed with 17 pre-existing generated-code/Javac warnings
- old solution/task/orchestration references: no matches
- GNU make was unavailable on the Windows host; the equivalent system-`dotnet` command emitted by `SYSTEM_DOTNET_BINLOG` was run directly instead
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Šimon Rozsíval <simon@rozsival.com>
@github-actionsgithub-actionsBot locked and limited conversation to collaborators Aug 2, 2026
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@jonathanpeppers@simonrozsival
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

[xaprepare] Delete Configuration.OperatingSystem.props generator and xaprepare project - #11959

Merged
simonrozsival merged 5 commits into
mainfrom
jonathanpeppers-xaprepare-d1-ndk-os-info
Jul 3, 2026
Merged

[xaprepare] Delete Configuration.OperatingSystem.props generator and xaprepare project#11959
simonrozsival merged 5 commits into
mainfrom
jonathanpeppers-xaprepare-d1-ndk-os-info

Conversation

@jonathanpeppers

Copy link
Copy Markdown
Member

Follow-up to #11956, which moved the JDK half of Configuration.OperatingSystem.props to Java.Interop's JdkInfo.props. The remaining NDK / OS-info half has zero real consumers, so this PR:

  1. Deletes the last generator template (Configuration.OperatingSystem.props.in).
  2. Cascades through Step_GenerateFiles, both Scenario_* classes (which now had zero steps), and every supporting OperatingSystems/, Context.*OS.cs, EssentialTools.*, ToolRunners/*, Configurables.*, Application/*, and Main.cs file that only existed to feed the scenarios.
  3. Deletes the whole build-tools/xaprepare/ project.
  4. Patches every integration point (Makefile, PrepareWindows.targets, BuildEverything.mk, CI YAML, docs) so build.cmd -t:Prepare and make prepare still work end-to-end.

Configuration.OperatingSystem.props.in placeholder audit

PlaceholderConsumers outside the .in fileAction
HostOsNamenonedrop
HostOsFlavornonedrop
HostOsReleasenonedrop
HostBitsnone (ArchiveBase.HostBits in src/Xamarin.Installer.AndroidSDK/ is an unrelated C# property)drop
NdkLlvmTagnone (the NDK toolchain OS tag is resolved elsewhere via _NdkToolchainOSTag in androidsdk.targets)drop
HostCpuCountonly Configuration.props:72 via $(MakeConcurrency)drop

$(MakeConcurrency) audit

The only definition was Configuration.props:72. A repo-wide grep of .targets, .props, .projitems, Makefile, and .mk files found zero consumers of the MSBuild property. The MakeConcurrency hits under build-tools/xaprepare/ were an unrelated C# Context.MakeConcurrency property.

Result: dropped the MakeConcurrency MSBuild property entirely (no $([System.Environment]::ProcessorCount) replacement needed) and removed the $(MakeConcurrency) bullet in Documentation/building/configuration.md.

xaprepare integration audit (grep-confirmed, patched here)

LocationChange
build-tools/xaprepare/ (entire tree)deleted — 86 tracked files
Configuration.propsdropped <Import> of the generated OS props, dropped MakeConcurrency, tidied the "between xaprepare and package creation tools" comment
.gitignoredropped Configuration.OperatingSystem.props
build-tools/scripts/PrepareWindows.targetsremoved _XAPrepareExe, _XAPrepareStandardArgs, _BuildXAPrepare target, and the Exec dotnet $(_XAPrepareExe) line. Repointed Prepare at _InstallDotNet. Kept the space-in-path guard, BootstrapTasks / workloads MSBuilds, and PrepareJavaInterop
Makefiledropped PREPARE_PROJECT, PREPARE_NET_FX, PREPARE_ARGS, PREPARE_MSBUILD_FLAGS, PREPARE_SCENARIO, PREPARE_CI_PR, PREPARE_CI, _PREPARE_CI_MODE_*, _PREPARE_ARGS, and all their conditionals. Dropped the dotnet run --project xaprepare.csproj line from prepare. Deleted the prepare-help target
build-tools/scripts/BuildEverything.mkjenkins no longer branches on PREPARE_CI_PR/PREPARE_CI; just $(MAKE) prepare && $(MAKE) leeroy
.github/workflows/copilot-setup-steps.ymldropped now-unused PREPARE_CI=1
build-tools/automation/azure-pipelines-apidocs.yamldropped PREPARE_CI=1
build-tools/automation/yaml-templates/build-linux-steps.yamldropped PREPARE_CI=1
build-tools/automation/yaml-templates/build-macos-steps.yamldropped PREPARE_CI=1
build-tools/automation/yaml-templates/commercial-build.yamldropped PREPARE_CI=1
build-tools/automation/yaml-templates/copy-extra-result-files.yamldropped **/Configuration.OperatingSystem.props glob and the stale Step_CopyExtraResultFilesForCI xaprepare-step comment
build-tools/automation/yaml-templates/generate-cgmanifest.yamldropped the stale Step_GenerateCGManifest xaprepare-step comment
build-tools/automation/yaml-templates/setup-jdk-variables.yamlrenamed $xaPrepareJdkPath$xaJdkPath for hygiene
Documentation/workflow/HowToAddNewApiLevel.mdrewrote the "Add New Platform" section to point at <_PlatformPackage> entries in src/androidsdk/androidsdk.targets instead of AndroidToolchain.cs; updated the --android-sdk-platforms=all recipe to dotnet-local build src/androidsdk/androidsdk.csproj -p:AndroidSdkPlatforms=all
Documentation/building/unix/dependencies.mdJDK-version link now points at $(MicrosoftOpenJDKVersion) in /Configuration.props instead of the deleted Configurables.cs
Documentation/building/configuration.mdremoved the $(MakeConcurrency) bullet

Historical breadcrumb comments left as-is (still accurate and useful for git-archaeology):

  • .github/skills/update-tpn/SKILL.md
  • src/AndroidBuildConfig/AndroidBuildConfig.csproj
  • src/androidsdk/androidsdk.targets
  • src/native/cmake-config/cmake-config.csproj
  • src/workloads/workloads.csproj

Verification

  • build.cmd Prepare — succeeded end-to-end on Windows (0 warnings, 0 errors). The trimmed Prepare target ran through _InstallDotNet, the space-in-path guard, Xamarin.Android.BootstrapTasks.sln, src/workloads/workloads.csproj, and PrepareJavaInterop.
  • dotnet build src\Xamarin.Android.Build.Tasks\Xamarin.Android.Build.Tasks.csproj -c Debug — 0 errors (93 pre-existing warnings from src/Mono.Android/ and generated MCW, unrelated to this change).
  • Repo-wide grep for HostOsName, HostOsFlavor, HostOsRelease, HostCpuCount, NdkLlvmTag, and the MSBuild MakeConcurrency property — clean.
  • Repo-wide grep for xaprepare — clean apart from the five intentional historical breadcrumb comments listed above.

Diff stat

102 files changed, 25 insertions(+), 7891 deletions(-).

Precedent chain

Continues the multi-slice teardown started by #11568, #11580, #11608, #11613, #11631, #11731, #11732, #11733, #11737, #11740, #11760, #11803, #11821, #11825, #11826, #11945, #11946, #11956.

Co-authored-by: Copilot App 223556219+Copilot@users.noreply.github.com

…xaprepare project
Follow-up to #11956 (which moved the JDK half of
`Configuration.OperatingSystem.props` to Java.Interop's `JdkInfo.props`).
The remaining NDK/OS-info half has zero real consumers, so this change
removes the last generator, cascades through the two Scenarios that only
existed to run it, and deletes the whole `build-tools/xaprepare/` project.
Every integration point (Makefile, PrepareWindows.targets, CI YAML, docs)
is updated in the same commit so `build.cmd -t:Prepare` and `make prepare`
still work end-to-end.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
CopilotAI review requested due to automatic review settings July 2, 2026 16:08

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR completes the xaprepare teardown by deleting the remaining Configuration.OperatingSystem.props generator (and its now-dead scenario/OS/tooling scaffolding), removing the entire build-tools/xaprepare/ project, and updating build/CI/docs so make prepare / build.cmd -t:Prepare continue to work without xaprepare.

Changes:

  • Remove generation + import of Configuration.OperatingSystem.props, and drop the unused MakeConcurrency MSBuild property.
  • Delete the build-tools/xaprepare/ project tree and the supporting scenario/OS/tool-runner/config code that only existed for xaprepare.
  • Update Makefile/Windows Prepare target/CI YAML templates and docs to remove xaprepare integration points and point at src/androidsdk/androidsdk.targets/androidsdk.csproj for platform provisioning.

Reviewed changes

Copilot reviewed 101 out of 102 changed files in this pull request and generated 1 comment.

Show a summary per file
FileDescription
MakefileRemoves xaprepare invocation/flags from prepare and deletes prepare-help.
Documentation/workflow/HowToAddNewApiLevel.mdUpdates “add platform” guidance to edit src/androidsdk/androidsdk.targets and uses src/androidsdk/androidsdk.csproj to install platforms.
Documentation/building/unix/dependencies.mdRepoints “current JDK version” reference to $(MicrosoftOpenJDKVersion) in Configuration.props.
Documentation/building/configuration.mdRemoves the $(MakeConcurrency) documentation entry.
Configuration.propsDrops OS-props import and the MakeConcurrency definition; retains only JdkInfo import + related comments.
build-tools/xaprepare/xaprepare/xaprepare.targetsDeleted (xaprepare build-time file generation targets removed).
build-tools/xaprepare/xaprepare/xaprepare.csprojDeleted (xaprepare app project removed).
build-tools/xaprepare/xaprepare/ToolRunners/ToolRunner.OutputSink.csDeleted (xaprepare tool-runner logging sink removed).
build-tools/xaprepare/xaprepare/ToolRunners/ToolRunner.csDeleted (xaprepare tool-runner base removed).
build-tools/xaprepare/xaprepare/ToolRunners/TarRunner.OutputSink.csDeleted (xaprepare tar runner removed).
build-tools/xaprepare/xaprepare/ToolRunners/TarRunner.csDeleted (xaprepare tar runner removed).
build-tools/xaprepare/xaprepare/ToolRunners/SevenZipRunner.OutputSink.csDeleted (xaprepare 7zip runner removed).
build-tools/xaprepare/xaprepare/ToolRunners/SevenZipRunner.csDeleted (xaprepare 7zip runner removed).
build-tools/xaprepare/xaprepare/ToolRunners/GitRunner.OutputSink.csDeleted (xaprepare git runner removed).
build-tools/xaprepare/xaprepare/ToolRunners/GitRunner.csDeleted (xaprepare git runner removed).
build-tools/xaprepare/xaprepare/Steps/Step_GenerateFiles.csDeleted (last generator for Configuration.OperatingSystem.props removed).
build-tools/xaprepare/xaprepare/Scenarios/Scenario_Standard.csDeleted (scenario now empty post-generator removal).
build-tools/xaprepare/xaprepare/Scenarios/Scenario_Required.csDeleted (scenario now empty post-generator removal).
build-tools/xaprepare/xaprepare/Resources/Configuration.OperatingSystem.props.inDeleted (last template removed).
build-tools/xaprepare/xaprepare/OperatingSystems/Windows.csDeleted (xaprepare OS model removed).
build-tools/xaprepare/xaprepare/OperatingSystems/Unix.csDeleted (xaprepare OS model removed).
build-tools/xaprepare/xaprepare/OperatingSystems/NoOS.csDeleted (xaprepare OS model removed).
build-tools/xaprepare/xaprepare/OperatingSystems/MacOS.csDeleted (xaprepare OS model removed).
build-tools/xaprepare/xaprepare/OperatingSystems/Linux.UbuntuCommon.csDeleted (xaprepare OS model removed).
build-tools/xaprepare/xaprepare/OperatingSystems/Linux.csDeleted (xaprepare OS model removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Dependencies/Windows.csDeleted (xaprepare dependency stubs removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Dependencies/MacOS.csDeleted (xaprepare dependency stubs removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Dependencies/Linux.UbuntuCommon.csDeleted (xaprepare dependency stubs removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Dependencies/Linux.Ubuntu.csDeleted (xaprepare dependency stubs removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Dependencies/Linux.Mint.csDeleted (xaprepare dependency stubs removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Dependencies/Linux.Gentoo.csDeleted (xaprepare dependency stubs removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Dependencies/Linux.Fedora.csDeleted (xaprepare dependency stubs removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Dependencies/Linux.DebianCommon.csDeleted (xaprepare dependency stubs removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Dependencies/Linux.Debian.csDeleted (xaprepare dependency stubs removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Dependencies/Linux.Arch.csDeleted (xaprepare dependency stubs removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Configurables.Windows.csDeleted (xaprepare configurables removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Configurables.Unix.csDeleted (xaprepare configurables removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Configurables.MacOS.csDeleted (xaprepare configurables removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Configurables.Linux.csDeleted (xaprepare configurables removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Configurables.csDeleted (xaprepare configurables removed).
build-tools/xaprepare/xaprepare/BuildInfo.cs.inDeleted (xaprepare generated build-info removed).
build-tools/xaprepare/xaprepare/Application/VersionFetchers.csDeleted (xaprepare version parsing infra removed).
build-tools/xaprepare/xaprepare/Application/Utilities.Windows.csDeleted (xaprepare utilities removed).
build-tools/xaprepare/xaprepare/Application/Utilities.Unix.csDeleted (xaprepare utilities removed).
build-tools/xaprepare/xaprepare/Application/ThumbTwiddler.csDeleted (xaprepare TUI/progress UI removed).
build-tools/xaprepare/xaprepare/Application/Step.csDeleted (xaprepare step infra removed).
build-tools/xaprepare/xaprepare/Application/SizeFormatter.csDeleted (xaprepare utility removed).
build-tools/xaprepare/xaprepare/Application/SimpleActionStep.csDeleted (xaprepare step infra removed).
build-tools/xaprepare/xaprepare/Application/SevenZipVersionParser.csDeleted (xaprepare version parsing removed).
build-tools/xaprepare/xaprepare/Application/ScenarioNoScenario.csDeleted (xaprepare scenario infra removed).
build-tools/xaprepare/xaprepare/Application/ScenarioAttribute.csDeleted (xaprepare scenario infra removed).
build-tools/xaprepare/xaprepare/Application/Scenario.csDeleted (xaprepare scenario infra removed).
build-tools/xaprepare/xaprepare/Application/RegexProgramVersionParser.csDeleted (xaprepare version parsing removed).
build-tools/xaprepare/xaprepare/Application/PropertiesChangedEventArgs.csDeleted (xaprepare property infra removed).
build-tools/xaprepare/xaprepare/Application/Properties.Defaults.cs.inDeleted (xaprepare generated defaults removed).
build-tools/xaprepare/xaprepare/Application/Properties.csDeleted (xaprepare property infra removed).
build-tools/xaprepare/xaprepare/Application/ProgramVersionParser.csDeleted (xaprepare version parsing removed).
build-tools/xaprepare/xaprepare/Application/Program.csDeleted (xaprepare dependency infra removed).
build-tools/xaprepare/xaprepare/Application/ProcessStandardStreamWrapper.csDeleted (xaprepare process output wrapper removed).
build-tools/xaprepare/xaprepare/Application/LoggingVerbosity.csDeleted (xaprepare logging infra removed).
build-tools/xaprepare/xaprepare/Application/Log.Windows.csDeleted (xaprepare logging infra removed).
build-tools/xaprepare/xaprepare/Application/Log.Unix.csDeleted (xaprepare logging infra removed).
build-tools/xaprepare/xaprepare/Application/KnownProperties.csDeleted (xaprepare property constants removed).
build-tools/xaprepare/xaprepare/Application/KnownConditions.csDeleted (xaprepare condition constants removed).
build-tools/xaprepare/xaprepare/Application/GeneratedPlaceholdersFile.csDeleted (xaprepare generator infra removed).
build-tools/xaprepare/xaprepare/Application/GeneratedFile.csDeleted (xaprepare generator infra removed).
build-tools/xaprepare/xaprepare/Application/Extensions.DictionaryOfProgramVersionParser.csDeleted (xaprepare helper removed).
build-tools/xaprepare/xaprepare/Application/ExecutionMode.csDeleted (xaprepare execution-mode infra removed).
build-tools/xaprepare/xaprepare/Application/EssentialTools.Unix.csDeleted (xaprepare essential tools infra removed).
build-tools/xaprepare/xaprepare/Application/EssentialTools.MacOS.csDeleted (xaprepare essential tools infra removed).
build-tools/xaprepare/xaprepare/Application/EssentialTools.Linux.csDeleted (xaprepare essential tools infra removed).
build-tools/xaprepare/xaprepare/Application/EssentialTools.csDeleted (xaprepare essential tools infra removed).
build-tools/xaprepare/xaprepare/Application/DownloadStatus.csDeleted (xaprepare download infra removed).
build-tools/xaprepare/xaprepare/Application/DetermineWindowsVersion.Windows.csDeleted (xaprepare OS detection removed).
build-tools/xaprepare/xaprepare/Application/Context.Windows.csDeleted (xaprepare context removed).
build-tools/xaprepare/xaprepare/Application/Context.MacOS.csDeleted (xaprepare context removed).
build-tools/xaprepare/xaprepare/Application/Context.Linux.csDeleted (xaprepare context removed).
build-tools/xaprepare/xaprepare/Application/CompressionFormat.csDeleted (xaprepare compression infra removed).
build-tools/xaprepare/xaprepare/Application/Characters.csDeleted (xaprepare UI chars removed).
build-tools/xaprepare/xaprepare/Application/AppObject.csDeleted (xaprepare base type removed).
build-tools/xaprepare/xaprepare/app.manifestDeleted (xaprepare Windows manifest removed).
build-tools/xaprepare/xaprepare/App.configDeleted (xaprepare legacy app config removed).
build-tools/xaprepare/xaprepare.slnDeleted (xaprepare solution removed).
build-tools/xaprepare/README.mdDeleted (xaprepare documentation removed).
build-tools/xaprepare/.gitignoreDeleted (xaprepare-specific ignore file removed).
build-tools/scripts/PrepareWindows.targetsRemoves xaprepare build/run steps; repoints Prepare to dotnet + bootstrap/workloads + Java.Interop prepare.
build-tools/scripts/BuildEverything.mkSimplifies jenkins to always make prepare && make leeroy.
build-tools/automation/yaml-templates/setup-jdk-variables.yamlRenames internal variable used to compute JAVA_HOME path ($xaPrepareJdkPath$xaJdkPath).
build-tools/automation/yaml-templates/generate-cgmanifest.yamlRemoves stale comment referencing the old xaprepare step.
build-tools/automation/yaml-templates/copy-extra-result-files.yamlRemoves collection of the now-deleted Configuration.OperatingSystem.props and tidies comment.
build-tools/automation/yaml-templates/commercial-build.yamlDrops PREPARE_CI=1 from make jenkins invocation.
build-tools/automation/yaml-templates/build-macos-steps.yamlDrops PREPARE_CI=1 from make jenkins invocation.
build-tools/automation/yaml-templates/build-linux-steps.yamlDrops PREPARE_CI=1 from make jenkins invocation.
build-tools/automation/azure-pipelines-apidocs.yamlDrops PREPARE_CI=1 from make prepare invocation.
.gitignoreRemoves Configuration.OperatingSystem.props ignore entry since it’s no longer generated.
.github/workflows/copilot-setup-steps.ymlDrops PREPARE_CI=1 from make jenkins invocation.
Comments suppressed due to low confidence (1)

Configuration.props:9

  • 💡 MaintainabilityDoNotLoadOSProperties now only guards importing JdkInfo.props (since Configuration.OperatingSystem.props was removed). Adding a short comment here would prevent future confusion about what this switch actually disables.
 <Import
Project="$(MSBuildThisFileDirectory)external\Java.Interop\bin\Build$(Configuration)\JdkInfo.props"
Condition=" Exists('$(MSBuildThisFileDirectory)external\Java.Interop\bin\Build$(Configuration)\JdkInfo.props') And '$(DoNotLoadOSProperties)' != 'True' "
/>

Comment threadDocumentation/workflow/HowToAddNewApiLevel.md Outdated
jonathanpeppersand others added 4 commits July 2, 2026 11:19
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
xaprepare previously ran `git submodule update` via
Step_PrepareExternalGitDependencies + Context.MainAsync's
SelectedScenario.NeedsGitSubmodules block. With xaprepare gone,
nothing initialized submodules for the `checkout: self` blocks
in azure-pipelines-public.yaml, so the Bootstrap solution build
failed with MSB4019 trying to import
external/xamarin-android-tools/src/Microsoft.Android.Build.BaseTasks/MSBuildReferences.projitems.
Add `submodules: recursive` to the three `checkout: self` steps
(macOS, Windows, Linux) to match azure-pipelines-nightly.yaml,
azure-pipelines-apidocs.yaml, azure-pipelines.yaml, and
stage-java-interop-tests.yaml (all already set it).
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
xaprepare's Context.WriteBuildToolsInventoryCsv() produced
bin/Build$(Configuration)/buildtoolsinventory.csv listing the
Android SDK/NDK/JDK/dotnet component versions, required by
Section 4.e.i.D of the Executive Order on Cybersecurity build
system security requirements (per PR #6833). The file is
consumed as the AndroidBuildToolsInventory pipeline artifact
by build-macos-steps.yaml, build-macos.yaml (1ES), and
commercial-build.yaml.
With xaprepare gone this file was no longer being generated,
so the macOS `upload build tools inventory` task failed with:
Path does not exist: .../bin/BuildRelease/buildtoolsinventory.csv
Add build-tools/build-tools-inventory/build-tools-inventory.proj
which reads the versions from Configuration.props, eng/Versions.props,
and the _PlatformPackage ItemGroup in androidsdk.targets (the
single sources of truth) and writes the CSV via WriteLinesToFile.
Wire it into Makefile `prepare` and PrepareWindows.targets `Prepare`
so the file is produced by `make prepare` and `build.cmd -t:Prepare`.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
xaprepare's Step_GenerateCGManifest ran on every CI `make prepare`
invocation (because `PREPARE_CI=1` implied `-a` which selected
Scenario_Standard). generate-cgmanifest.yaml was wired into
build-linux-steps, build-macos-steps, build-windows-steps, and
commercial-build, but the internal 1ES apidocs pipeline was
missed. Component Governance depends on the manifest for git
submodule registrations that its native detectors can't
enumerate.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

@simonrozsivalsimonrozsival left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@simonrozsival
simonrozsival merged commit be5272c into mainJul 3, 2026
42 checks passed
@simonrozsival
simonrozsival deleted the jonathanpeppers-xaprepare-d1-ndk-os-info branch July 3, 2026 07:06
jonathanpeppers added a commit that referenced this pull request Jul 16, 2026
## Summary
- delete the unused `Android`, `Emulator`, and legacy `JdkInfo` BootstrapTasks
- move the one surviving trace logger adapter into `CheckApiCompatibility`
- remove BootstrapTasks' `Xamarin.Android.Tools.AndroidSdk` dependency by parsing the three API metadata fields used by `GenerateSupportedPlatforms` directly
- delete the redundant `Xamarin.Android.BootstrapTasks.sln` and build BootstrapTasks directly in CI
- make `build-tools/scripts/Prepare.proj` the cross-platform source of truth for post-install Prepare orchestration
- delete `PrepareWindows.targets` by moving its Windows-only .NET installation and toolchain-path guard into `Prepare.proj`
This follows the wholesale xaprepare removal in #11959.
## BootstrapTasks cleanup
The deleted `Android` and `Emulator` wrappers had no task registration or invocation. The deleted `JdkInfo` task was superseded by `Java.Interop.BootstrapTasks.JdkInfo`; its only remaining indirect use was a generic logger callback used by `CheckApiCompatibility`.
The initial dependency audit also surfaced a narrow surviving use of `AndroidVersion` and `AndroidVersions` in `GenerateSupportedPlatforms`. That task only needed `VersionCodeFull`, target-framework version ordering, and `Stable`, so it now parses those existing item metadata values directly while preserving the prior max-stable and supported-platform ordering semantics. This removes the broader `Xamarin.Android.Tools.AndroidSdk` project reference without duplicating its model.
`Xamarin.Android.BootstrapTasks.sln` only contained BootstrapTasks and `xa-prep-tasks`, which is already a BootstrapTasks project reference. Its Makefile, Windows, and Azure Pipelines consumers now use the project/common orchestrator directly.
## Prepare orchestration
| Before | After |
| --- | --- |
| Unix Makefile listed four commands | Unix installs .NET, then invokes `Prepare.proj` once |
| `PrepareWindows.targets` installed .NET and listed the same four operations | The solution imports `Prepare.proj`, which installs .NET and checks the toolchain path on Windows |
| Java.Interop was called separately by each wrapper | `Prepare.proj` imports `DotNet.targets` and calls the existing `PrepareJavaInterop` target |
`Prepare.proj` preserves this order:
1. restore/build BootstrapTasks
2. restore/build workloads
3. run `PrepareJavaInterop` and its `PrepareOpenJDK` dependency
4. build the build-tools inventory
The Unix wrapper launches the orchestrator with system `dotnet`; imported `DotNet.targets` continues to use the repo-local `$(DotNetPreviewTool)` for Java.Interop.
On Windows, `Prepare.proj` also owns the conditional .NET installation and Android toolchain path guard previously kept in `PrepareWindows.targets`.
## Verification
- `dotnet build build-tools\Xamarin.Android.Tools.BootstrapTasks\Xamarin.Android.Tools.BootstrapTasks.csproj -c Debug`: passed, 0 warnings
- `build.cmd -t:Prepare -c Debug`: passed end to end
- expected outputs confirmed:
- `bin\BuildDebug\net10.0\Xamarin.Android.Tools.BootstrapTasks.dll`
- `external\Java.Interop\bin\BuildDebug\JdkInfo.props`
- `bin\BuildDebug\buildtoolsinventory.csv`
- system-`dotnet` invocation of `Prepare.proj`: passed, 0 warnings; binlog inspected with `binlogtool`
- `dotnet-local.cmd build src\Xamarin.Android.Build.Tasks\Xamarin.Android.Build.Tasks.csproj -c Debug`: passed with 17 pre-existing generated-code/Javac warnings
- old solution/task/orchestration references: no matches
- GNU make was unavailable on the Windows host; the equivalent system-`dotnet` command emitted by `SYSTEM_DOTNET_BINLOG` was run directly instead
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Šimon Rozsíval <simon@rozsival.com>
@github-actionsgithub-actionsBot locked and limited conversation to collaborators Aug 2, 2026
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@jonathanpeppers@simonrozsival
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
Skip to content

[xaprepare] Delete Configuration.OperatingSystem.props generator and xaprepare project - #11959

Merged
simonrozsival merged 5 commits into
mainfrom
jonathanpeppers-xaprepare-d1-ndk-os-info
Jul 3, 2026
Merged

[xaprepare] Delete Configuration.OperatingSystem.props generator and xaprepare project#11959
simonrozsival merged 5 commits into
mainfrom
jonathanpeppers-xaprepare-d1-ndk-os-info

Conversation

@jonathanpeppers

Copy link
Copy Markdown
Member

Follow-up to #11956, which moved the JDK half of Configuration.OperatingSystem.props to Java.Interop's JdkInfo.props. The remaining NDK / OS-info half has zero real consumers, so this PR:

  1. Deletes the last generator template (Configuration.OperatingSystem.props.in).
  2. Cascades through Step_GenerateFiles, both Scenario_* classes (which now had zero steps), and every supporting OperatingSystems/, Context.*OS.cs, EssentialTools.*, ToolRunners/*, Configurables.*, Application/*, and Main.cs file that only existed to feed the scenarios.
  3. Deletes the whole build-tools/xaprepare/ project.
  4. Patches every integration point (Makefile, PrepareWindows.targets, BuildEverything.mk, CI YAML, docs) so build.cmd -t:Prepare and make prepare still work end-to-end.

Configuration.OperatingSystem.props.in placeholder audit

PlaceholderConsumers outside the .in fileAction
HostOsNamenonedrop
HostOsFlavornonedrop
HostOsReleasenonedrop
HostBitsnone (ArchiveBase.HostBits in src/Xamarin.Installer.AndroidSDK/ is an unrelated C# property)drop
NdkLlvmTagnone (the NDK toolchain OS tag is resolved elsewhere via _NdkToolchainOSTag in androidsdk.targets)drop
HostCpuCountonly Configuration.props:72 via $(MakeConcurrency)drop

$(MakeConcurrency) audit

The only definition was Configuration.props:72. A repo-wide grep of .targets, .props, .projitems, Makefile, and .mk files found zero consumers of the MSBuild property. The MakeConcurrency hits under build-tools/xaprepare/ were an unrelated C# Context.MakeConcurrency property.

Result: dropped the MakeConcurrency MSBuild property entirely (no $([System.Environment]::ProcessorCount) replacement needed) and removed the $(MakeConcurrency) bullet in Documentation/building/configuration.md.

xaprepare integration audit (grep-confirmed, patched here)

LocationChange
build-tools/xaprepare/ (entire tree)deleted — 86 tracked files
Configuration.propsdropped <Import> of the generated OS props, dropped MakeConcurrency, tidied the "between xaprepare and package creation tools" comment
.gitignoredropped Configuration.OperatingSystem.props
build-tools/scripts/PrepareWindows.targetsremoved _XAPrepareExe, _XAPrepareStandardArgs, _BuildXAPrepare target, and the Exec dotnet $(_XAPrepareExe) line. Repointed Prepare at _InstallDotNet. Kept the space-in-path guard, BootstrapTasks / workloads MSBuilds, and PrepareJavaInterop
Makefiledropped PREPARE_PROJECT, PREPARE_NET_FX, PREPARE_ARGS, PREPARE_MSBUILD_FLAGS, PREPARE_SCENARIO, PREPARE_CI_PR, PREPARE_CI, _PREPARE_CI_MODE_*, _PREPARE_ARGS, and all their conditionals. Dropped the dotnet run --project xaprepare.csproj line from prepare. Deleted the prepare-help target
build-tools/scripts/BuildEverything.mkjenkins no longer branches on PREPARE_CI_PR/PREPARE_CI; just $(MAKE) prepare && $(MAKE) leeroy
.github/workflows/copilot-setup-steps.ymldropped now-unused PREPARE_CI=1
build-tools/automation/azure-pipelines-apidocs.yamldropped PREPARE_CI=1
build-tools/automation/yaml-templates/build-linux-steps.yamldropped PREPARE_CI=1
build-tools/automation/yaml-templates/build-macos-steps.yamldropped PREPARE_CI=1
build-tools/automation/yaml-templates/commercial-build.yamldropped PREPARE_CI=1
build-tools/automation/yaml-templates/copy-extra-result-files.yamldropped **/Configuration.OperatingSystem.props glob and the stale Step_CopyExtraResultFilesForCI xaprepare-step comment
build-tools/automation/yaml-templates/generate-cgmanifest.yamldropped the stale Step_GenerateCGManifest xaprepare-step comment
build-tools/automation/yaml-templates/setup-jdk-variables.yamlrenamed $xaPrepareJdkPath$xaJdkPath for hygiene
Documentation/workflow/HowToAddNewApiLevel.mdrewrote the "Add New Platform" section to point at <_PlatformPackage> entries in src/androidsdk/androidsdk.targets instead of AndroidToolchain.cs; updated the --android-sdk-platforms=all recipe to dotnet-local build src/androidsdk/androidsdk.csproj -p:AndroidSdkPlatforms=all
Documentation/building/unix/dependencies.mdJDK-version link now points at $(MicrosoftOpenJDKVersion) in /Configuration.props instead of the deleted Configurables.cs
Documentation/building/configuration.mdremoved the $(MakeConcurrency) bullet

Historical breadcrumb comments left as-is (still accurate and useful for git-archaeology):

  • .github/skills/update-tpn/SKILL.md
  • src/AndroidBuildConfig/AndroidBuildConfig.csproj
  • src/androidsdk/androidsdk.targets
  • src/native/cmake-config/cmake-config.csproj
  • src/workloads/workloads.csproj

Verification

  • build.cmd Prepare — succeeded end-to-end on Windows (0 warnings, 0 errors). The trimmed Prepare target ran through _InstallDotNet, the space-in-path guard, Xamarin.Android.BootstrapTasks.sln, src/workloads/workloads.csproj, and PrepareJavaInterop.
  • dotnet build src\Xamarin.Android.Build.Tasks\Xamarin.Android.Build.Tasks.csproj -c Debug — 0 errors (93 pre-existing warnings from src/Mono.Android/ and generated MCW, unrelated to this change).
  • Repo-wide grep for HostOsName, HostOsFlavor, HostOsRelease, HostCpuCount, NdkLlvmTag, and the MSBuild MakeConcurrency property — clean.
  • Repo-wide grep for xaprepare — clean apart from the five intentional historical breadcrumb comments listed above.

Diff stat

102 files changed, 25 insertions(+), 7891 deletions(-).

Precedent chain

Continues the multi-slice teardown started by #11568, #11580, #11608, #11613, #11631, #11731, #11732, #11733, #11737, #11740, #11760, #11803, #11821, #11825, #11826, #11945, #11946, #11956.

Co-authored-by: Copilot App 223556219+Copilot@users.noreply.github.com

…xaprepare project
Follow-up to #11956 (which moved the JDK half of
`Configuration.OperatingSystem.props` to Java.Interop's `JdkInfo.props`).
The remaining NDK/OS-info half has zero real consumers, so this change
removes the last generator, cascades through the two Scenarios that only
existed to run it, and deletes the whole `build-tools/xaprepare/` project.
Every integration point (Makefile, PrepareWindows.targets, CI YAML, docs)
is updated in the same commit so `build.cmd -t:Prepare` and `make prepare`
still work end-to-end.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
CopilotAI review requested due to automatic review settings July 2, 2026 16:08

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR completes the xaprepare teardown by deleting the remaining Configuration.OperatingSystem.props generator (and its now-dead scenario/OS/tooling scaffolding), removing the entire build-tools/xaprepare/ project, and updating build/CI/docs so make prepare / build.cmd -t:Prepare continue to work without xaprepare.

Changes:

  • Remove generation + import of Configuration.OperatingSystem.props, and drop the unused MakeConcurrency MSBuild property.
  • Delete the build-tools/xaprepare/ project tree and the supporting scenario/OS/tool-runner/config code that only existed for xaprepare.
  • Update Makefile/Windows Prepare target/CI YAML templates and docs to remove xaprepare integration points and point at src/androidsdk/androidsdk.targets/androidsdk.csproj for platform provisioning.

Reviewed changes

Copilot reviewed 101 out of 102 changed files in this pull request and generated 1 comment.

Show a summary per file
FileDescription
MakefileRemoves xaprepare invocation/flags from prepare and deletes prepare-help.
Documentation/workflow/HowToAddNewApiLevel.mdUpdates “add platform” guidance to edit src/androidsdk/androidsdk.targets and uses src/androidsdk/androidsdk.csproj to install platforms.
Documentation/building/unix/dependencies.mdRepoints “current JDK version” reference to $(MicrosoftOpenJDKVersion) in Configuration.props.
Documentation/building/configuration.mdRemoves the $(MakeConcurrency) documentation entry.
Configuration.propsDrops OS-props import and the MakeConcurrency definition; retains only JdkInfo import + related comments.
build-tools/xaprepare/xaprepare/xaprepare.targetsDeleted (xaprepare build-time file generation targets removed).
build-tools/xaprepare/xaprepare/xaprepare.csprojDeleted (xaprepare app project removed).
build-tools/xaprepare/xaprepare/ToolRunners/ToolRunner.OutputSink.csDeleted (xaprepare tool-runner logging sink removed).
build-tools/xaprepare/xaprepare/ToolRunners/ToolRunner.csDeleted (xaprepare tool-runner base removed).
build-tools/xaprepare/xaprepare/ToolRunners/TarRunner.OutputSink.csDeleted (xaprepare tar runner removed).
build-tools/xaprepare/xaprepare/ToolRunners/TarRunner.csDeleted (xaprepare tar runner removed).
build-tools/xaprepare/xaprepare/ToolRunners/SevenZipRunner.OutputSink.csDeleted (xaprepare 7zip runner removed).
build-tools/xaprepare/xaprepare/ToolRunners/SevenZipRunner.csDeleted (xaprepare 7zip runner removed).
build-tools/xaprepare/xaprepare/ToolRunners/GitRunner.OutputSink.csDeleted (xaprepare git runner removed).
build-tools/xaprepare/xaprepare/ToolRunners/GitRunner.csDeleted (xaprepare git runner removed).
build-tools/xaprepare/xaprepare/Steps/Step_GenerateFiles.csDeleted (last generator for Configuration.OperatingSystem.props removed).
build-tools/xaprepare/xaprepare/Scenarios/Scenario_Standard.csDeleted (scenario now empty post-generator removal).
build-tools/xaprepare/xaprepare/Scenarios/Scenario_Required.csDeleted (scenario now empty post-generator removal).
build-tools/xaprepare/xaprepare/Resources/Configuration.OperatingSystem.props.inDeleted (last template removed).
build-tools/xaprepare/xaprepare/OperatingSystems/Windows.csDeleted (xaprepare OS model removed).
build-tools/xaprepare/xaprepare/OperatingSystems/Unix.csDeleted (xaprepare OS model removed).
build-tools/xaprepare/xaprepare/OperatingSystems/NoOS.csDeleted (xaprepare OS model removed).
build-tools/xaprepare/xaprepare/OperatingSystems/MacOS.csDeleted (xaprepare OS model removed).
build-tools/xaprepare/xaprepare/OperatingSystems/Linux.UbuntuCommon.csDeleted (xaprepare OS model removed).
build-tools/xaprepare/xaprepare/OperatingSystems/Linux.csDeleted (xaprepare OS model removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Dependencies/Windows.csDeleted (xaprepare dependency stubs removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Dependencies/MacOS.csDeleted (xaprepare dependency stubs removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Dependencies/Linux.UbuntuCommon.csDeleted (xaprepare dependency stubs removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Dependencies/Linux.Ubuntu.csDeleted (xaprepare dependency stubs removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Dependencies/Linux.Mint.csDeleted (xaprepare dependency stubs removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Dependencies/Linux.Gentoo.csDeleted (xaprepare dependency stubs removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Dependencies/Linux.Fedora.csDeleted (xaprepare dependency stubs removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Dependencies/Linux.DebianCommon.csDeleted (xaprepare dependency stubs removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Dependencies/Linux.Debian.csDeleted (xaprepare dependency stubs removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Dependencies/Linux.Arch.csDeleted (xaprepare dependency stubs removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Configurables.Windows.csDeleted (xaprepare configurables removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Configurables.Unix.csDeleted (xaprepare configurables removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Configurables.MacOS.csDeleted (xaprepare configurables removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Configurables.Linux.csDeleted (xaprepare configurables removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Configurables.csDeleted (xaprepare configurables removed).
build-tools/xaprepare/xaprepare/BuildInfo.cs.inDeleted (xaprepare generated build-info removed).
build-tools/xaprepare/xaprepare/Application/VersionFetchers.csDeleted (xaprepare version parsing infra removed).
build-tools/xaprepare/xaprepare/Application/Utilities.Windows.csDeleted (xaprepare utilities removed).
build-tools/xaprepare/xaprepare/Application/Utilities.Unix.csDeleted (xaprepare utilities removed).
build-tools/xaprepare/xaprepare/Application/ThumbTwiddler.csDeleted (xaprepare TUI/progress UI removed).
build-tools/xaprepare/xaprepare/Application/Step.csDeleted (xaprepare step infra removed).
build-tools/xaprepare/xaprepare/Application/SizeFormatter.csDeleted (xaprepare utility removed).
build-tools/xaprepare/xaprepare/Application/SimpleActionStep.csDeleted (xaprepare step infra removed).
build-tools/xaprepare/xaprepare/Application/SevenZipVersionParser.csDeleted (xaprepare version parsing removed).
build-tools/xaprepare/xaprepare/Application/ScenarioNoScenario.csDeleted (xaprepare scenario infra removed).
build-tools/xaprepare/xaprepare/Application/ScenarioAttribute.csDeleted (xaprepare scenario infra removed).
build-tools/xaprepare/xaprepare/Application/Scenario.csDeleted (xaprepare scenario infra removed).
build-tools/xaprepare/xaprepare/Application/RegexProgramVersionParser.csDeleted (xaprepare version parsing removed).
build-tools/xaprepare/xaprepare/Application/PropertiesChangedEventArgs.csDeleted (xaprepare property infra removed).
build-tools/xaprepare/xaprepare/Application/Properties.Defaults.cs.inDeleted (xaprepare generated defaults removed).
build-tools/xaprepare/xaprepare/Application/Properties.csDeleted (xaprepare property infra removed).
build-tools/xaprepare/xaprepare/Application/ProgramVersionParser.csDeleted (xaprepare version parsing removed).
build-tools/xaprepare/xaprepare/Application/Program.csDeleted (xaprepare dependency infra removed).
build-tools/xaprepare/xaprepare/Application/ProcessStandardStreamWrapper.csDeleted (xaprepare process output wrapper removed).
build-tools/xaprepare/xaprepare/Application/LoggingVerbosity.csDeleted (xaprepare logging infra removed).
build-tools/xaprepare/xaprepare/Application/Log.Windows.csDeleted (xaprepare logging infra removed).
build-tools/xaprepare/xaprepare/Application/Log.Unix.csDeleted (xaprepare logging infra removed).
build-tools/xaprepare/xaprepare/Application/KnownProperties.csDeleted (xaprepare property constants removed).
build-tools/xaprepare/xaprepare/Application/KnownConditions.csDeleted (xaprepare condition constants removed).
build-tools/xaprepare/xaprepare/Application/GeneratedPlaceholdersFile.csDeleted (xaprepare generator infra removed).
build-tools/xaprepare/xaprepare/Application/GeneratedFile.csDeleted (xaprepare generator infra removed).
build-tools/xaprepare/xaprepare/Application/Extensions.DictionaryOfProgramVersionParser.csDeleted (xaprepare helper removed).
build-tools/xaprepare/xaprepare/Application/ExecutionMode.csDeleted (xaprepare execution-mode infra removed).
build-tools/xaprepare/xaprepare/Application/EssentialTools.Unix.csDeleted (xaprepare essential tools infra removed).
build-tools/xaprepare/xaprepare/Application/EssentialTools.MacOS.csDeleted (xaprepare essential tools infra removed).
build-tools/xaprepare/xaprepare/Application/EssentialTools.Linux.csDeleted (xaprepare essential tools infra removed).
build-tools/xaprepare/xaprepare/Application/EssentialTools.csDeleted (xaprepare essential tools infra removed).
build-tools/xaprepare/xaprepare/Application/DownloadStatus.csDeleted (xaprepare download infra removed).
build-tools/xaprepare/xaprepare/Application/DetermineWindowsVersion.Windows.csDeleted (xaprepare OS detection removed).
build-tools/xaprepare/xaprepare/Application/Context.Windows.csDeleted (xaprepare context removed).
build-tools/xaprepare/xaprepare/Application/Context.MacOS.csDeleted (xaprepare context removed).
build-tools/xaprepare/xaprepare/Application/Context.Linux.csDeleted (xaprepare context removed).
build-tools/xaprepare/xaprepare/Application/CompressionFormat.csDeleted (xaprepare compression infra removed).
build-tools/xaprepare/xaprepare/Application/Characters.csDeleted (xaprepare UI chars removed).
build-tools/xaprepare/xaprepare/Application/AppObject.csDeleted (xaprepare base type removed).
build-tools/xaprepare/xaprepare/app.manifestDeleted (xaprepare Windows manifest removed).
build-tools/xaprepare/xaprepare/App.configDeleted (xaprepare legacy app config removed).
build-tools/xaprepare/xaprepare.slnDeleted (xaprepare solution removed).
build-tools/xaprepare/README.mdDeleted (xaprepare documentation removed).
build-tools/xaprepare/.gitignoreDeleted (xaprepare-specific ignore file removed).
build-tools/scripts/PrepareWindows.targetsRemoves xaprepare build/run steps; repoints Prepare to dotnet + bootstrap/workloads + Java.Interop prepare.
build-tools/scripts/BuildEverything.mkSimplifies jenkins to always make prepare && make leeroy.
build-tools/automation/yaml-templates/setup-jdk-variables.yamlRenames internal variable used to compute JAVA_HOME path ($xaPrepareJdkPath$xaJdkPath).
build-tools/automation/yaml-templates/generate-cgmanifest.yamlRemoves stale comment referencing the old xaprepare step.
build-tools/automation/yaml-templates/copy-extra-result-files.yamlRemoves collection of the now-deleted Configuration.OperatingSystem.props and tidies comment.
build-tools/automation/yaml-templates/commercial-build.yamlDrops PREPARE_CI=1 from make jenkins invocation.
build-tools/automation/yaml-templates/build-macos-steps.yamlDrops PREPARE_CI=1 from make jenkins invocation.
build-tools/automation/yaml-templates/build-linux-steps.yamlDrops PREPARE_CI=1 from make jenkins invocation.
build-tools/automation/azure-pipelines-apidocs.yamlDrops PREPARE_CI=1 from make prepare invocation.
.gitignoreRemoves Configuration.OperatingSystem.props ignore entry since it’s no longer generated.
.github/workflows/copilot-setup-steps.ymlDrops PREPARE_CI=1 from make jenkins invocation.
Comments suppressed due to low confidence (1)

Configuration.props:9

  • 💡 MaintainabilityDoNotLoadOSProperties now only guards importing JdkInfo.props (since Configuration.OperatingSystem.props was removed). Adding a short comment here would prevent future confusion about what this switch actually disables.
 <Import
Project="$(MSBuildThisFileDirectory)external\Java.Interop\bin\Build$(Configuration)\JdkInfo.props"
Condition=" Exists('$(MSBuildThisFileDirectory)external\Java.Interop\bin\Build$(Configuration)\JdkInfo.props') And '$(DoNotLoadOSProperties)' != 'True' "
/>

Comment threadDocumentation/workflow/HowToAddNewApiLevel.md Outdated
jonathanpeppersand others added 4 commits July 2, 2026 11:19
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
xaprepare previously ran `git submodule update` via
Step_PrepareExternalGitDependencies + Context.MainAsync's
SelectedScenario.NeedsGitSubmodules block. With xaprepare gone,
nothing initialized submodules for the `checkout: self` blocks
in azure-pipelines-public.yaml, so the Bootstrap solution build
failed with MSB4019 trying to import
external/xamarin-android-tools/src/Microsoft.Android.Build.BaseTasks/MSBuildReferences.projitems.
Add `submodules: recursive` to the three `checkout: self` steps
(macOS, Windows, Linux) to match azure-pipelines-nightly.yaml,
azure-pipelines-apidocs.yaml, azure-pipelines.yaml, and
stage-java-interop-tests.yaml (all already set it).
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
xaprepare's Context.WriteBuildToolsInventoryCsv() produced
bin/Build$(Configuration)/buildtoolsinventory.csv listing the
Android SDK/NDK/JDK/dotnet component versions, required by
Section 4.e.i.D of the Executive Order on Cybersecurity build
system security requirements (per PR #6833). The file is
consumed as the AndroidBuildToolsInventory pipeline artifact
by build-macos-steps.yaml, build-macos.yaml (1ES), and
commercial-build.yaml.
With xaprepare gone this file was no longer being generated,
so the macOS `upload build tools inventory` task failed with:
Path does not exist: .../bin/BuildRelease/buildtoolsinventory.csv
Add build-tools/build-tools-inventory/build-tools-inventory.proj
which reads the versions from Configuration.props, eng/Versions.props,
and the _PlatformPackage ItemGroup in androidsdk.targets (the
single sources of truth) and writes the CSV via WriteLinesToFile.
Wire it into Makefile `prepare` and PrepareWindows.targets `Prepare`
so the file is produced by `make prepare` and `build.cmd -t:Prepare`.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
xaprepare's Step_GenerateCGManifest ran on every CI `make prepare`
invocation (because `PREPARE_CI=1` implied `-a` which selected
Scenario_Standard). generate-cgmanifest.yaml was wired into
build-linux-steps, build-macos-steps, build-windows-steps, and
commercial-build, but the internal 1ES apidocs pipeline was
missed. Component Governance depends on the manifest for git
submodule registrations that its native detectors can't
enumerate.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

@simonrozsivalsimonrozsival left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@simonrozsival
simonrozsival merged commit be5272c into mainJul 3, 2026
42 checks passed
@simonrozsival
simonrozsival deleted the jonathanpeppers-xaprepare-d1-ndk-os-info branch July 3, 2026 07:06
jonathanpeppers added a commit that referenced this pull request Jul 16, 2026
## Summary
- delete the unused `Android`, `Emulator`, and legacy `JdkInfo` BootstrapTasks
- move the one surviving trace logger adapter into `CheckApiCompatibility`
- remove BootstrapTasks' `Xamarin.Android.Tools.AndroidSdk` dependency by parsing the three API metadata fields used by `GenerateSupportedPlatforms` directly
- delete the redundant `Xamarin.Android.BootstrapTasks.sln` and build BootstrapTasks directly in CI
- make `build-tools/scripts/Prepare.proj` the cross-platform source of truth for post-install Prepare orchestration
- delete `PrepareWindows.targets` by moving its Windows-only .NET installation and toolchain-path guard into `Prepare.proj`
This follows the wholesale xaprepare removal in #11959.
## BootstrapTasks cleanup
The deleted `Android` and `Emulator` wrappers had no task registration or invocation. The deleted `JdkInfo` task was superseded by `Java.Interop.BootstrapTasks.JdkInfo`; its only remaining indirect use was a generic logger callback used by `CheckApiCompatibility`.
The initial dependency audit also surfaced a narrow surviving use of `AndroidVersion` and `AndroidVersions` in `GenerateSupportedPlatforms`. That task only needed `VersionCodeFull`, target-framework version ordering, and `Stable`, so it now parses those existing item metadata values directly while preserving the prior max-stable and supported-platform ordering semantics. This removes the broader `Xamarin.Android.Tools.AndroidSdk` project reference without duplicating its model.
`Xamarin.Android.BootstrapTasks.sln` only contained BootstrapTasks and `xa-prep-tasks`, which is already a BootstrapTasks project reference. Its Makefile, Windows, and Azure Pipelines consumers now use the project/common orchestrator directly.
## Prepare orchestration
| Before | After |
| --- | --- |
| Unix Makefile listed four commands | Unix installs .NET, then invokes `Prepare.proj` once |
| `PrepareWindows.targets` installed .NET and listed the same four operations | The solution imports `Prepare.proj`, which installs .NET and checks the toolchain path on Windows |
| Java.Interop was called separately by each wrapper | `Prepare.proj` imports `DotNet.targets` and calls the existing `PrepareJavaInterop` target |
`Prepare.proj` preserves this order:
1. restore/build BootstrapTasks
2. restore/build workloads
3. run `PrepareJavaInterop` and its `PrepareOpenJDK` dependency
4. build the build-tools inventory
The Unix wrapper launches the orchestrator with system `dotnet`; imported `DotNet.targets` continues to use the repo-local `$(DotNetPreviewTool)` for Java.Interop.
On Windows, `Prepare.proj` also owns the conditional .NET installation and Android toolchain path guard previously kept in `PrepareWindows.targets`.
## Verification
- `dotnet build build-tools\Xamarin.Android.Tools.BootstrapTasks\Xamarin.Android.Tools.BootstrapTasks.csproj -c Debug`: passed, 0 warnings
- `build.cmd -t:Prepare -c Debug`: passed end to end
- expected outputs confirmed:
- `bin\BuildDebug\net10.0\Xamarin.Android.Tools.BootstrapTasks.dll`
- `external\Java.Interop\bin\BuildDebug\JdkInfo.props`
- `bin\BuildDebug\buildtoolsinventory.csv`
- system-`dotnet` invocation of `Prepare.proj`: passed, 0 warnings; binlog inspected with `binlogtool`
- `dotnet-local.cmd build src\Xamarin.Android.Build.Tasks\Xamarin.Android.Build.Tasks.csproj -c Debug`: passed with 17 pre-existing generated-code/Javac warnings
- old solution/task/orchestration references: no matches
- GNU make was unavailable on the Windows host; the equivalent system-`dotnet` command emitted by `SYSTEM_DOTNET_BINLOG` was run directly instead
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Šimon Rozsíval <simon@rozsival.com>
@github-actionsgithub-actionsBot locked and limited conversation to collaborators Aug 2, 2026
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@jonathanpeppers@simonrozsival
, 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
Skip to content

[xaprepare] Delete Configuration.OperatingSystem.props generator and xaprepare project - #11959

Merged
simonrozsival merged 5 commits into
mainfrom
jonathanpeppers-xaprepare-d1-ndk-os-info
Jul 3, 2026
Merged

[xaprepare] Delete Configuration.OperatingSystem.props generator and xaprepare project#11959
simonrozsival merged 5 commits into
mainfrom
jonathanpeppers-xaprepare-d1-ndk-os-info

Conversation

@jonathanpeppers

Copy link
Copy Markdown
Member

Follow-up to #11956, which moved the JDK half of Configuration.OperatingSystem.props to Java.Interop's JdkInfo.props. The remaining NDK / OS-info half has zero real consumers, so this PR:

  1. Deletes the last generator template (Configuration.OperatingSystem.props.in).
  2. Cascades through Step_GenerateFiles, both Scenario_* classes (which now had zero steps), and every supporting OperatingSystems/, Context.*OS.cs, EssentialTools.*, ToolRunners/*, Configurables.*, Application/*, and Main.cs file that only existed to feed the scenarios.
  3. Deletes the whole build-tools/xaprepare/ project.
  4. Patches every integration point (Makefile, PrepareWindows.targets, BuildEverything.mk, CI YAML, docs) so build.cmd -t:Prepare and make prepare still work end-to-end.

Configuration.OperatingSystem.props.in placeholder audit

PlaceholderConsumers outside the .in fileAction
HostOsNamenonedrop
HostOsFlavornonedrop
HostOsReleasenonedrop
HostBitsnone (ArchiveBase.HostBits in src/Xamarin.Installer.AndroidSDK/ is an unrelated C# property)drop
NdkLlvmTagnone (the NDK toolchain OS tag is resolved elsewhere via _NdkToolchainOSTag in androidsdk.targets)drop
HostCpuCountonly Configuration.props:72 via $(MakeConcurrency)drop

$(MakeConcurrency) audit

The only definition was Configuration.props:72. A repo-wide grep of .targets, .props, .projitems, Makefile, and .mk files found zero consumers of the MSBuild property. The MakeConcurrency hits under build-tools/xaprepare/ were an unrelated C# Context.MakeConcurrency property.

Result: dropped the MakeConcurrency MSBuild property entirely (no $([System.Environment]::ProcessorCount) replacement needed) and removed the $(MakeConcurrency) bullet in Documentation/building/configuration.md.

xaprepare integration audit (grep-confirmed, patched here)

LocationChange
build-tools/xaprepare/ (entire tree)deleted — 86 tracked files
Configuration.propsdropped <Import> of the generated OS props, dropped MakeConcurrency, tidied the "between xaprepare and package creation tools" comment
.gitignoredropped Configuration.OperatingSystem.props
build-tools/scripts/PrepareWindows.targetsremoved _XAPrepareExe, _XAPrepareStandardArgs, _BuildXAPrepare target, and the Exec dotnet $(_XAPrepareExe) line. Repointed Prepare at _InstallDotNet. Kept the space-in-path guard, BootstrapTasks / workloads MSBuilds, and PrepareJavaInterop
Makefiledropped PREPARE_PROJECT, PREPARE_NET_FX, PREPARE_ARGS, PREPARE_MSBUILD_FLAGS, PREPARE_SCENARIO, PREPARE_CI_PR, PREPARE_CI, _PREPARE_CI_MODE_*, _PREPARE_ARGS, and all their conditionals. Dropped the dotnet run --project xaprepare.csproj line from prepare. Deleted the prepare-help target
build-tools/scripts/BuildEverything.mkjenkins no longer branches on PREPARE_CI_PR/PREPARE_CI; just $(MAKE) prepare && $(MAKE) leeroy
.github/workflows/copilot-setup-steps.ymldropped now-unused PREPARE_CI=1
build-tools/automation/azure-pipelines-apidocs.yamldropped PREPARE_CI=1
build-tools/automation/yaml-templates/build-linux-steps.yamldropped PREPARE_CI=1
build-tools/automation/yaml-templates/build-macos-steps.yamldropped PREPARE_CI=1
build-tools/automation/yaml-templates/commercial-build.yamldropped PREPARE_CI=1
build-tools/automation/yaml-templates/copy-extra-result-files.yamldropped **/Configuration.OperatingSystem.props glob and the stale Step_CopyExtraResultFilesForCI xaprepare-step comment
build-tools/automation/yaml-templates/generate-cgmanifest.yamldropped the stale Step_GenerateCGManifest xaprepare-step comment
build-tools/automation/yaml-templates/setup-jdk-variables.yamlrenamed $xaPrepareJdkPath$xaJdkPath for hygiene
Documentation/workflow/HowToAddNewApiLevel.mdrewrote the "Add New Platform" section to point at <_PlatformPackage> entries in src/androidsdk/androidsdk.targets instead of AndroidToolchain.cs; updated the --android-sdk-platforms=all recipe to dotnet-local build src/androidsdk/androidsdk.csproj -p:AndroidSdkPlatforms=all
Documentation/building/unix/dependencies.mdJDK-version link now points at $(MicrosoftOpenJDKVersion) in /Configuration.props instead of the deleted Configurables.cs
Documentation/building/configuration.mdremoved the $(MakeConcurrency) bullet

Historical breadcrumb comments left as-is (still accurate and useful for git-archaeology):

  • .github/skills/update-tpn/SKILL.md
  • src/AndroidBuildConfig/AndroidBuildConfig.csproj
  • src/androidsdk/androidsdk.targets
  • src/native/cmake-config/cmake-config.csproj
  • src/workloads/workloads.csproj

Verification

  • build.cmd Prepare — succeeded end-to-end on Windows (0 warnings, 0 errors). The trimmed Prepare target ran through _InstallDotNet, the space-in-path guard, Xamarin.Android.BootstrapTasks.sln, src/workloads/workloads.csproj, and PrepareJavaInterop.
  • dotnet build src\Xamarin.Android.Build.Tasks\Xamarin.Android.Build.Tasks.csproj -c Debug — 0 errors (93 pre-existing warnings from src/Mono.Android/ and generated MCW, unrelated to this change).
  • Repo-wide grep for HostOsName, HostOsFlavor, HostOsRelease, HostCpuCount, NdkLlvmTag, and the MSBuild MakeConcurrency property — clean.
  • Repo-wide grep for xaprepare — clean apart from the five intentional historical breadcrumb comments listed above.

Diff stat

102 files changed, 25 insertions(+), 7891 deletions(-).

Precedent chain

Continues the multi-slice teardown started by #11568, #11580, #11608, #11613, #11631, #11731, #11732, #11733, #11737, #11740, #11760, #11803, #11821, #11825, #11826, #11945, #11946, #11956.

Co-authored-by: Copilot App 223556219+Copilot@users.noreply.github.com

…xaprepare project
Follow-up to #11956 (which moved the JDK half of
`Configuration.OperatingSystem.props` to Java.Interop's `JdkInfo.props`).
The remaining NDK/OS-info half has zero real consumers, so this change
removes the last generator, cascades through the two Scenarios that only
existed to run it, and deletes the whole `build-tools/xaprepare/` project.
Every integration point (Makefile, PrepareWindows.targets, CI YAML, docs)
is updated in the same commit so `build.cmd -t:Prepare` and `make prepare`
still work end-to-end.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
CopilotAI review requested due to automatic review settings July 2, 2026 16:08

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR completes the xaprepare teardown by deleting the remaining Configuration.OperatingSystem.props generator (and its now-dead scenario/OS/tooling scaffolding), removing the entire build-tools/xaprepare/ project, and updating build/CI/docs so make prepare / build.cmd -t:Prepare continue to work without xaprepare.

Changes:

  • Remove generation + import of Configuration.OperatingSystem.props, and drop the unused MakeConcurrency MSBuild property.
  • Delete the build-tools/xaprepare/ project tree and the supporting scenario/OS/tool-runner/config code that only existed for xaprepare.
  • Update Makefile/Windows Prepare target/CI YAML templates and docs to remove xaprepare integration points and point at src/androidsdk/androidsdk.targets/androidsdk.csproj for platform provisioning.

Reviewed changes

Copilot reviewed 101 out of 102 changed files in this pull request and generated 1 comment.

Show a summary per file
FileDescription
MakefileRemoves xaprepare invocation/flags from prepare and deletes prepare-help.
Documentation/workflow/HowToAddNewApiLevel.mdUpdates “add platform” guidance to edit src/androidsdk/androidsdk.targets and uses src/androidsdk/androidsdk.csproj to install platforms.
Documentation/building/unix/dependencies.mdRepoints “current JDK version” reference to $(MicrosoftOpenJDKVersion) in Configuration.props.
Documentation/building/configuration.mdRemoves the $(MakeConcurrency) documentation entry.
Configuration.propsDrops OS-props import and the MakeConcurrency definition; retains only JdkInfo import + related comments.
build-tools/xaprepare/xaprepare/xaprepare.targetsDeleted (xaprepare build-time file generation targets removed).
build-tools/xaprepare/xaprepare/xaprepare.csprojDeleted (xaprepare app project removed).
build-tools/xaprepare/xaprepare/ToolRunners/ToolRunner.OutputSink.csDeleted (xaprepare tool-runner logging sink removed).
build-tools/xaprepare/xaprepare/ToolRunners/ToolRunner.csDeleted (xaprepare tool-runner base removed).
build-tools/xaprepare/xaprepare/ToolRunners/TarRunner.OutputSink.csDeleted (xaprepare tar runner removed).
build-tools/xaprepare/xaprepare/ToolRunners/TarRunner.csDeleted (xaprepare tar runner removed).
build-tools/xaprepare/xaprepare/ToolRunners/SevenZipRunner.OutputSink.csDeleted (xaprepare 7zip runner removed).
build-tools/xaprepare/xaprepare/ToolRunners/SevenZipRunner.csDeleted (xaprepare 7zip runner removed).
build-tools/xaprepare/xaprepare/ToolRunners/GitRunner.OutputSink.csDeleted (xaprepare git runner removed).
build-tools/xaprepare/xaprepare/ToolRunners/GitRunner.csDeleted (xaprepare git runner removed).
build-tools/xaprepare/xaprepare/Steps/Step_GenerateFiles.csDeleted (last generator for Configuration.OperatingSystem.props removed).
build-tools/xaprepare/xaprepare/Scenarios/Scenario_Standard.csDeleted (scenario now empty post-generator removal).
build-tools/xaprepare/xaprepare/Scenarios/Scenario_Required.csDeleted (scenario now empty post-generator removal).
build-tools/xaprepare/xaprepare/Resources/Configuration.OperatingSystem.props.inDeleted (last template removed).
build-tools/xaprepare/xaprepare/OperatingSystems/Windows.csDeleted (xaprepare OS model removed).
build-tools/xaprepare/xaprepare/OperatingSystems/Unix.csDeleted (xaprepare OS model removed).
build-tools/xaprepare/xaprepare/OperatingSystems/NoOS.csDeleted (xaprepare OS model removed).
build-tools/xaprepare/xaprepare/OperatingSystems/MacOS.csDeleted (xaprepare OS model removed).
build-tools/xaprepare/xaprepare/OperatingSystems/Linux.UbuntuCommon.csDeleted (xaprepare OS model removed).
build-tools/xaprepare/xaprepare/OperatingSystems/Linux.csDeleted (xaprepare OS model removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Dependencies/Windows.csDeleted (xaprepare dependency stubs removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Dependencies/MacOS.csDeleted (xaprepare dependency stubs removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Dependencies/Linux.UbuntuCommon.csDeleted (xaprepare dependency stubs removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Dependencies/Linux.Ubuntu.csDeleted (xaprepare dependency stubs removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Dependencies/Linux.Mint.csDeleted (xaprepare dependency stubs removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Dependencies/Linux.Gentoo.csDeleted (xaprepare dependency stubs removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Dependencies/Linux.Fedora.csDeleted (xaprepare dependency stubs removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Dependencies/Linux.DebianCommon.csDeleted (xaprepare dependency stubs removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Dependencies/Linux.Debian.csDeleted (xaprepare dependency stubs removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Dependencies/Linux.Arch.csDeleted (xaprepare dependency stubs removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Configurables.Windows.csDeleted (xaprepare configurables removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Configurables.Unix.csDeleted (xaprepare configurables removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Configurables.MacOS.csDeleted (xaprepare configurables removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Configurables.Linux.csDeleted (xaprepare configurables removed).
build-tools/xaprepare/xaprepare/ConfigAndData/Configurables.csDeleted (xaprepare configurables removed).
build-tools/xaprepare/xaprepare/BuildInfo.cs.inDeleted (xaprepare generated build-info removed).
build-tools/xaprepare/xaprepare/Application/VersionFetchers.csDeleted (xaprepare version parsing infra removed).
build-tools/xaprepare/xaprepare/Application/Utilities.Windows.csDeleted (xaprepare utilities removed).
build-tools/xaprepare/xaprepare/Application/Utilities.Unix.csDeleted (xaprepare utilities removed).
build-tools/xaprepare/xaprepare/Application/ThumbTwiddler.csDeleted (xaprepare TUI/progress UI removed).
build-tools/xaprepare/xaprepare/Application/Step.csDeleted (xaprepare step infra removed).
build-tools/xaprepare/xaprepare/Application/SizeFormatter.csDeleted (xaprepare utility removed).
build-tools/xaprepare/xaprepare/Application/SimpleActionStep.csDeleted (xaprepare step infra removed).
build-tools/xaprepare/xaprepare/Application/SevenZipVersionParser.csDeleted (xaprepare version parsing removed).
build-tools/xaprepare/xaprepare/Application/ScenarioNoScenario.csDeleted (xaprepare scenario infra removed).
build-tools/xaprepare/xaprepare/Application/ScenarioAttribute.csDeleted (xaprepare scenario infra removed).
build-tools/xaprepare/xaprepare/Application/Scenario.csDeleted (xaprepare scenario infra removed).
build-tools/xaprepare/xaprepare/Application/RegexProgramVersionParser.csDeleted (xaprepare version parsing removed).
build-tools/xaprepare/xaprepare/Application/PropertiesChangedEventArgs.csDeleted (xaprepare property infra removed).
build-tools/xaprepare/xaprepare/Application/Properties.Defaults.cs.inDeleted (xaprepare generated defaults removed).
build-tools/xaprepare/xaprepare/Application/Properties.csDeleted (xaprepare property infra removed).
build-tools/xaprepare/xaprepare/Application/ProgramVersionParser.csDeleted (xaprepare version parsing removed).
build-tools/xaprepare/xaprepare/Application/Program.csDeleted (xaprepare dependency infra removed).
build-tools/xaprepare/xaprepare/Application/ProcessStandardStreamWrapper.csDeleted (xaprepare process output wrapper removed).
build-tools/xaprepare/xaprepare/Application/LoggingVerbosity.csDeleted (xaprepare logging infra removed).
build-tools/xaprepare/xaprepare/Application/Log.Windows.csDeleted (xaprepare logging infra removed).
build-tools/xaprepare/xaprepare/Application/Log.Unix.csDeleted (xaprepare logging infra removed).
build-tools/xaprepare/xaprepare/Application/KnownProperties.csDeleted (xaprepare property constants removed).
build-tools/xaprepare/xaprepare/Application/KnownConditions.csDeleted (xaprepare condition constants removed).
build-tools/xaprepare/xaprepare/Application/GeneratedPlaceholdersFile.csDeleted (xaprepare generator infra removed).
build-tools/xaprepare/xaprepare/Application/GeneratedFile.csDeleted (xaprepare generator infra removed).
build-tools/xaprepare/xaprepare/Application/Extensions.DictionaryOfProgramVersionParser.csDeleted (xaprepare helper removed).
build-tools/xaprepare/xaprepare/Application/ExecutionMode.csDeleted (xaprepare execution-mode infra removed).
build-tools/xaprepare/xaprepare/Application/EssentialTools.Unix.csDeleted (xaprepare essential tools infra removed).
build-tools/xaprepare/xaprepare/Application/EssentialTools.MacOS.csDeleted (xaprepare essential tools infra removed).
build-tools/xaprepare/xaprepare/Application/EssentialTools.Linux.csDeleted (xaprepare essential tools infra removed).
build-tools/xaprepare/xaprepare/Application/EssentialTools.csDeleted (xaprepare essential tools infra removed).
build-tools/xaprepare/xaprepare/Application/DownloadStatus.csDeleted (xaprepare download infra removed).
build-tools/xaprepare/xaprepare/Application/DetermineWindowsVersion.Windows.csDeleted (xaprepare OS detection removed).
build-tools/xaprepare/xaprepare/Application/Context.Windows.csDeleted (xaprepare context removed).
build-tools/xaprepare/xaprepare/Application/Context.MacOS.csDeleted (xaprepare context removed).
build-tools/xaprepare/xaprepare/Application/Context.Linux.csDeleted (xaprepare context removed).
build-tools/xaprepare/xaprepare/Application/CompressionFormat.csDeleted (xaprepare compression infra removed).
build-tools/xaprepare/xaprepare/Application/Characters.csDeleted (xaprepare UI chars removed).
build-tools/xaprepare/xaprepare/Application/AppObject.csDeleted (xaprepare base type removed).
build-tools/xaprepare/xaprepare/app.manifestDeleted (xaprepare Windows manifest removed).
build-tools/xaprepare/xaprepare/App.configDeleted (xaprepare legacy app config removed).
build-tools/xaprepare/xaprepare.slnDeleted (xaprepare solution removed).
build-tools/xaprepare/README.mdDeleted (xaprepare documentation removed).
build-tools/xaprepare/.gitignoreDeleted (xaprepare-specific ignore file removed).
build-tools/scripts/PrepareWindows.targetsRemoves xaprepare build/run steps; repoints Prepare to dotnet + bootstrap/workloads + Java.Interop prepare.
build-tools/scripts/BuildEverything.mkSimplifies jenkins to always make prepare && make leeroy.
build-tools/automation/yaml-templates/setup-jdk-variables.yamlRenames internal variable used to compute JAVA_HOME path ($xaPrepareJdkPath$xaJdkPath).
build-tools/automation/yaml-templates/generate-cgmanifest.yamlRemoves stale comment referencing the old xaprepare step.
build-tools/automation/yaml-templates/copy-extra-result-files.yamlRemoves collection of the now-deleted Configuration.OperatingSystem.props and tidies comment.
build-tools/automation/yaml-templates/commercial-build.yamlDrops PREPARE_CI=1 from make jenkins invocation.
build-tools/automation/yaml-templates/build-macos-steps.yamlDrops PREPARE_CI=1 from make jenkins invocation.
build-tools/automation/yaml-templates/build-linux-steps.yamlDrops PREPARE_CI=1 from make jenkins invocation.
build-tools/automation/azure-pipelines-apidocs.yamlDrops PREPARE_CI=1 from make prepare invocation.
.gitignoreRemoves Configuration.OperatingSystem.props ignore entry since it’s no longer generated.
.github/workflows/copilot-setup-steps.ymlDrops PREPARE_CI=1 from make jenkins invocation.
Comments suppressed due to low confidence (1)

Configuration.props:9

  • 💡 MaintainabilityDoNotLoadOSProperties now only guards importing JdkInfo.props (since Configuration.OperatingSystem.props was removed). Adding a short comment here would prevent future confusion about what this switch actually disables.
 <Import
Project="$(MSBuildThisFileDirectory)external\Java.Interop\bin\Build$(Configuration)\JdkInfo.props"
Condition=" Exists('$(MSBuildThisFileDirectory)external\Java.Interop\bin\Build$(Configuration)\JdkInfo.props') And '$(DoNotLoadOSProperties)' != 'True' "
/>

Comment threadDocumentation/workflow/HowToAddNewApiLevel.md Outdated
jonathanpeppersand others added 4 commits July 2, 2026 11:19
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
xaprepare previously ran `git submodule update` via
Step_PrepareExternalGitDependencies + Context.MainAsync's
SelectedScenario.NeedsGitSubmodules block. With xaprepare gone,
nothing initialized submodules for the `checkout: self` blocks
in azure-pipelines-public.yaml, so the Bootstrap solution build
failed with MSB4019 trying to import
external/xamarin-android-tools/src/Microsoft.Android.Build.BaseTasks/MSBuildReferences.projitems.
Add `submodules: recursive` to the three `checkout: self` steps
(macOS, Windows, Linux) to match azure-pipelines-nightly.yaml,
azure-pipelines-apidocs.yaml, azure-pipelines.yaml, and
stage-java-interop-tests.yaml (all already set it).
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
xaprepare's Context.WriteBuildToolsInventoryCsv() produced
bin/Build$(Configuration)/buildtoolsinventory.csv listing the
Android SDK/NDK/JDK/dotnet component versions, required by
Section 4.e.i.D of the Executive Order on Cybersecurity build
system security requirements (per PR #6833). The file is
consumed as the AndroidBuildToolsInventory pipeline artifact
by build-macos-steps.yaml, build-macos.yaml (1ES), and
commercial-build.yaml.
With xaprepare gone this file was no longer being generated,
so the macOS `upload build tools inventory` task failed with:
Path does not exist: .../bin/BuildRelease/buildtoolsinventory.csv
Add build-tools/build-tools-inventory/build-tools-inventory.proj
which reads the versions from Configuration.props, eng/Versions.props,
and the _PlatformPackage ItemGroup in androidsdk.targets (the
single sources of truth) and writes the CSV via WriteLinesToFile.
Wire it into Makefile `prepare` and PrepareWindows.targets `Prepare`
so the file is produced by `make prepare` and `build.cmd -t:Prepare`.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
xaprepare's Step_GenerateCGManifest ran on every CI `make prepare`
invocation (because `PREPARE_CI=1` implied `-a` which selected
Scenario_Standard). generate-cgmanifest.yaml was wired into
build-linux-steps, build-macos-steps, build-windows-steps, and
commercial-build, but the internal 1ES apidocs pipeline was
missed. Component Governance depends on the manifest for git
submodule registrations that its native detectors can't
enumerate.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

@simonrozsivalsimonrozsival left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@simonrozsival
simonrozsival merged commit be5272c into mainJul 3, 2026
42 checks passed
@simonrozsival
simonrozsival deleted the jonathanpeppers-xaprepare-d1-ndk-os-info branch July 3, 2026 07:06
jonathanpeppers added a commit that referenced this pull request Jul 16, 2026
## Summary
- delete the unused `Android`, `Emulator`, and legacy `JdkInfo` BootstrapTasks
- move the one surviving trace logger adapter into `CheckApiCompatibility`
- remove BootstrapTasks' `Xamarin.Android.Tools.AndroidSdk` dependency by parsing the three API metadata fields used by `GenerateSupportedPlatforms` directly
- delete the redundant `Xamarin.Android.BootstrapTasks.sln` and build BootstrapTasks directly in CI
- make `build-tools/scripts/Prepare.proj` the cross-platform source of truth for post-install Prepare orchestration
- delete `PrepareWindows.targets` by moving its Windows-only .NET installation and toolchain-path guard into `Prepare.proj`
This follows the wholesale xaprepare removal in #11959.
## BootstrapTasks cleanup
The deleted `Android` and `Emulator` wrappers had no task registration or invocation. The deleted `JdkInfo` task was superseded by `Java.Interop.BootstrapTasks.JdkInfo`; its only remaining indirect use was a generic logger callback used by `CheckApiCompatibility`.
The initial dependency audit also surfaced a narrow surviving use of `AndroidVersion` and `AndroidVersions` in `GenerateSupportedPlatforms`. That task only needed `VersionCodeFull`, target-framework version ordering, and `Stable`, so it now parses those existing item metadata values directly while preserving the prior max-stable and supported-platform ordering semantics. This removes the broader `Xamarin.Android.Tools.AndroidSdk` project reference without duplicating its model.
`Xamarin.Android.BootstrapTasks.sln` only contained BootstrapTasks and `xa-prep-tasks`, which is already a BootstrapTasks project reference. Its Makefile, Windows, and Azure Pipelines consumers now use the project/common orchestrator directly.
## Prepare orchestration
| Before | After |
| --- | --- |
| Unix Makefile listed four commands | Unix installs .NET, then invokes `Prepare.proj` once |
| `PrepareWindows.targets` installed .NET and listed the same four operations | The solution imports `Prepare.proj`, which installs .NET and checks the toolchain path on Windows |
| Java.Interop was called separately by each wrapper | `Prepare.proj` imports `DotNet.targets` and calls the existing `PrepareJavaInterop` target |
`Prepare.proj` preserves this order:
1. restore/build BootstrapTasks
2. restore/build workloads
3. run `PrepareJavaInterop` and its `PrepareOpenJDK` dependency
4. build the build-tools inventory
The Unix wrapper launches the orchestrator with system `dotnet`; imported `DotNet.targets` continues to use the repo-local `$(DotNetPreviewTool)` for Java.Interop.
On Windows, `Prepare.proj` also owns the conditional .NET installation and Android toolchain path guard previously kept in `PrepareWindows.targets`.
## Verification
- `dotnet build build-tools\Xamarin.Android.Tools.BootstrapTasks\Xamarin.Android.Tools.BootstrapTasks.csproj -c Debug`: passed, 0 warnings
- `build.cmd -t:Prepare -c Debug`: passed end to end
- expected outputs confirmed:
- `bin\BuildDebug\net10.0\Xamarin.Android.Tools.BootstrapTasks.dll`
- `external\Java.Interop\bin\BuildDebug\JdkInfo.props`
- `bin\BuildDebug\buildtoolsinventory.csv`
- system-`dotnet` invocation of `Prepare.proj`: passed, 0 warnings; binlog inspected with `binlogtool`
- `dotnet-local.cmd build src\Xamarin.Android.Build.Tasks\Xamarin.Android.Build.Tasks.csproj -c Debug`: passed with 17 pre-existing generated-code/Javac warnings
- old solution/task/orchestration references: no matches
- GNU make was unavailable on the Windows host; the equivalent system-`dotnet` command emitted by `SYSTEM_DOTNET_BINLOG` was run directly instead
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Šimon Rozsíval <simon@rozsival.com>
@github-actionsgithub-actionsBot locked and limited conversation to collaborators Aug 2, 2026
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@jonathanpeppers@simonrozsival