Repository navigation
[Java.Interop] Remove obsolete standalone build infrastructure - #13222
Merged
Merged
Conversation
Retain the live solution preparation hook and shared JDK/tooling workflows while removing the retired desktop runner, unused native build helpers, and unreferenced internal bootstrap tasks. Co-authored-by: Copilot App <[email protected]>
Contributor
There was a problem hiding this comment.
🔵 Needs a closer look
Windows task-host behavior and outer Android build integration remain unvalidated for the live preparation-path changes.
No open issues 🎉
What changed in this PR
Removes obsolete Java.Interop standalone build infrastructure as part of #11843, while preserving Android preparation and retained tooling tests.
Changes:
- Deletes the legacy Mono/NUnit runner, native build helpers, and unused bootstrap tasks.
- Removes runner-only package metadata and desktop test pipeline configuration.
- Preserves
Prepareby relocating_TopDirand registering JDK discovery with the .NET task host.
| File | Description |
|---|---|
| external/Java.Interop/Directory.Build.props | Removes obsolete package-path import and CMake default. |
| external/Java.Interop/build-tools/scripts/RunNUnitTests.targets | Deletes legacy Mono/NUnit runner. |
| external/Java.Interop/build-tools/scripts/RunCmake.proj | Deletes unused CMake wrapper. |
| external/Java.Interop/build-tools/scripts/Prepare.targets | Preserves root path and updates JDK task hosting. |
| external/Java.Interop/build-tools/scripts/NativeToolchain.targets | Deletes desktop toolchain setup. |
| external/Java.Interop/build-tools/scripts/msbuild.mk | Deletes unused MSBuild make helper. |
| external/Java.Interop/build-tools/Java.Interop.BootstrapTasks/Java.Interop.BootstrapTasks/SetEnvironmentVariable.cs | Deletes runner-only environment task. |
| external/Java.Interop/build-tools/Java.Interop.BootstrapTasks/Java.Interop.BootstrapTasks/ParseAndroidResources.cs | Deletes unused resource parser. |
| external/Java.Interop/build-tools/Java.Interop.BootstrapTasks/Java.Interop.BootstrapTasks/OS.cs | Deletes unused platform helper. |
| external/Java.Interop/build-tools/Java.Interop.BootstrapTasks/Java.Interop.BootstrapTasks/JdkInfo.cs | Removes unused JVM make export. |
| external/Java.Interop/build-tools/Java.Interop.BootstrapTasks/Java.Interop.BootstrapTasks/DownloadUri.cs | Deletes unused download task. |
| external/Java.Interop/build-tools/Java.Interop.BootstrapTasks/Java.Interop.BootstrapTasks.targets | Removes runner package-path generation; retains versioning. |
| external/Java.Interop/build-tools/Java.Interop.BootstrapTasks/Java.Interop.BootstrapTasks.csproj | Removes bootstrap NUnit-console dependency. |
| external/Java.Interop/build-tools/automation/templates/core-tests.yaml | Removes desktop interop test step and switches. |
| external/Java.Interop/before.Java.Interop.sln.targets | Removes runner import; retains preparation hook. |
Review effort: Balanced
jonathanpeppers
approved these changes
Oct 21, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #11843.
The standalone core host-JVM harness and desktop native projects have already been retired, but their Mono/NUnit runner, native build helpers, and bootstrap metadata remain. The old runner looks under
bin/TestDebugand invokes Mono, while retained tooling tests target .NET 10 and usebin/TestDebug-net10.0.Remove the obsolete runner/import, its only environment-setting task, runner-only
PackagePaths.propsgeneration and bootstrap NUnit-console dependency, unusedNativeToolchain.targets/RunCmake.proj/msbuild.mk, and unreferenced internal bootstrapDownloadUri,ParseAndroidResources, andOSimplementations. Also remove the desktopJava.Interop-Testspipeline step/native-test switches and the unusedJI_JVM_PATHmake export.Preserve the live
Prepareentry point:before.Java.Interop.sln.targetsis implicitly loaded forJava.Interop.slnx, and the outer Android build calls it. Move_TopDirintoPrepare.targetsbecause it was previously supplied by the deleted runner, and register the retained internal JDK task with the required .NET task host.Shared JDK discovery, JDK tool paths and remaining generated metadata, bootstrap versioning, all nine host tooling test suites,
java-source-utils, generator/class-parse/Maven/bytecode/JavaSource/TypeNameMappings, AndroidNativeAOT, and core Android tests remain. Test-project NUnit-console references and VS Code developer configuration are deliberately retained rather than assuming those developer contracts can be deleted. No shipped interop API or memory-safety code changes.Local validation
The commands below use
LOGS=/Users/simon/.copilot/session-state/95e52377-5b58-4ab0-8442-c0ce92f1b8b2/filesfor local diagnostic artifacts. Builds were bounded to one MSBuild/Gradle worker with build servers disabled.dotnet build external/Java.Interop/Java.Interop.slnx -t:Prepare -c Debug -m:1 --disable-build-servers -nr:false -p:UseSharedCompilation=false -p:GradleArgs='--stacktrace --no-daemon --max-workers=1 -Pkotlin.compiler.execution.strategy=in-process' -v:minimal -bl:$LOGS/prepare.binlog— passed, 25.21s, zero warnings/errors. Verified generated JDK executable paths still exist,JdkInfo.mkretains its other exports, and noPackagePaths.propsis generated.dotnet build external/Java.Interop/Java.Interop.slnx --no-restore -c Debug -m:1 --disable-build-servers -nr:false -p:UseSharedCompilation=false -p:GradleArgs='--stacktrace --no-daemon --max-workers=1 -Pkotlin.compiler.execution.strategy=in-process' -v:minimal -bl:$LOGS/tooling-build.binlog— passed, 2m19.36s, zero warnings/errors. The same no-change command with-bl:$LOGS/tooling-incremental.binlogalso passed, 11.97s, zero warnings/errors.dotnet test external/Java.Interop/Java.Interop.slnx --no-build --no-restore -c Debug -m:1 --disable-build-servers -nr:false -p:UseSharedCompilation=false --logger 'trx;LogFilePrefix=tooling' --results-directory $LOGS/test-results -v:minimal— 799 passed, 1 existing failure, 2 skipped across all nine tooling suites. The sole failure is unchangedModuleInfoTests.ClassFile: constant pool expected 12, actual 13 with auto-discoveredjavac 23.0.2.dotnet build external/Java.Interop/tools/java-source-utils/java-source-utils.csproj -t:RunTests --no-restore -c Debug -m:1 --disable-build-servers -nr:false -p:UseSharedCompilation=false -p:GradleArgs='--stacktrace --no-daemon --max-workers=1 -Pkotlin.compiler.execution.strategy=in-process' -v:minimal -bl:$LOGS/java-source-utils-tests.binlog— passed, 18 tests across four suites; six existing obsolete-Java-8-option warnings.dotnet msbuild external/Java.Interop/Java.Interop.slnx -t:ValidateSolutionConfiguration -v:diag -nologo— passed before and after the change; confirms the implicit solution hook and preserved_TopDir.git diff --check— passed; changed XML parses, template retains all nine tooling assemblies plus Java-source-utils tests, and tracked-reference checks find no surviving consumers of deleted helpers.The bytecode failure was checked against unmodified baseline
44d713f364: Java fixture sources extracted withgit archive HEADand compiled with the samejavac -parameters --release 11 -gproduce a byte-identicalmodule-info.classto the changed checkout (SHA-25670344aeaf5936f8f8256ab7416958bf867f45f8309d4aa9a44f35b8f6393ab99). That baseline's unchanged test also expects 12. No unrelated test expectation/JDK pin was changed, and the failure was not suppressed.Full SDK/native builds and device tests were not run: this change only removes standalone infrastructure, and the granted local validation window explicitly excluded SDK/native/device operations.
Pull Request
title and
description
should follow the
commit-messages.mdworkflow documentation, and in particular should include: