Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .external
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
xamarin/monodroid:master@5784a746112babd9ef801e0a6bc3fe2694bdf64c
xamarin/monodroid:master@b12a3e8d57a5bdbdc8e829b8f2de80f3cf51e89f
mono/mono:2020-02@83105ba22461455f4343d6bb14976eba8b0b3f39
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,23 @@ public class AndroidDependenciesTests : BaseTest
public void InstallAndroidDependenciesTest ()
{
AssertCommercialBuild ();
if (IsWindows) {
// TODO: we need: https://github.com/xamarin/android-sdk-installer/pull/450
Assert.Ignore ("InstallAndroidDependencies currently fails on Windows");
}
var old = Environment.GetEnvironmentVariable ("ANDROID_SDK_PATH");
try {
string sdkPath = Path.Combine (Root, "temp", TestName, "android-sdk");
Environment.SetEnvironmentVariable ("ANDROID_SDK_PATH", sdkPath);
if (Directory.Exists (sdkPath))
Directory.Delete (sdkPath, true);
Directory.CreateDirectory (sdkPath);
var proj = new XamarinAndroidApplicationProject ();
using (var b = CreateApkBuilder ()) {
b.CleanupAfterSuccessfulBuild = false;
string defaultTarget = b.Target;
b.Target = "InstallAndroidDependencies";
Assert.IsTrue (b.Build (proj, parameters: new string [] { "AcceptAndroidSDKLicenses=true" }), "InstallAndroidDependencies should have succeeded.");
b.Target = defaultTarget;
Assert.IsTrue (b.Build (proj), "build should have succeeded.");
Assert.IsTrue (b.Build (proj, true), "build should have succeeded.");
Assert.IsTrue (b.LastBuildOutput.ContainsText ($"Output Property: _AndroidSdkDirectory={sdkPath}"), "_AndroidSdkDirectory was not set to new SDK path.");
Assert.IsTrue (b.LastBuildOutput.ContainsText ($"JavaPlatformJarPath={sdkPath}"), "JavaPlatformJarPath did not contain new SDK path.");
}
} finally {
Environment.SetEnvironmentVariable ("ANDROID_SDK_PATH", old);
Expand Down