Skip to content

Commit

Permalink
[xaprepare] Add AndroidToolchain scenario
Browse files Browse the repository at this point in the history
Usage: `xaprepare.exe -s=AndroidToolchain`

The step will *only* install Android SDK+NDK as well as the OpenJDK distribution
we provision. No other programs are installed or updated.
  • Loading branch information
pjcollins authored and grendello committed Jun 6, 2019
1 parent 1c26836 commit 348ba17
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -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);
}
}
}
1 change: 1 addition & 0 deletions build-tools/xaprepare/xaprepare/xaprepare.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@
<Compile Include="ConfigAndData\Runtimes.cs" />
<Compile Include="OperatingSystems\OS.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Scenarios\Scenario_AndroidToolchain.cs" />
<Compile Include="Scenarios\Scenario_PrepareExternalGitDependencies.cs" />
<Compile Include="Scenarios\Scenario_PrepareImageDependencies.cs" />
<Compile Include="Scenarios\Scenario_Required.cs" />
Expand Down

0 comments on commit 348ba17

Please sign in to comment.