Skip to content

Commit 4974ed6

Browse files
committed
ff
1 parent 8cfbc14 commit 4974ed6

File tree

2 files changed

+19
-1
lines changed

2 files changed

+19
-1
lines changed

src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/BuildTest.cs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,22 @@ public void BuildBasicApplicationReleaseFSharp ()
5454
}
5555
}
5656

57+
[Test]
58+
public void CheckKeystoreIsCreated ()
59+
{
60+
var proj = new XamarinAndroidApplicationProject () {
61+
IsRelease = true,
62+
};
63+
using (var b = CreateApkBuilder ("temp/CheckKeystoreIsCreated", false, false)) {
64+
var file = Path.Combine (Root, b.ProjectDirectory, proj.IntermediateOutputPath, "debug.keystore");
65+
var p = new string [] {
66+
$"_ApkDebugKeyStore={file}",
67+
};
68+
Assert.IsTrue (b.Build (proj, parameters: p), "Build should have succeeded.");
69+
FileAssert.Exists (file, $"{file} should have been created.");
70+
}
71+
}
72+
5773
[Test]
5874
public void FSharpAppHasAndroidDefine ()
5975
{

src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -727,7 +727,9 @@ because xbuild doesn't support framework reference assemblies.
727727
</CreateProperty>
728728

729729
<CreateProperty Value="$(_AppSettingsDirectory)debug.keystore">
730-
<Output TaskParameter="Value" PropertyName="_ApkDebugKeyStore"/>
730+
<Output TaskParameter="Value" PropertyName="_ApkDebugKeyStore"
731+
Condition="'$(_ApkDebugKeyStore)' == ''"
732+
/>
731733
</CreateProperty>
732734

733735
<CreateProperty Value="android">

0 commit comments

Comments
 (0)