[msbuild] Share the _DetectSdkLocations target. (#8755)
This commit is contained in:
Родитель
3c873f944e
Коммит
f80bacf042
|
@ -1,6 +1,3 @@
|
|||
using System;
|
||||
using System.Linq;
|
||||
|
||||
namespace Xamarin.Mac.Tasks
|
||||
{
|
||||
public class DetectSdkLocations : DetectSdkLocationsTaskBase
|
||||
|
|
|
@ -393,25 +393,6 @@ Copyright (C) 2014 Xamarin. All rights reserved.
|
|||
</UnpackLibraryResources>
|
||||
</Target>
|
||||
|
||||
<Target Name="_DetectSdkLocations" DependsOnTargets="_ComputeTargetFrameworkMoniker">
|
||||
<DetectSdkLocations
|
||||
SessionId="$(BuildSessionId)"
|
||||
Condition="'$(IsMacEnabled)' == 'true'"
|
||||
SdkVersion="$(_SdkVersion)"
|
||||
TargetFrameworkMoniker="$(_ComputedTargetFrameworkMoniker)"
|
||||
>
|
||||
<Output TaskParameter="SdkVersion" PropertyName="_SdkVersion" />
|
||||
<Output TaskParameter="SdkRoot" PropertyName="_SdkRoot" />
|
||||
<Output TaskParameter="SdkBinPath" PropertyName="_SdkBinPath" />
|
||||
<Output TaskParameter="SdkDevPath" PropertyName="_SdkDevPath" />
|
||||
<Output TaskParameter="SdkUsrPath" PropertyName="_SdkUsrPath" />
|
||||
<Output TaskParameter="SdkPlatform" PropertyName="_SdkPlatform" />
|
||||
<Output TaskParameter="SdkIsSimulator" PropertyName="_SdkIsSimulator" />
|
||||
<Output TaskParameter="IsXcode8" PropertyName="_IsXcode8" />
|
||||
<Output TaskParameter="XamarinSdkRoot" PropertyName="_XamarinSdkRoot" />
|
||||
</DetectSdkLocations>
|
||||
</Target>
|
||||
|
||||
<Target Name="_DetectSigningIdentity" DependsOnTargets="_DetectAppManifest;_ComputeTargetFrameworkMoniker">
|
||||
<DetectSigningIdentity
|
||||
Condition="'$(IsMacEnabled)' == 'true'"
|
||||
|
|
|
@ -5,10 +5,17 @@ using System.Linq;
|
|||
using Microsoft.Build.Framework;
|
||||
|
||||
using Xamarin.Localization.MSBuild;
|
||||
using Xamarin.Utils;
|
||||
|
||||
namespace Xamarin.MacDev.Tasks {
|
||||
public abstract class DetectSdkLocationsCoreTaskBase : XamarinTask {
|
||||
#region Inputs
|
||||
|
||||
public string TargetArchitectures {
|
||||
get; set;
|
||||
}
|
||||
|
||||
#endregion Inputs
|
||||
|
||||
#region Outputs
|
||||
|
||||
[Output]
|
||||
|
|
|
@ -155,6 +155,27 @@ Copyright (C) 2018 Microsoft. All rights reserved.
|
|||
<Error Condition="'$(_AppManifest)' == '' And '$(_CanOutputAppBundle)' == 'true'" Text="Info.plist not found."/>
|
||||
</Target>
|
||||
|
||||
<Target Name="_DetectSdkLocations" DependsOnTargets="_ComputeTargetArchitectures;_ComputeTargetFrameworkMoniker">
|
||||
<DetectSdkLocations
|
||||
SessionId="$(BuildSessionId)"
|
||||
Condition="'$(IsMacEnabled)' == 'true'"
|
||||
SdkVersion="$(_SdkVersion)"
|
||||
TargetFrameworkMoniker="$(_ComputedTargetFrameworkMoniker)"
|
||||
TargetArchitectures="$(TargetArchitectures)"
|
||||
>
|
||||
|
||||
<Output TaskParameter="SdkVersion" PropertyName="_SdkVersion" />
|
||||
<Output TaskParameter="SdkRoot" PropertyName="_SdkRoot" />
|
||||
<Output TaskParameter="SdkBinPath" PropertyName="_SdkBinPath" />
|
||||
<Output TaskParameter="SdkDevPath" PropertyName="_SdkDevPath" />
|
||||
<Output TaskParameter="SdkUsrPath" PropertyName="_SdkUsrPath" />
|
||||
<Output TaskParameter="SdkPlatform" PropertyName="_SdkPlatform" />
|
||||
<Output TaskParameter="SdkIsSimulator" PropertyName="_SdkIsSimulator" />
|
||||
<Output TaskParameter="IsXcode8" PropertyName="_IsXcode8" />
|
||||
<Output TaskParameter="XamarinSdkRoot" PropertyName="_XamarinSdkRoot" />
|
||||
</DetectSdkLocations>
|
||||
</Target>
|
||||
|
||||
<!-- Code signing -->
|
||||
|
||||
<PropertyGroup>
|
||||
|
|
|
@ -2,20 +2,11 @@ using System;
|
|||
|
||||
using Xamarin.MacDev.Tasks;
|
||||
using Xamarin.MacDev;
|
||||
using Xamarin.Utils;
|
||||
|
||||
namespace Xamarin.iOS.Tasks
|
||||
{
|
||||
public abstract class DetectSdkLocationsTaskBase : DetectSdkLocationsCoreTaskBase
|
||||
{
|
||||
#region Inputs
|
||||
|
||||
public string TargetArchitectures {
|
||||
get; set;
|
||||
}
|
||||
|
||||
#endregion Inputs
|
||||
|
||||
protected override IAppleSdk CurrentSdk {
|
||||
get {
|
||||
return IPhoneSdks.GetSdk (Platform);
|
||||
|
|
|
@ -582,27 +582,6 @@ Copyright (C) 2013-2016 Xamarin. All rights reserved.
|
|||
</UnpackLibraryResources>
|
||||
</Target>
|
||||
|
||||
<Target Name="_DetectSdkLocations" DependsOnTargets="_ComputeTargetArchitectures;_ComputeTargetFrameworkMoniker">
|
||||
<DetectSdkLocations
|
||||
SessionId="$(BuildSessionId)"
|
||||
Condition="'$(IsMacEnabled)' == 'true'"
|
||||
SdkVersion="$(_SdkVersion)"
|
||||
TargetFrameworkMoniker="$(_ComputedTargetFrameworkMoniker)"
|
||||
TargetArchitectures="$(TargetArchitectures)"
|
||||
>
|
||||
|
||||
<Output TaskParameter="SdkVersion" PropertyName="_SdkVersion" />
|
||||
<Output TaskParameter="SdkRoot" PropertyName="_SdkRoot" />
|
||||
<Output TaskParameter="SdkBinPath" PropertyName="_SdkBinPath" />
|
||||
<Output TaskParameter="SdkDevPath" PropertyName="_SdkDevPath" />
|
||||
<Output TaskParameter="SdkUsrPath" PropertyName="_SdkUsrPath" />
|
||||
<Output TaskParameter="SdkPlatform" PropertyName="_SdkPlatform" />
|
||||
<Output TaskParameter="SdkIsSimulator" PropertyName="_SdkIsSimulator" />
|
||||
<Output TaskParameter="IsXcode8" PropertyName="_IsXcode8" />
|
||||
<Output TaskParameter="XamarinSdkRoot" PropertyName="_XamarinSdkRoot" />
|
||||
</DetectSdkLocations>
|
||||
</Target>
|
||||
|
||||
<Target Name="_DetectSigningIdentity" Condition="'$(_CanOutputAppBundle)' == 'true'" DependsOnTargets="_DetectAppManifest;_DetectSdkLocations;_ComputeTargetFrameworkMoniker">
|
||||
<DetectSigningIdentity
|
||||
SessionId="$(BuildSessionId)"
|
||||
|
|
Загрузка…
Ссылка в новой задаче