[build] Move Android tools projects into src and tests#12215
[build] Move Android tools projects into src and tests#12215jonathanpeppers wants to merge 9 commits into
Conversation
Move the shared Android tooling libraries into src, their tests and benchmarks into tests, and ls-jdks into tools. Inline the shipped assembly versioning, signing, packaging, and dependency settings that were previously inherited from the external directory, and update all consumers, CI, localization, and documentation paths. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 9590cf75-594f-4834-9762-189eaf472675
Let each test invocation build its own project and dependencies instead of duplicating the test projects in the preceding build step. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 9590cf75-594f-4834-9762-189eaf472675
Build Microsoft.Android.Build.BaseTasks through its existing project references instead of listing it separately in the Android tools CI build step. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 9590cf75-594f-4834-9762-189eaf472675
There was a problem hiding this comment.
Pull request overview
This PR restructures the in-tree “Android tools” code by eliminating the standalone external/xamarin-android-tools/ hierarchy and relocating the shipped libraries into src/, their tests/benchmarks into tests/, and ls-jdks into tools/, while updating all repository references (solutions, project refs, CI, localization).
Changes:
- Moved
Microsoft.Android.Build.BaseTasksandXamarin.Android.Tools.AndroidSdkintosrc/, with corresponding tests/benchmarks intotests/andls-jdksintotools/. - Updated solution files, project references, Java.Interop bootstrap references, pack/build scripts, and CI YAML to use the new paths.
- Added/updated tooling code (e.g.,
SdkManager, ADB tracker/client tests, benchmark harness) and localization wiring for the moved projects.
Reviewed changes
Copilot reviewed 57 out of 233 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| Xamarin.Android.sln | Update project paths for moved Android tools projects. |
| Xamarin.Android.Build.Tasks.sln | Remove external solution folder and update project paths. |
| tools/ls-jdks/ls-jdks.csproj | Use shared build output directory for tool output. |
| tools/ls-jdks/App.cs | New ls-jdks entrypoint under tools/. |
| tests/Xamarin.Android.Tools.Benchmarks/Xamarin.Android.Tools.Benchmarks.csproj | Move benchmarks under tests/, pin BenchmarkDotNet version, update output path. |
| tests/Xamarin.Android.Tools.Benchmarks/run-benchmarks.ps1 | Adjust script paths to new benchmarks location. |
| tests/Xamarin.Android.Tools.Benchmarks/README.md | Checked-in benchmark output under new location. |
| tests/Xamarin.Android.Tools.Benchmarks/Program.cs | New top-level benchmark program entrypoint. |
| tests/Xamarin.Android.Tools.Benchmarks/FilesHashBenchmarks.cs | New benchmark suite for Files hashing helpers. |
| tests/Xamarin.Android.Tools.AndroidSdk-Tests/Xamarin.Android.Tools.AndroidSdk-Tests.csproj | Move tests into tests/, pin test package versions, update output path. |
| tests/Xamarin.Android.Tools.AndroidSdk-Tests/Resources/manifest-simplewidget.xml | Move embedded test resource. |
| tests/Xamarin.Android.Tools.AndroidSdk-Tests/ProcessUtilsTests.cs | Add unit tests for ProcessUtils. |
| tests/Xamarin.Android.Tools.AndroidSdk-Tests/JdkVersionInfoTests.cs | Add unit tests for JdkVersionInfo. |
| tests/Xamarin.Android.Tools.AndroidSdk-Tests/AndroidSdkWindowsTests.cs | New (currently empty) Windows test fixture placeholder. |
| tests/Xamarin.Android.Tools.AndroidSdk-Tests/AdbDeviceTrackerTests.cs | Add unit tests for AdbDeviceTracker. |
| tests/Xamarin.Android.Tools.AndroidSdk-Tests/AdbClientTests.cs | Add unit tests for AdbClient stream parsing. |
| tests/MSBuildDeviceIntegration/MSBuildDeviceIntegration.csproj | Update import path for moved MSBuildReferences.projitems. |
| tests/Microsoft.Android.Build.BaseTasks-Tests/Utilites/MockBuildEngine.cs | Add mock MSBuild engine for BaseTasks tests. |
| tests/Microsoft.Android.Build.BaseTasks-Tests/Microsoft.Android.Build.BaseTasks-Tests.csproj | Move tests into tests/, pin test package versions, update output path. |
| tests/Microsoft.Android.Build.BaseTasks-Tests/MemoryStreamPoolTests.cs | Add/relocate MemoryStreamPool unit tests. |
| tests/Microsoft.Android.Build.BaseTasks-Tests/LockCheckTests.cs | Add/relocate LockCheck tests for Windows behavior. |
| tests/Microsoft.Android.Build.BaseTasks-Tests/AsyncTaskTests.cs | Add/relocate AsyncTask tests. |
| tests/Microsoft.Android.Build.BaseTasks-Tests/AsyncTaskExtensionsTests.cs | Add/relocate AsyncTask extension tests. |
| src/Xamarin.Installer.Build.Tasks/Xamarin.Installer.Build.Tasks.csproj | Update refs/imports for moved BaseTasks. |
| src/Xamarin.AndroidTools/Xamarin.AndroidTools.csproj | Update project reference to moved AndroidSdk project. |
| src/Xamarin.Android.Tools.AndroidSdk/Xamarin.Android.Tools.AndroidSdk.userprefs | New IDE state file (should not be committed). |
| src/Xamarin.Android.Tools.AndroidSdk/SourceProperties.cs | New helper for parsing source.properties. |
| src/Xamarin.Android.Tools.AndroidSdk/Sdks/AndroidSdkBase.cs | Add JDK environment override support via JI_JAVA_HOME. |
| src/Xamarin.Android.Tools.AndroidSdk/SdkManager.Process.cs | Add process execution helpers for sdkmanager operations. |
| src/Xamarin.Android.Tools.AndroidSdk/SdkManager.cs | Add SdkManager core API surface and disposal semantics. |
| src/Xamarin.Android.Tools.AndroidSdk/SdkManager.Bootstrap.cs | Add bootstrap flow for cmdline-tools via manifest feed. |
| src/Xamarin.Android.Tools.AndroidSdk/Runners/RunnerDefaults.cs | Add shared runner defaults (null logger). |
| src/Xamarin.Android.Tools.AndroidSdk/Runners/AndroidEnvironmentHelper.cs | Add environment-variable construction helper for tool runners. |
| src/Xamarin.Android.Tools.AndroidSdk/Runners/AdbResponseStatus.cs | Add ADB status enum. |
| src/Xamarin.Android.Tools.AndroidSdk/Runners/AdbProtocol.cs | Add ADB protocol enum. |
| src/Xamarin.Android.Tools.AndroidSdk/Runners/AdbPortSpec.cs | Add parsing/formatting for ADB socket specs. |
| src/Xamarin.Android.Tools.AndroidSdk/Runners/AdbPortRule.cs | Add record representing ADB port forwarding rules. |
| src/Xamarin.Android.Tools.AndroidSdk/README.md | New README reflecting new in-tree locations and commands. |
| src/Xamarin.Android.Tools.AndroidSdk/Properties/Resources.Designer.cs | Add generated resource designer for AndroidSdk project. |
| src/Xamarin.Android.Tools.AndroidSdk/Properties/AssemblyInfo.cs | Add InternalsVisibleTo for tests (strong-named). |
| src/Xamarin.Android.Tools.AndroidSdk/Models/Sdk/SdkPackage.cs | Add SDK package model type. |
| src/Xamarin.Android.Tools.AndroidSdk/Models/Sdk/SdkManifestComponent.cs | Add manifest component model. |
| src/Xamarin.Android.Tools.AndroidSdk/Models/Sdk/SdkLicense.cs | Add SDK license model. |
| src/Xamarin.Android.Tools.AndroidSdk/Models/Sdk/SdkBootstrapProgress.cs | Add bootstrap progress model. |
| src/Xamarin.Android.Tools.AndroidSdk/Models/Sdk/SdkBootstrapPhase.cs | Add bootstrap phase enum. |
| src/Xamarin.Android.Tools.AndroidSdk/Models/Sdk/CommandLineTool.cs | Add command-line tool model. |
| src/Xamarin.Android.Tools.AndroidSdk/Models/Sdk/ChecksumType.cs | Add checksum type enum. |
| src/Xamarin.Android.Tools.AndroidSdk/Models/Jdk/JdkVersionInfo.cs | Add JDK version info model. |
| src/Xamarin.Android.Tools.AndroidSdk/Models/Jdk/JdkInstallProgress.cs | Add JDK install progress model. |
| src/Xamarin.Android.Tools.AndroidSdk/Models/Jdk/JdkInstallPhase.cs | Add JDK install phases enum. |
| src/Xamarin.Android.Tools.AndroidSdk/Models/EmulatorBootResult.cs | Add structured emulator boot result and error kind. |
| src/Xamarin.Android.Tools.AndroidSdk/Models/EmulatorBootOptions.cs | Add emulator boot options. |
| src/Xamarin.Android.Tools.AndroidSdk/Models/AvdInfo.cs | Add AVD info record. |
| src/Xamarin.Android.Tools.AndroidSdk/Models/AvdDeviceProfile.cs | Add AVD device profile record. |
| src/Xamarin.Android.Tools.AndroidSdk/Models/AdbDeviceType.cs | Add device type enum. |
| src/Xamarin.Android.Tools.AndroidSdk/Models/AdbDeviceStatus.cs | Add device status enum. |
| src/Xamarin.Android.Tools.AndroidSdk/Models/AdbDeviceInfo.cs | Add device metadata model. |
| src/Xamarin.Android.Tools.AndroidSdk/Jdks/XAPrepareJdkLocations.cs | Move/add XA prepare JDK discovery. |
| src/Xamarin.Android.Tools.AndroidSdk/Jdks/VSAndroidJdkLocations.cs | Move/add VS Android JDK discovery. |
| src/Xamarin.Android.Tools.AndroidSdk/Jdks/OracleJdkLocations.cs | Move/add Oracle JDK discovery. |
| src/Xamarin.Android.Tools.AndroidSdk/Jdks/MicrosoftOpenJdkLocations.cs | Move/add Microsoft OpenJDK discovery. |
| src/Xamarin.Android.Tools.AndroidSdk/Jdks/MicrosoftDistJdkLocations.cs | Move/add legacy Microsoft dist JDK discovery. |
| src/Xamarin.Android.Tools.AndroidSdk/Jdks/JdkLocations.MacOS.cs | Move/add macOS JDK discovery helpers. |
| src/Xamarin.Android.Tools.AndroidSdk/Jdks/JdkLocations.cs | Move/add shared JDK location helpers. |
| src/Xamarin.Android.Tools.AndroidSdk/Jdks/EclipseAdoptiumJdkLocations.cs | Move/add Adoptium JDK discovery. |
| src/Xamarin.Android.Tools.AndroidSdk/Jdks/AzulJdkLocations.cs | Move/add Azul JDK discovery. |
| src/Xamarin.Android.Tools.AndroidSdk/IsExternalInit.cs | Add IsExternalInit polyfill for netstandard2.0 records/init. |
| src/Xamarin.Android.Tools.AndroidSdk/GitInfo.txt | Preserve GitInfo fallback version for AndroidSdk project. |
| src/Xamarin.Android.Tools.AndroidSdk/EnvironmentVariableNames.cs | Add constants for Android/JDK env var names and guidance. |
| src/Xamarin.Android.Tools.AndroidSdk/AndroidTargetArch.cs | Move/add target arch enum. |
| src/Xamarin.Android.Build.Tasks/Xamarin.Android.Build.Tasks.csproj | Update imports/references to moved BaseTasks/AndroidSdk projects. |
| src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Xamarin.ProjectTools.csproj | Update imports/references to moved tool projects. |
| src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/Xamarin.Android.Build.Tests.csproj | Update imports/references to moved AndroidSdk project. |
| src/Xamarin.Android.Build.Debugging.Tasks/Xamarin.Android.Build.Debugging.Tasks.csproj | Update imports/references to moved tool projects. |
| src/Microsoft.Android.Run/Microsoft.Android.Run.csproj | Update reference to moved AndroidSdk project. |
| src/Microsoft.Android.Build.Tasks/Microsoft.Android.Build.Tasks.csproj | Update reference to moved BaseTasks project. |
| src/Microsoft.Android.Build.BaseTasks/XDocumentExtensions.cs | Add/relocate MSBuild XML helper extension(s). |
| src/Microsoft.Android.Build.BaseTasks/Properties/Resources.Designer.cs | Add generated resource designer for BaseTasks project. |
| src/Microsoft.Android.Build.BaseTasks/ObjectPool.cs | Add/relocate object pool utility. |
| src/Microsoft.Android.Build.BaseTasks/MSBuildReferences.projitems | New shared MSBuild package reference set. |
| src/Microsoft.Android.Build.BaseTasks/Microsoft.Android.Build.BaseTasks.csproj | New in-tree BaseTasks project definition with versioning/pack setup. |
| src/Microsoft.Android.Build.BaseTasks/MemoryStreamPool.cs | Add/relocate pooled MemoryStream utilities. |
| src/Microsoft.Android.Build.BaseTasks/GitInfo.txt | Preserve GitInfo fallback version for BaseTasks project. |
| src/Microsoft.Android.Build.BaseTasks/Crc64Helper.cs | Add/relocate CRC64 helper implementation. |
| src/Microsoft.Android.Build.BaseTasks/Crc64.cs | Add/relocate CRC64 HashAlgorithm implementation. |
| src/Microsoft.Android.Build.BaseTasks/AndroidToolTask.cs | Add/relocate ToolTask base. |
| src/Microsoft.Android.Build.BaseTasks/AndroidTask.cs | Add/relocate Task base with exception handling. |
| src/Microsoft.Android.Build.BaseTasks/AndroidRunToolTask.cs | Add/relocate tool runner base for stderr parsing. |
| src/AndroidBuildConfig/AndroidBuildConfig.csproj | Update reference to moved AndroidSdk project. |
| Localize/LocProject.json | Add localization entries for moved BaseTasks/AndroidSdk resources. |
| Localize/loc/zh-Hant/Xamarin.Android.Tools.AndroidSdk/Properties/Resources.resx.lcl | Add localization file under new path. |
| Localize/loc/zh-Hant/Microsoft.Android.Build.BaseTasks/Properties/Resources.resx.lcl | Add localization file under new path. |
| Localize/loc/zh-Hans/Xamarin.Android.Tools.AndroidSdk/Properties/Resources.resx.lcl | Add localization file under new path. |
| Localize/loc/zh-Hans/Microsoft.Android.Build.BaseTasks/Properties/Resources.resx.lcl | Add localization file under new path. |
| Localize/loc/tr/Xamarin.Android.Tools.AndroidSdk/Properties/Resources.resx.lcl | Add localization file under new path. |
| Localize/loc/tr/Microsoft.Android.Build.BaseTasks/Properties/Resources.resx.lcl | Add localization file under new path. |
| Localize/loc/ru/Xamarin.Android.Tools.AndroidSdk/Properties/Resources.resx.lcl | Add localization file under new path. |
| Localize/loc/ru/Microsoft.Android.Build.BaseTasks/Properties/Resources.resx.lcl | Add localization file under new path. |
| Localize/loc/pt-BR/Xamarin.Android.Tools.AndroidSdk/Properties/Resources.resx.lcl | Add localization file under new path. |
| Localize/loc/pt-BR/Microsoft.Android.Build.BaseTasks/Properties/Resources.resx.lcl | Add localization file under new path. |
| Localize/loc/pl/Xamarin.Android.Tools.AndroidSdk/Properties/Resources.resx.lcl | Add localization file under new path. |
| Localize/loc/pl/Microsoft.Android.Build.BaseTasks/Properties/Resources.resx.lcl | Add localization file under new path. |
| Localize/loc/ko/Xamarin.Android.Tools.AndroidSdk/Properties/Resources.resx.lcl | Add localization file under new path. |
| Localize/loc/ko/Microsoft.Android.Build.BaseTasks/Properties/Resources.resx.lcl | Add localization file under new path. |
| Localize/loc/ja/Xamarin.Android.Tools.AndroidSdk/Properties/Resources.resx.lcl | Add localization file under new path. |
| Localize/loc/ja/Microsoft.Android.Build.BaseTasks/Properties/Resources.resx.lcl | Add localization file under new path. |
| Localize/loc/it/Xamarin.Android.Tools.AndroidSdk/Properties/Resources.resx.lcl | Add localization file under new path. |
| Localize/loc/it/Microsoft.Android.Build.BaseTasks/Properties/Resources.resx.lcl | Add localization file under new path. |
| Localize/loc/fr/Xamarin.Android.Tools.AndroidSdk/Properties/Resources.resx.lcl | Add localization file under new path. |
| Localize/loc/fr/Microsoft.Android.Build.BaseTasks/Properties/Resources.resx.lcl | Add localization file under new path. |
| Localize/loc/es/Xamarin.Android.Tools.AndroidSdk/Properties/Resources.resx.lcl | Add localization file under new path. |
| Localize/loc/es/Microsoft.Android.Build.BaseTasks/Properties/Resources.resx.lcl | Add localization file under new path. |
| Localize/loc/de/Xamarin.Android.Tools.AndroidSdk/Properties/Resources.resx.lcl | Add localization file under new path. |
| Localize/loc/de/Microsoft.Android.Build.BaseTasks/Properties/Resources.resx.lcl | Add localization file under new path. |
| Localize/loc/cs/Xamarin.Android.Tools.AndroidSdk/Properties/Resources.resx.lcl | Add localization file under new path. |
| Localize/loc/cs/Microsoft.Android.Build.BaseTasks/Properties/Resources.resx.lcl | Add localization file under new path. |
| external/xamarin-android-tools/src/Microsoft.Android.Build.BaseTasks/Microsoft.Android.Build.BaseTasks.csproj | Remove old external project definition (moved). |
| external/xamarin-android-tools/README.md | Remove old external hierarchy README (replaced by new in-tree docs). |
| external/xamarin-android-tools/nuget.version | Remove obsolete external version file. |
| external/xamarin-android-tools/NuGet.config | Remove external-only NuGet config. |
| external/xamarin-android-tools/Makefile | Remove external-only make-based build wrapper. |
| external/xamarin-android-tools/Localize/LocProject.json | Remove external localization project config (moved to root). |
| external/xamarin-android-tools/LICENSE | Remove redundant external license file. |
| external/xamarin-android-tools/global.json | Remove external-only SDK pin config. |
| external/xamarin-android-tools/GitInfo.txt | Remove external GitInfo fallback (moved into projects). |
| external/xamarin-android-tools/Directory.Build.targets | Remove external-only build targets. |
| external/xamarin-android-tools/Directory.Build.props | Remove external-only build props (outputs/paths). |
| external/xamarin-android-tools/build-tools/scripts/msbuild.mk | Remove external-only build helper. |
| external/xamarin-android-tools/.gitignore | Remove external-only ignore list. |
| external/xamarin-android-tools/.gitattributes | Remove external-only attributes. |
| external/Java.Interop/tools/generator/generator.slnf | Update project path to moved AndroidSdk project. |
| external/Java.Interop/Java.Interop.sln | Update project path to moved AndroidSdk project. |
| external/Java.Interop/build-tools/Java.Interop.BootstrapTasks/Java.Interop.BootstrapTasks.sln | Update project path to moved AndroidSdk project. |
| external/Java.Interop.override.props | Update XamarinAndroidToolsDirectory to repo root (no external tools folder). |
| Directory.Build.targets | Parameterize SourceLink package version and refine nullable-attributes injection condition. |
| build-tools/Xamarin.Android.Tools.BootstrapTasks/Xamarin.Android.Tools.BootstrapTasks.csproj | Update import/reference paths for moved BaseTasks. |
| build-tools/xa-prep-tasks/xa-prep-tasks.csproj | Update import/reference paths for moved BaseTasks. |
| build-tools/scripts/XAVersionInfo.targets | Update comment to reflect in-tree layout. |
| build-tools/create-packs/Directory.Build.targets | Update pack step path for moved AndroidSdk project. |
| build-tools/automation/yaml-templates/stage-xamarin-android-tools-tests.yaml | Update CI stage to build/test explicit moved projects instead of removed solution. |
| .gitignore | Ignore BenchmarkDotNet.Artifacts/ at repo root. |
| .github/skills/tests/references/test-catalog.md | Update test-catalog paths/commands for moved tools tests. |
| .github/skills/read-assembly-store/src/AssemblyStore/AssemblyStore.csproj | Update reference to moved AndroidSdk project. |
| .github/skills/android-reviewer/SKILL.md | Update documentation paths referencing moved tooling. |
| .github/skills/android-reviewer/references/testing-rules.md | Update guidance paths for tools tests. |
| .github/skills/android-reviewer/references/repo-conventions.md | Update conventions text to reference new tooling locations. |
| .github/skills/android-reviewer/references/csharp-rules.md | Update guidance for oldest TFM compilation to new locations. |
| .github/copilot-instructions.md | Update repo architecture and commands to reflect moved tooling projects. |
|
/review |
|
✅ Android PR Reviewer completed successfully! |
There was a problem hiding this comment.
🤖 Review: Move Android tools projects into src and tests
Verdict:
What I verified
- No dangling references to the old paths.
git grepforexternal/xamarin-android-toolsacross.props/.targets/.csproj/.sln/.slnf/.yaml/.projitems/scripts atHEADreturns nothing. AllProjectReferencepaths (including.github/skills/read-assembly-store/.../AssemblyStore.csproj) were updated. ✅ - Shipped project settings preserved. Both new
src/projects keep signing (product.snk),VendorPrefix/Suffixassembly names,GitInfo+SetVersion/GitThisAssembly=falseversioning,GitInfo.txtfallbacks, packaging output path, and analyzers. ✅ - Nullable-attributes wiring is correct.
Xamarin.Android.Tools.AndroidSdkships its ownNullableAttributes.cs/IsExternalInit.csand setsUseProjectNullableAttributes=true, soDirectory.Build.targetscorrectly skips adding the Java.Interop copy (avoiding duplicate-type conflicts).Microsoft.Android.Build.BaseTaskshas no local copy and relies on the shared one — also correct. ✅ System.IO.Hashing/SourceLinkversions resolve to defined properties ($(SystemIOHashingPackageVersion)=10.0.10;SourceLinkGitHubPackageVersionoverridden to10.0.300). No central-package-management conflict (repo has noDirectory.Packages.props). ✅- CI stage rewrite builds the individual projects and runs the two test projects via
command: test—BaseTasksbuilds transitively through its test project. ✅
Inline comments (both non-blocking 💡)
Xamarin.Android.Tools.AndroidSdk.csproj— PublicAPI baseline path hardcoded tonet10.0instead of$(TargetFramework); works today but is coupled to the CI SDK version pin.AndroidSdk-Tests.csproj— NUnit hardcoded to3.13.2while the repo defines$(NUnitVersion)=3.13.3.
Note
- CI status is currently pending — do not merge until the
dotnet-androidpipeline and the tools-tests stage are green, since the relocation changes how these projects are built.
Nice cleanup overall — removing the standalone solution/build infra and folding these into src/tests/tools is a clear simplification.
Generated by Android PR Reviewer for #12215 · 209.3 AIC · ⌖ 13.5 AIC · ⊞ 6.8K
Comment /review to run again
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 9590cf75-594f-4834-9762-189eaf472675
|
/review |
|
✅ Android PR Reviewer completed successfully! |
There was a problem hiding this comment.
⚠️ Review Summary — Needs minor clarification
This PR moves the in-tree external/xamarin-android-tools hierarchy into src/, tests/, and tools/, removing the standalone build/solution infrastructure and wiring the moved projects into the main build, CI YAML, localization metadata, and docs. The overwhelming majority of the 235 changed files are pure renames with no content changes, and the packaging/signing/versioning/analyzer setup is faithfully reconstructed in the new .csproj files.
Findings (2 inline, both non-blocking):
⚠️ MSBuild targets — Both shipped projects overrideSourceLinkGitHubPackageVersionto10.0.300while the new repo-wide default is8.0.0; worth confirming/documenting why they differ, given theSystem.IO.Hashingconflict the default guards against.- 💡 Code organization — The
SetVersion/_GetXAVersionInfopacking targets are duplicated verbatim across the two shipped.csprojfiles; consider consolidating into shared.targets.
Verified as correct:
- The behavioral change in
AndroidSdkBase.Initialize(newJI_JAVA_HOMEoverride forJavaSdkPath) is covered byAndroidSdkInfoTests.JdkDirectory_JavaHome. - Test projects correctly switch to
$(NUnitVersion)for NUnit (matching repo convention) and$(TestOutputDirectory)/$(BuildOutputDirectory); the hardcodedNUnit3TestAdapter/Microsoft.NET.Test.Sdk/BenchmarkDotNetversions are acceptable since no central definition exists for them. Directory.Build.targetsUseProjectNullableAttributesgate correctly letsXamarin.Android.Tools.AndroidSdksupply its ownNullableAttributes.LocProject.jsonand moved.lclfiles line up with the new source paths.
CI: No status checks have reported yet (state: pending); mergeable_state is blocked. Re-verify CI is green before merge — I could not confirm a passing build.
Nice, clean mechanical move overall. 👍
Generated by Android PR Reviewer for #12215 · 162 AIC · ⌖ 13.4 AIC · ⊞ 6.8K
Comment /review to run again
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 9590cf75-594f-4834-9762-189eaf472675
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 9590cf75-594f-4834-9762-189eaf472675
|
/review |
|
✅ Android PR Reviewer completed successfully! |
There was a problem hiding this comment.
🤖 Code Review — ✅ LGTM (with minor suggestions)
Thorough mechanical move of the Android tools projects from external/xamarin-android-tools/ into src, tests, and tools, with consolidated versioning plumbing. I reviewed the substantive build changes (rename-only files were spot-checked, not line-reviewed).
Verified ✅
- Path updates are complete and consistent — all
ProjectReference/Import/solution/.slnfentries (Xamarin.Android.Build.Tasks.sln,Xamarin.Android.sln, Java.Interop solutions,xa-prep-tasks,BootstrapTasks,AndroidBuildConfig,AssemblyStore,Microsoft.Android.Build.Tasks) now point at the newsrc\...locations. The removedexternalsolution folder nodes were cleaned up. - Shared versioning target —
build-tools/scripts/Xamarin.Android.Tools.Versioning.targetsis imported by bothMicrosoft.Android.Build.BaseTasksandXamarin.Android.Tools.AndroidSdk. All properties it consumes (_AndroidPackBranch,PackVersionCommitCount,XAVersionBranch,XamarinAndroidSourcePath) resolve via theXAVersionInfo.targets/Configuration.propsimports that precede it._GetXAVersionInfois correctly gated onIsPacking=true. - SourceLink refactor is behavior-preserving for the root (
8.0.0was already the hardcoded value); removing the per-projectMicrosoft.SourceLink.GitHubreference inBaseTasks.csprojis correct since it now flows from the rootDirectory.Build.targets. - Loc metadata —
LocProject.jsonentries added at the root withLclFilepaths matching the renamedLocalize/loc/**files. - CI YAML — the
stage-xamarin-android-tools-testsbuild/test steps were repointed to the new project paths; the test step rebuilds the test projects (andBaseTaskstransitively), which is fine.
Suggestions (non-blocking)
- 💡
NoWarn;CA1305inBaseTasks.csproj— prefer fixing the underlyingString.Formatcall sites withInvariantCulture(see inline). - 💡 Consider centralizing
SourceLinkGitHubPackageVersionineng/Versions.props(see inline).
Note
- CI checks were still pending at review time — this isn't mergeable until the
dotnet-androidpipeline goes green, since a mechanical move like this is best validated by a full build + the tools test suites.
Counts: 0 ❌ · 0
Generated by Android PR Reviewer for #12215 · 108 AIC · ⌖ 18.9 AIC · ⊞ 6.8K
Comment /review to run again
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 9590cf75-594f-4834-9762-189eaf472675
|
Compared the shipped artifacts from PR build
The netstandard PublicAPI baseline files are byte-identical before and after the move. Overall, the shipped API and behavior are preserved except for the intentional JDK precedence and culture-safe formatting changes. The older direct-main artifact used |
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: 9590cf75-594f-4834-9762-189eaf472675
Pull Request
title and
description
should follow the
commit-messages.mdworkflow documentation, and in particular should include:The Android tools projects now live directly in dotnet/android, so retaining a separate
external/xamarin-android-toolshierarchy adds path indirection and standalone build infrastructure that no longer represents repository ownership.Move the shipped libraries into
src, their tests and benchmarks intotests, andls-jdksintotools. The relevant projects retain their signing, packaging, analyzer, and GitInfo versioning behavior, including project-localGitInfo.txtfallback versions. Their common packaging/versioning logic is consolidated in a shared target, while SourceLink and NUnit use the repository-wide versions. A .NET 11 PublicAPI baseline keeps API compatibility checks aligned with each target framework.All project references, solutions, localization metadata, CI YAML, documentation, and repository guidance use the new paths. The dedicated Android tools solution is removed. CI builds the AndroidSdk library, benchmarks, and
ls-jdksexplicitly; BaseTasks builds transitively, and each test project builds with its test invocation.Validation includes Debug and Release builds, both standalone test suites, package creation through the CI versioning path, the .NET 11 multi-target build, and the Java.Interop bootstrap project reference.