Skip to content

[xaprepare] Remove empty Scenario_AndroidTestDependencies and Scenario_EmulatorTestDependencies#11731

Open
jonathanpeppers wants to merge 1 commit into
mainfrom
jonathanpeppers-remove-empty-test-dependency-scenarios
Open

[xaprepare] Remove empty Scenario_AndroidTestDependencies and Scenario_EmulatorTestDependencies#11731
jonathanpeppers wants to merge 1 commit into
mainfrom
jonathanpeppers-remove-empty-test-dependency-scenarios

Conversation

@jonathanpeppers

Copy link
Copy Markdown
Member

Summary

After PR #11636 (Provision .NET SDK via standard scripts, drop xaprepare's installer), the Scenario_AndroidTestDependencies and Scenario_EmulatorTestDependencies xaprepare scenarios are vestigial husks. Their AddSteps() methods don't call Steps.Add() at all — they only set two conditions (AllowProgramInstallation=false, IgnoreMissingPrograms=true) that affect nothing because no steps run. Scenario_EmulatorTestDependencies inherited from Scenario_AndroidTestDependencies and added nothing.

Neither scenario is invoked by any Azure DevOps pipeline (build-tools/automation/), GitHub Actions workflow (.github/), Makefile, build.sh, or build.cmd.

Changes

  • Delete build-tools/xaprepare/xaprepare/Scenarios/Scenario_AndroidTestDependencies.cs
  • Delete build-tools/xaprepare/xaprepare/Scenarios/Scenario_EmulatorTestDependencies.cs
  • Update the now-obsolete error message in GradleCLI.cs that referenced the deleted AndroidTestDependencies scenario. Gradle is committed to the repo at build-tools/gradle/, so the generic "not found" wording is sufficient.

The KnownConditions enum and its consumers (OS.cs, Program.cs, EssentialTools.cs, Context.cs) are intentionally left untouched — those conditions still have defaults and other consumers.

Verification

  • git grep -i AndroidTestDependencies → 0 matches
  • git grep -i EmulatorTestDependencies → 0 matches
  • dotnet build build-tools/xaprepare/xaprepare/xaprepare.csproj -c Debug → 0 warnings, 0 errors

Context

Part of the broader xaprepare-removal campaign: #11568, #11580, #11608, #11613, #11631, #11636, #11657, #11658.

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

After PR #11636 hollowed out `Scenario_AndroidTestDependencies` and
`Scenario_EmulatorTestDependencies`, their `AddSteps()` methods no
longer add any steps -- they only set `AllowProgramInstallation=false`
and `IgnoreMissingPrograms=true`, which have no effect when no steps
run. `Scenario_EmulatorTestDependencies` inherited from the former and
added nothing.

Delete both vestigial scenarios. Also update the now-obsolete error
message in `GradleCLI.cs` that referenced the deleted scenario; Gradle
is committed to the repo at `build-tools/gradle/`, so the generic
"not found" wording is sufficient.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 24, 2026 18:52

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

Removes two vestigial xaprepare scenarios that no longer perform any work post-#11636, and updates a test helper error message that referenced the removed scenario.

Changes:

  • Deleted Scenario_AndroidTestDependencies and Scenario_EmulatorTestDependencies from xaprepare.
  • Updated GradleCLI’s missing-gradle exception message to remove the stale AndroidTestDependencies scenario guidance.

Reviewed changes

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

File Description
src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Common/GradleCLI.cs Updates the FileNotFoundException message to no longer reference a removed xaprepare scenario.
build-tools/xaprepare/xaprepare/Scenarios/Scenario_EmulatorTestDependencies.cs Removes an empty, inherited scenario that added no steps.
build-tools/xaprepare/xaprepare/Scenarios/Scenario_AndroidTestDependencies.cs Removes an empty scenario whose AddSteps() only set conditions but registered no steps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants