Skip to content

Commit

Permalink
WIP $(AndroidUseSharedRuntime) fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathanpeppers committed Jul 10, 2020
1 parent 11c08fb commit 73b9e93
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ _ResolveAssemblies MSBuild target.
<ProcessAssemblies
InputAssemblies="@(_ResolvedAssemblyFiles)"
IntermediateAssemblyDirectory="$(MonoAndroidIntermediateAssemblyDir)"
UseSharedRuntime="$(AndroidUseSharedRuntime)"
LinkMode="$(AndroidLinkMode)">
<Output TaskParameter="OutputAssemblies" ItemName="ResolvedAssemblies" />
<Output TaskParameter="ShrunkAssemblies" ItemName="_ShrunkAssemblies" />
Expand Down
4 changes: 3 additions & 1 deletion src/Xamarin.Android.Build.Tasks/Tasks/ProcessAssemblies.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ public class ProcessAssemblies : AndroidTask
{
public override string TaskPrefix => "PRAS";

public bool UseSharedRuntime { get; set; }

public string LinkMode { get; set; }

[Required]
Expand Down Expand Up @@ -74,7 +76,7 @@ public override bool RunTask ()
}

// Set ShrunkAssemblies for _RemoveRegisterAttribute and <BuildApk/>
if (!string.IsNullOrEmpty (LinkMode) && !string.Equals (LinkMode, "None", StringComparison.OrdinalIgnoreCase)) {
if (!string.IsNullOrEmpty (LinkMode) && !string.Equals (LinkMode, "None", StringComparison.OrdinalIgnoreCase) && !UseSharedRuntime) {
ShrunkAssemblies = OutputAssemblies.Select (a => {
var dir = Path.GetDirectoryName (a.ItemSpec);
var file = Path.GetFileName (a.ItemSpec);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3733,6 +3733,7 @@ public void XA0115 (string abis)
}

[Test]
[Category ("dotnet")]
public void XA0119 ()
{
var proj = new XamarinAndroidApplicationProject ();
Expand All @@ -3747,6 +3748,7 @@ public void XA0119 ()
}

[Test]
[Category ("dotnet")]
public void XA0119AAB ()
{
var proj = new XamarinAndroidApplicationProject ();
Expand Down

0 comments on commit 73b9e93

Please sign in to comment.