From 70b80c87fdf1838ce8398af91533259d3a52abe2 Mon Sep 17 00:00:00 2001 From: Peter Collins Date: Tue, 4 Jun 2019 16:42:04 -0400 Subject: [PATCH] [xaprepare] Add AndroidToolchain scenario Usage: `xaprepare.exe -s=AndroidToolchain` --- .../Scenarios/Scenario_AndroidToolchain.cs | 24 +++++++++++++++++++ .../xaprepare/xaprepare/xaprepare.csproj | 1 + 2 files changed, 25 insertions(+) create mode 100644 build-tools/xaprepare/xaprepare/Scenarios/Scenario_AndroidToolchain.cs diff --git a/build-tools/xaprepare/xaprepare/Scenarios/Scenario_AndroidToolchain.cs b/build-tools/xaprepare/xaprepare/Scenarios/Scenario_AndroidToolchain.cs new file mode 100644 index 00000000000..5af6db633bb --- /dev/null +++ b/build-tools/xaprepare/xaprepare/Scenarios/Scenario_AndroidToolchain.cs @@ -0,0 +1,24 @@ +using System; + +namespace Xamarin.Android.Prepare +{ + [Scenario (isDefault: false)] + partial class Scenario_AndroidToolchain : ScenarioNoStandardEndSteps + { + public Scenario_AndroidToolchain () + : base ("AndroidToolchain", "Install Android SDK, NDK and Corretto JDK.", Context.Instance) + {} + + protected override void AddSteps (Context context) + { + Steps.Add (new Step_Android_SDK_NDK ()); + Steps.Add (new Step_InstallCorrettoOpenJDK ()); + + // disable installation of missing programs... + context.SetCondition (KnownConditions.AllowProgramInstallation, false); + + // ...but do not signal an error when any are missing + context.SetCondition (KnownConditions.IgnoreMissingPrograms, true); + } + } +} diff --git a/build-tools/xaprepare/xaprepare/xaprepare.csproj b/build-tools/xaprepare/xaprepare/xaprepare.csproj index 85bbfb54b9a..6c31aab4c92 100644 --- a/build-tools/xaprepare/xaprepare/xaprepare.csproj +++ b/build-tools/xaprepare/xaprepare/xaprepare.csproj @@ -125,6 +125,7 @@ +