Repository navigation
Description
Goal
Reduce this repository to the minimum set of components that are required by dotnet/android, and remove legacy standalone JVM/desktop experiments, samples, tests, and alternative runtime paths that are no longer maintained or used by the Android SDK product path.
This should be done incrementally across multiple focused PRs rather than as one large deletion PR.
Progress
Status checked against merged PRs and the current main tree (44d713f364) on October 21, 2026. Checked items are completed removals or explicitly described retirements, not merely proposed changes. The remaining audits and separate API deprecation work are still open.
Completed
- Remove
Java.Runtime.Environmentand its former direct desktop/JRE consumers. The component is absent from the current tree; the remainingJreRuntimeunderMicrosoft.Android.Runtime.NativeAOTis Android runtime code, not the retired standalone library. - Remove the experimental
Java.Interop.Dynamic,Java.Interop.GenericMarshaler, andJava.Basecomponents, includingsrc/Java.Base-ref.cs(absent from the current tree). - Retire JVM-only interop test runs and fixtures, and remove the desktop Java.Interop stage from public, internal, and official pipelines: #12894.
- Remove reflection-backed JNI type/value managers, the standalone
TestJVMharness and host interop test project, and obsolete proxy-runtime/test scaffolding: #13018. - Move retained core JNI tests and Java fixtures into the Android device suite, removing the former standalone test directory and desktop-specific selection: #13019.
- Retire experimental
JavaInterop1binding/JCW support,ManagedPeer,GCUserPeerable, handwritten Java.Interop proxies, andjava-interop.jar, while preserving supported Android interop: #13030. - Remove unused Mono native-validation adapters and runtime-pack/header dependencies: #13054.
- Remove orphaned internal JNI runtime/allocation helpers: #13057.
- Retire obsolete expression-marshaling/member-builder and
ActivatePeercontracts, preserving non-expression value marshaling and generated activation: #13058. - Simplify binding generation to its single supported backend and JCW generation to its then-supported single style: #13056, #13060.
- Remove the obsolete legacy JCW emitter, standalone
jcw-gen, Java wrapper/bootstrap scaffolding, and alternate runtime JAR/DEX artifacts; retain the trimmable typemap Java pipeline: #13080. - Remove the legacy version-1 binary
TypeNameMapGenerator: #13094. - Remove
JavaTypeScannerand its unused Cecil adapters/helpers: #13122. - Remove the unused native Java.Interop support library, its validation/build project, CMake dependencies, and runtime-pack assets; use direct Android runtime symbol lookup: #13112.
- Remove the unused
param-name-importer, its build references/dependency, and stale documentation. Android parameter-name generation already usesjava-source-utils.jar; existing parameter metadata remains supported: #13113. - Remove the dead
javadoc-to-mdoctool: #12683. - Remove the obsolete raw JNI backend from the Android
jnienv-gentool and its backend-selection plumbing: #13100. - Remove the standalone desktop
external/Java.Interop/samples/Hello-NativeAOTFromJNIsample, its obsolete publish/run steps, and sample-only parameters incore-tests.yaml: #13138. Preserve Android NativeAOT support. - Remove the orphaned desktop
external/Java.Interop/tests/NativeTimingproject and its entry inJava.Interop.slnx: #13138. Preserve the separate Android JCW device-test timing fixture. - Remove
Mono.Android.Export.dlland its legacy runtime export callback engine; retain[Export]/[ExportField]through trimmable typemaps: #13111. - Retire runtime JNI delegate wrapping, but retain public
Android.Runtime.JNINativeWrapper.CreateDelegate(Delegate)for legacy connector binary references. Onmain(.NET 12), the method is[Obsolete(..., error: true)]and throwsNotSupportedException: #13130. The separate .NET 11 release-branch change marks it obsolete witherror: truewhile retaining the implementation: #13128. Neither change removes the public class/method.
Remaining
- Audit and remove leftover standalone build/automation metadata and documentation after the above deletions. In particular, review the remaining
external/Java.Interop/build-tools/automation/templates/files and standalone-build/support guidance; remove only what has no retained caller or supported developer/test use. - Complete a final dependency/packaging audit of the retained components and any remaining alternative runtime paths. Remove further pieces only when proven unused by Android and its retained tests; update build/solution metadata and documentation alongside each removal and validate the affected Android build/test paths. Public-unused Java.Interop APIs require separate deprecation/compatibility decisions, not blanket removal; preserve supported retained contracts.
Retained Android components
These are not unchecked deletion candidates. Keep the Android runtime, binding/API-generation tools, and their live transitive dependencies unless a separate dependency audit proves otherwise:
src/Java.Interop— managed JNI runtime used by Android.tools/generatorandsrc/Java.Interop.Tools.Generator— supportedXAJavaInterop1C# binding generation.tools/class-parse— Java bytecode/API description generation.tools/java-source-utilsandsrc/Java.Interop.Tools.JavaSource— Java-source/parameter metadata and related tooling.src/Java.Interop.Tools.JavaCallableWrappers— remaining shared naming/hash/identifier utilities; the old emitter/scanner/CLI have been removed.src/Java.Interop.Tools.JavaTypeSystem,src/Java.Interop.Tools.TypeNameMappings, and retained Cecil utilities.src/Java.Interop.Tools.Maven— still directly referenced by Android build tasks; not a blanket removal candidate.src/Xamarin.Android.Tools.ApiXmlAdjuster,src/Xamarin.Android.Tools.Bytecode,src/Xamarin.SourceWriter, live annotation support, and shared diagnostics/localization support.- Android device JNI/runtime tests and retained host-side tooling tests.
The former initial keep-list entries tools/param-name-importer and tools/jcw-gen have been removed after their replacements/retirement were established. The goal remains to remove unsupported standalone infrastructure, not all Java.Interop tooling or Android NativeAOT.
Approach for remaining work
For each component:
- Prove whether
dotnet/android, its SDK packs, or retained tests/developer workflows reference it. - Remove it in a focused PR only if unused.
- Update solution/build metadata and directly related documentation in the same PR.
- Validate the remaining Java.Interop tooling and relevant Android build/test path.
- Preserve supported behavior and distinguish completed removals from open investigations.
Activity
[Java.Interop] Remove JniObjectReference SafeHandle backend (#1446)
Remove Java.Interop.GenericMarshaler (#1450)
Remove Java.Interop.Dynamic (#1449)
Remove Java.Runtime.Environment and keep Java.Interop tests running (#…
[Java.Interop] Remove obsolete desktop sample and timing project (#13138
[Java.Interop] Remove obsolete standalone build infrastructure (#13222)
[Java.Interop] Drop unused tooling assemblies and package pins (#13223)