Skip to content

[external/Java.Interop] Drop nested xamarin-android-tools submodule - #11944

Merged
jonathanpeppers merged 1 commit into
mainfrom
jonathanpeppers-drop-nested-xamarin-android-tools
Jul 2, 2026
Merged

[external/Java.Interop] Drop nested xamarin-android-tools submodule#11944
jonathanpeppers merged 1 commit into
mainfrom
jonathanpeppers-drop-nested-xamarin-android-tools

Conversation

@jonathanpeppers

Copy link
Copy Markdown
Member

Why

After the Java.Interop history was merged into dotnet/android in #11942, we ended up with two submodules pointing at the same repo:

Submodule path Points to
external/xamarin-android-tools dotnet/android-tools (top-level, canonical)
external/Java.Interop/external/xamarin-android-tools xamarin/xamarin-android-tools (nested, redundant)

Both check out the same code. Keeping both wastes ~30 MB per fresh clone, doubles the "am I up to date?" surface area, and creates two places where the pinned commit can drift out of sync. This PR removes the nested one and retargets every Java.Interop consumer at the top-level checkout.

This is pure de-duplication — no functional change to Xamarin.Android.Tools.AndroidSdk or anything that depends on it.

Follows the earlier .github/ merge in #11942 and complements the parallel cleanup of other stale files under external/Java.Interop/ (product.snk, CODE-OF-CONDUCT.md, SECURITY.md, top-level Makefile, code-workspace, .gitmodules) that a sibling session is opening separately.

What changed

Submodule removal:

  • Deleted the external/Java.Interop/external/xamarin-android-tools submodule entry.
  • Removed the [submodule "external/Java.Interop/external/xamarin-android-tools"] block from the top-level .gitmodules.
  • Deleted external/Java.Interop/.gitmodules (the nested submodule was its only entry).

Consumer updates (everything now points at external/xamarin-android-tools/):

  • external/Java.Interop/Directory.Build.props: $(XamarinAndroidToolsDirectory)$(MSBuildThisFileDirectory)..\xamarin-android-tools
  • external/Java.Interop/Java.Interop.sln: project path → ..\xamarin-android-tools\src\...
  • external/Java.Interop/build-tools/Java.Interop.BootstrapTasks/Java.Interop.BootstrapTasks.sln: project path → ..\..\..\xamarin-android-tools\src\...
  • external/Java.Interop/Makefile: PREPARE_EXTERNAL_FILES../xamarin-android-tools/src/...
  • external/Java.Interop/tools/generator/generator.slnf: project path → ..\\xamarin-android-tools\\src\\...
  • .github/skills/tests/references/test-catalog.md: doc paths updated.

Verification

dotnet restore external/Java.Interop/build-tools/Java.Interop.BootstrapTasks/Java.Interop.BootstrapTasks.sln
  Restored .../Java.Interop.BootstrapTasks.csproj
  Restored .../external/xamarin-android-tools/src/Xamarin.Android.Tools.AndroidSdk/Xamarin.Android.Tools.AndroidSdk.csproj

dotnet build   external/Java.Interop/build-tools/Java.Interop.BootstrapTasks/Java.Interop.BootstrapTasks.sln
  Xamarin.Android.Tools.AndroidSdk -> .../external/xamarin-android-tools/bin/Debug/netstandard2.0/Xamarin.Android.Tools.AndroidSdk.dll
  Java.Interop.BootstrapTasks     -> .../external/Java.Interop/bin/BuildDebug/Java.Interop.BootstrapTasks.dll
  Build succeeded.  0 Warning(s)  0 Error(s)

dotnet restore external/Java.Interop/Java.Interop.sln
  Restored (all 37 projects, including Xamarin.Android.Tools.AndroidSdk at the retargeted path)

git submodule status after the change no longer lists external/Java.Interop/external/xamarin-android-tools, and still lists external/xamarin-android-tools.

Local checkout impact

⚠️ This is potentially breaking for anyone with an existing local clone that has the nested submodule initialized. After pulling this PR, run:

git submodule sync
git submodule update --init --recursive

Git will then deinit the nested submodule cleanly. If you have local edits under external/Java.Interop/external/xamarin-android-tools/, back them up first — that directory is going away.

Copilot AI review requested due to automatic review settings July 1, 2026 18:27

Copilot AI 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 de-duplicates xamarin-android-tools by removing the redundant nested submodule under external/Java.Interop/ and retargeting Java.Interop build inputs (MSBuild, solutions, makefiles, and docs) to the canonical top-level checkout at external/xamarin-android-tools/.

Changes:

  • Removed the nested external/Java.Interop/external/xamarin-android-tools submodule entry and deleted the now-unused external/Java.Interop/.gitmodules.
  • Updated Java.Interop solution and build wiring to reference ..\xamarin-android-tools\... (or ../xamarin-android-tools/...) instead of the nested path.
  • Updated test documentation paths to point at the canonical external/xamarin-android-tools/tests/ location.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
external/Java.Interop/tools/generator/generator.slnf Retargets AndroidSdk project path to the top-level external/xamarin-android-tools checkout.
external/Java.Interop/Makefile Updates PREPARE_EXTERNAL_FILES reference to the canonical tools checkout.
external/Java.Interop/Java.Interop.sln Retargets the AndroidSdk project entry to ..\xamarin-android-tools\....
external/Java.Interop/Directory.Build.props Changes the default $(XamarinAndroidToolsDirectory) to point at ..\xamarin-android-tools.
external/Java.Interop/build-tools/Java.Interop.BootstrapTasks/Java.Interop.BootstrapTasks.sln Retargets AndroidSdk project entry to the canonical checkout via an updated relative path.
external/Java.Interop/.gitmodules Removes the nested submodule’s only entry (file deleted).
.gitmodules Removes the nested submodule block from the repo-level submodule manifest.
.github/skills/tests/references/test-catalog.md Updates test invocation paths to use external/xamarin-android-tools/tests/....

The nested `external/Java.Interop/external/xamarin-android-tools`
submodule and the top-level `external/xamarin-android-tools`
submodule both point at the same repo (dotnet/android-tools /
xamarin/xamarin-android-tools). Since the Java.Interop history was
merged into dotnet/android in #11942, keeping both is pure
duplication.

Remove the nested submodule and retarget every Java.Interop consumer
at the top-level `external/xamarin-android-tools` checkout:

- `external/Java.Interop/Directory.Build.props`:
  `$(XamarinAndroidToolsDirectory)` now points at `..\xamarin-android-tools`.
- `external/Java.Interop/Java.Interop.sln` and
  `build-tools/Java.Interop.BootstrapTasks/Java.Interop.BootstrapTasks.sln`:
  updated project paths.
- `external/Java.Interop/Makefile` and
  `external/Java.Interop/tools/generator/generator.slnf`: updated paths.
- Top-level `.gitmodules`: removed the nested submodule entry.
- `external/Java.Interop/.gitmodules`: deleted (only entry was the
  now-removed submodule).
- `.github/skills/tests/references/test-catalog.md`: updated paths.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@jonathanpeppers
jonathanpeppers force-pushed the jonathanpeppers-drop-nested-xamarin-android-tools branch from 21c6d38 to 7d2bda7 Compare July 1, 2026 22:19
@jonathanpeppers
jonathanpeppers enabled auto-merge (squash) July 1, 2026 22:19
@jonathanpeppers
jonathanpeppers merged commit 9daa539 into main Jul 2, 2026
42 checks passed
@jonathanpeppers
jonathanpeppers deleted the jonathanpeppers-drop-nested-xamarin-android-tools branch July 2, 2026 07:17
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 1, 2026
Sign up for free to 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