[msbuild] Pass the entire TargetFrameworkMoniker to tasks instead of just TargetFrameworkIdentifier/TargetFrameworkVersion. (#8048)
When .NET 5 comes, the TargetFrameworkMoniker will change, and we need the entire moniker to distinguish between various platforms. So change our msbuild code to consume the entire TargetFrameworkMoniker, so that we have all the information we need when we need it. Also redirect everything through an intermediate _ComputedTargetFrameworkMoniker property, so that the target framework can be overridden without affecting any other code. This becomes necessary during the initial implementation phase, because we don't have a .NET version to test with yet that can give us the new target frameworks. Eventually it should be possible to remove this intermediate variable
This commit is contained in:
Родитель
1b72c009d2
Коммит
26ad52257e
|
@ -15,6 +15,7 @@ using Microsoft.Build.Utilities;
|
||||||
|
|
||||||
using Xamarin.MacDev.Tasks;
|
using Xamarin.MacDev.Tasks;
|
||||||
using Xamarin.MacDev;
|
using Xamarin.MacDev;
|
||||||
|
using Xamarin.Utils;
|
||||||
|
|
||||||
namespace Xamarin.Mac.Tasks
|
namespace Xamarin.Mac.Tasks
|
||||||
{
|
{
|
||||||
|
@ -42,10 +43,13 @@ namespace Xamarin.Mac.Tasks
|
||||||
public string HttpClientHandler { get; set; }
|
public string HttpClientHandler { get; set; }
|
||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
public string TargetFrameworkIdentifier { get; set; }
|
public string TargetFrameworkMoniker { get; set; }
|
||||||
|
|
||||||
[Required]
|
public string TargetFrameworkIdentifier { get { return TargetFramework.Identifier; } }
|
||||||
public string TargetFrameworkVersion { get; set; }
|
|
||||||
|
public TargetFramework TargetFramework { get { return TargetFramework.Parse (TargetFrameworkMoniker); } }
|
||||||
|
|
||||||
|
public string TargetFrameworkVersion { get { return TargetFramework.Version.ToString (); } }
|
||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
public string SdkRoot { get; set; }
|
public string SdkRoot { get; set; }
|
||||||
|
|
|
@ -26,6 +26,11 @@ Copyright (C) 2013-2014 Xamarin. All rights reserved.
|
||||||
<_XamarinCommonPropsHasBeenImported>true</_XamarinCommonPropsHasBeenImported>
|
<_XamarinCommonPropsHasBeenImported>true</_XamarinCommonPropsHasBeenImported>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<!-- Get the TargetFrameworkMoniker and store it in our own variable so that it's overridable while only affecting the parts of the build that we care about.
|
||||||
|
This is overridability is a workaround while we wait for .NET 5 to be able to give us the TFM we're supposed to get during the build. -->
|
||||||
|
<_ComputedTargetFrameworkMoniker Condition="'$(_ComputedTargetFrameworkMoniker)' == ''">$(TargetFrameworkMoniker)</_ComputedTargetFrameworkMoniker>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
<!-- Story-time! MigrateToNewXMIdentifier is special because it un-does a lie we started telling from the
|
<!-- Story-time! MigrateToNewXMIdentifier is special because it un-does a lie we started telling from the
|
||||||
beginning of Full (called Xamarin.Mac 4.5 back then). Back then, we released Modern (called Mobile) and
|
beginning of Full (called Xamarin.Mac 4.5 back then). Back then, we released Modern (called Mobile) and
|
||||||
|
|
|
@ -337,7 +337,7 @@ Copyright (C) 2014 Xamarin. All rights reserved.
|
||||||
IntermediateOutputPath="$(IntermediateOutputPath)"
|
IntermediateOutputPath="$(IntermediateOutputPath)"
|
||||||
AppManifest="$(_AppManifest)"
|
AppManifest="$(_AppManifest)"
|
||||||
ProjectDir="$(MSBuildProjectDirectory)"
|
ProjectDir="$(MSBuildProjectDirectory)"
|
||||||
TargetFrameworkIdentifier="$(TargetFrameworkIdentifier)"
|
TargetFrameworkMoniker="$(_ComputedTargetFrameworkMoniker)"
|
||||||
ResourcePrefix="$(XamMacResourcePrefix)"
|
ResourcePrefix="$(XamMacResourcePrefix)"
|
||||||
SdkDevPath="$(_SdkDevPath)"
|
SdkDevPath="$(_SdkDevPath)"
|
||||||
SdkIsSimulator="false"
|
SdkIsSimulator="false"
|
||||||
|
@ -536,8 +536,7 @@ Copyright (C) 2014 Xamarin. All rights reserved.
|
||||||
OutputPath="$(OutputPath)"
|
OutputPath="$(OutputPath)"
|
||||||
ApplicationName="$(_AppBundleName)"
|
ApplicationName="$(_AppBundleName)"
|
||||||
ApplicationAssembly="$(OutputPath)$(TargetName)$(TargetExt)"
|
ApplicationAssembly="$(OutputPath)$(TargetName)$(TargetExt)"
|
||||||
TargetFrameworkIdentifier="$(TargetFrameworkIdentifier)"
|
TargetFrameworkMoniker="$(_ComputedTargetFrameworkMoniker)"
|
||||||
TargetFrameworkVersion="$(TargetFrameworkVersion)"
|
|
||||||
UseXamMacFullFramework="$(UseXamMacFullFramework)"
|
UseXamMacFullFramework="$(UseXamMacFullFramework)"
|
||||||
Architecture="$(XamMacArch)"
|
Architecture="$(XamMacArch)"
|
||||||
ArchiveSymbols="$(MonoSymbolArchive)"
|
ArchiveSymbols="$(MonoSymbolArchive)"
|
||||||
|
@ -591,7 +590,7 @@ Copyright (C) 2014 Xamarin. All rights reserved.
|
||||||
SdkRoot="$(_SdkRoot)"
|
SdkRoot="$(_SdkRoot)"
|
||||||
SdkDevPath="$(_SdkDevPath)"
|
SdkDevPath="$(_SdkDevPath)"
|
||||||
SdkVersion="$(MacOSXSdkVersion)"
|
SdkVersion="$(MacOSXSdkVersion)"
|
||||||
TargetFrameworkIdentifier="$(TargetFrameworkIdentifier)"
|
TargetFrameworkMoniker="$(_ComputedTargetFrameworkMoniker)"
|
||||||
IntermediateOutputPath="$(IntermediateOutputPath)"
|
IntermediateOutputPath="$(IntermediateOutputPath)"
|
||||||
InputScene="%(_ColladaAssetWithLogicalName.Identity)"
|
InputScene="%(_ColladaAssetWithLogicalName.Identity)"
|
||||||
OutputScene="$(IntermediateOutputPath)%(_ColladaAssetWithLogicalName.LogicalName)">
|
OutputScene="$(IntermediateOutputPath)%(_ColladaAssetWithLogicalName.LogicalName)">
|
||||||
|
@ -679,7 +678,7 @@ Copyright (C) 2014 Xamarin. All rights reserved.
|
||||||
ToolPath="$(CopySceneKitAssetsPath)"
|
ToolPath="$(CopySceneKitAssetsPath)"
|
||||||
SceneKitAssets="@(SceneKitAsset)"
|
SceneKitAssets="@(SceneKitAsset)"
|
||||||
IntermediateOutputPath="$(IntermediateOutputPath)"
|
IntermediateOutputPath="$(IntermediateOutputPath)"
|
||||||
TargetFrameworkIdentifier="$(TargetFrameworkIdentifier)"
|
TargetFrameworkMoniker="$(_ComputedTargetFrameworkMoniker)"
|
||||||
ProjectDir="$(MSBuildProjectDirectory)"
|
ProjectDir="$(MSBuildProjectDirectory)"
|
||||||
ResourcePrefix="$(XamMacResourcePrefix)"
|
ResourcePrefix="$(XamMacResourcePrefix)"
|
||||||
SdkPlatform="MacOSX"
|
SdkPlatform="MacOSX"
|
||||||
|
|
|
@ -109,7 +109,7 @@ Copyright (C) 2014 Xamarin Inc. All rights reserved.
|
||||||
ProcessEnums="$(ProcessEnums)"
|
ProcessEnums="$(ProcessEnums)"
|
||||||
ProjectDir="$(MSBuildProjectDirectory)"
|
ProjectDir="$(MSBuildProjectDirectory)"
|
||||||
References="@(ReferencePath);@(BTouchReferencePath)"
|
References="@(ReferencePath);@(BTouchReferencePath)"
|
||||||
TargetFrameworkIdentifier="$(TargetFrameworkIdentifier)"
|
TargetFrameworkMoniker="$(_ComputedTargetFrameworkMoniker)"
|
||||||
FrameworkRoot="$(XamarinMacFrameworkRoot)"
|
FrameworkRoot="$(XamarinMacFrameworkRoot)"
|
||||||
BTouchToolPath="$(BTouchToolPath)"
|
BTouchToolPath="$(BTouchToolPath)"
|
||||||
BTouchToolExe="$(BTouchToolExe)"
|
BTouchToolExe="$(BTouchToolExe)"
|
||||||
|
|
|
@ -24,6 +24,12 @@ Copyright (C) 2014 Xamarin. All rights reserved.
|
||||||
<_XamarinCommonBindingPropsHasBeenImported>true</_XamarinCommonBindingPropsHasBeenImported>
|
<_XamarinCommonBindingPropsHasBeenImported>true</_XamarinCommonBindingPropsHasBeenImported>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<!-- Get the TargetFrameworkMoniker and store it in our own variable so that it's overridable while only affecting the parts of the build that we care about.
|
||||||
|
This is overridability is a workaround while we wait for .NET 5 to be able to give us the TFM we're supposed to get during the build. -->
|
||||||
|
<_ComputedTargetFrameworkMoniker Condition="'$(_ComputedTargetFrameworkMoniker)' == ''">$(TargetFrameworkMoniker)</_ComputedTargetFrameworkMoniker>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<BaseLibDllPath>$(MacBclPath)/Xamarin.Mac.dll</BaseLibDllPath>
|
<BaseLibDllPath>$(MacBclPath)/Xamarin.Mac.dll</BaseLibDllPath>
|
||||||
<BTouchToolPath>$(XamarinMacFrameworkRoot)/bin/</BTouchToolPath>
|
<BTouchToolPath>$(XamarinMacFrameworkRoot)/bin/</BTouchToolPath>
|
||||||
|
|
|
@ -31,27 +31,14 @@ namespace Xamarin.MacDev.Tasks
|
||||||
{
|
{
|
||||||
public static class PlatformFrameworkHelper
|
public static class PlatformFrameworkHelper
|
||||||
{
|
{
|
||||||
public static ApplePlatform GetFramework (string targetFrameworkIdentifier)
|
public static ApplePlatform GetFramework (string targetFrameworkMoniker)
|
||||||
{
|
{
|
||||||
switch (targetFrameworkIdentifier) {
|
return TargetFramework.Parse (targetFrameworkMoniker).Platform;
|
||||||
case "Xamarin.Mac":
|
|
||||||
case "MonoMac":
|
|
||||||
return ApplePlatform.MacOSX;
|
|
||||||
case "Xamarin.iOS":
|
|
||||||
case "MonoTouch":
|
|
||||||
return ApplePlatform.iOS;
|
|
||||||
case "Xamarin.WatchOS":
|
|
||||||
return ApplePlatform.WatchOS;
|
|
||||||
case "Xamarin.TVOS":
|
|
||||||
return ApplePlatform.TVOS;
|
|
||||||
default:
|
|
||||||
throw new InvalidOperationException ("Unknown TargetFrameworkIdentifier: " + targetFrameworkIdentifier);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string GetOperatingSystem (string targetFrameworkIdentifier)
|
public static string GetOperatingSystem (string targetFrameworkMoniker)
|
||||||
{
|
{
|
||||||
var framework = PlatformFrameworkHelper.GetFramework (targetFrameworkIdentifier);
|
var framework = PlatformFrameworkHelper.GetFramework (targetFrameworkMoniker);
|
||||||
switch (framework) {
|
switch (framework) {
|
||||||
case ApplePlatform.WatchOS:
|
case ApplePlatform.WatchOS:
|
||||||
return "watchos";
|
return "watchos";
|
||||||
|
@ -62,7 +49,7 @@ namespace Xamarin.MacDev.Tasks
|
||||||
case ApplePlatform.iOS:
|
case ApplePlatform.iOS:
|
||||||
return "ios";
|
return "ios";
|
||||||
default:
|
default:
|
||||||
throw new InvalidOperationException (string.Format ("Unknown target framework {0} for target framework identifier {2}.", framework, targetFrameworkIdentifier));
|
throw new InvalidOperationException (string.Format ("Unknown target framework {0} for target framework moniker {2}.", framework, targetFrameworkMoniker));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,11 +26,13 @@ namespace Xamarin.MacDev.Tasks
|
||||||
public string FilePath { get; set; }
|
public string FilePath { get; set; }
|
||||||
|
|
||||||
protected ApplePlatform FileType {
|
protected ApplePlatform FileType {
|
||||||
get { return PlatformFrameworkHelper.GetFramework (TargetFrameworkIdentifier); }
|
get { return PlatformFrameworkHelper.GetFramework (TargetFrameworkMoniker); }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public TargetFramework TargetFramework { get { return TargetFramework.Parse (TargetFrameworkMoniker); } }
|
||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
public string TargetFrameworkIdentifier { get; set; }
|
public string TargetFrameworkMoniker { get; set; }
|
||||||
|
|
||||||
protected override string ToolName {
|
protected override string ToolName {
|
||||||
get { return "altool"; }
|
get { return "altool"; }
|
||||||
|
|
|
@ -7,6 +7,8 @@ using System.Collections.Generic;
|
||||||
using Microsoft.Build.Framework;
|
using Microsoft.Build.Framework;
|
||||||
using Microsoft.Build.Utilities;
|
using Microsoft.Build.Utilities;
|
||||||
|
|
||||||
|
using Xamarin.Utils;
|
||||||
|
|
||||||
namespace Xamarin.MacDev.Tasks {
|
namespace Xamarin.MacDev.Tasks {
|
||||||
public abstract class BTouchTaskBase : ToolTask {
|
public abstract class BTouchTaskBase : ToolTask {
|
||||||
|
|
||||||
|
@ -63,8 +65,12 @@ namespace Xamarin.MacDev.Tasks {
|
||||||
|
|
||||||
public ITaskItem[] Sources { get; set; }
|
public ITaskItem[] Sources { get; set; }
|
||||||
|
|
||||||
|
public string TargetFrameworkIdentifier { get { return TargetFramework.Identifier; } }
|
||||||
|
|
||||||
|
public TargetFramework TargetFramework { get { return TargetFramework.Parse (TargetFrameworkMoniker); } }
|
||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
public string TargetFrameworkIdentifier { get; set; }
|
public string TargetFrameworkMoniker { get; set; }
|
||||||
|
|
||||||
protected override string ToolName {
|
protected override string ToolName {
|
||||||
get { return Path.GetFileNameWithoutExtension (ToolExe); }
|
get { return Path.GetFileNameWithoutExtension (ToolExe); }
|
||||||
|
|
|
@ -7,6 +7,7 @@ using Microsoft.Build.Framework;
|
||||||
using Microsoft.Build.Utilities;
|
using Microsoft.Build.Utilities;
|
||||||
|
|
||||||
using Xamarin.MacDev;
|
using Xamarin.MacDev;
|
||||||
|
using Xamarin.Utils;
|
||||||
|
|
||||||
namespace Xamarin.MacDev.Tasks
|
namespace Xamarin.MacDev.Tasks
|
||||||
{
|
{
|
||||||
|
@ -47,8 +48,10 @@ namespace Xamarin.MacDev.Tasks
|
||||||
[Required]
|
[Required]
|
||||||
public string SdkVersion { get; set; }
|
public string SdkVersion { get; set; }
|
||||||
|
|
||||||
|
public TargetFramework TargetFramework { get { return TargetFramework.Parse (TargetFrameworkMoniker); } }
|
||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
public string TargetFrameworkIdentifier { get; set; }
|
public string TargetFrameworkMoniker { get; set; }
|
||||||
|
|
||||||
public string ToolExe {
|
public string ToolExe {
|
||||||
get { return toolExe ?? ToolName; }
|
get { return toolExe ?? ToolName; }
|
||||||
|
@ -72,7 +75,7 @@ namespace Xamarin.MacDev.Tasks
|
||||||
|
|
||||||
protected virtual string OperatingSystem {
|
protected virtual string OperatingSystem {
|
||||||
get {
|
get {
|
||||||
return PlatformFrameworkHelper.GetOperatingSystem (TargetFrameworkIdentifier);
|
return PlatformFrameworkHelper.GetOperatingSystem (TargetFrameworkMoniker);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,6 +6,7 @@ using Microsoft.Build.Framework;
|
||||||
using Microsoft.Build.Utilities;
|
using Microsoft.Build.Utilities;
|
||||||
|
|
||||||
using Xamarin.MacDev;
|
using Xamarin.MacDev;
|
||||||
|
using Xamarin.MacDev.Tasks;
|
||||||
using Xamarin.Utils;
|
using Xamarin.Utils;
|
||||||
|
|
||||||
namespace Xamarin.MacDev.Tasks
|
namespace Xamarin.MacDev.Tasks
|
||||||
|
@ -42,8 +43,10 @@ namespace Xamarin.MacDev.Tasks
|
||||||
[Required]
|
[Required]
|
||||||
public ITaskItem SourceFile { get; set; }
|
public ITaskItem SourceFile { get; set; }
|
||||||
|
|
||||||
|
public TargetFramework TargetFramework { get { return TargetFramework.Parse (TargetFrameworkMoniker); } }
|
||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
public string TargetFrameworkIdentifier { get; set; }
|
public string TargetFrameworkMoniker { get; set; }
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
@ -56,7 +59,7 @@ namespace Xamarin.MacDev.Tasks
|
||||||
|
|
||||||
protected virtual string OperatingSystem {
|
protected virtual string OperatingSystem {
|
||||||
get {
|
get {
|
||||||
switch (PlatformFrameworkHelper.GetFramework (TargetFrameworkIdentifier)) {
|
switch (PlatformFrameworkHelper.GetFramework (TargetFrameworkMoniker)) {
|
||||||
case ApplePlatform.WatchOS:
|
case ApplePlatform.WatchOS:
|
||||||
return SdkIsSimulator ? "watchos-simulator" : "watchos";
|
return SdkIsSimulator ? "watchos-simulator" : "watchos";
|
||||||
case ApplePlatform.TVOS:
|
case ApplePlatform.TVOS:
|
||||||
|
@ -66,7 +69,7 @@ namespace Xamarin.MacDev.Tasks
|
||||||
case ApplePlatform.iOS:
|
case ApplePlatform.iOS:
|
||||||
return SdkIsSimulator ? "iphonesimulator" : "ios";
|
return SdkIsSimulator ? "iphonesimulator" : "ios";
|
||||||
default:
|
default:
|
||||||
Log.LogError ($"Unknown target framework identifier: {TargetFrameworkIdentifier}.");
|
Log.LogError ($"Unknown target framework moniker: {TargetFrameworkMoniker}.");
|
||||||
return string.Empty;
|
return string.Empty;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,7 +40,7 @@ namespace Xamarin.MacDev.Tasks
|
||||||
}
|
}
|
||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
public string TargetFrameworkIdentifier { get; set; }
|
public string TargetFrameworkMoniker { get; set; }
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ namespace Xamarin.MacDev.Tasks
|
||||||
|
|
||||||
protected virtual string OperatingSystem {
|
protected virtual string OperatingSystem {
|
||||||
get {
|
get {
|
||||||
return PlatformFrameworkHelper.GetOperatingSystem (TargetFrameworkIdentifier);
|
return PlatformFrameworkHelper.GetOperatingSystem (TargetFrameworkMoniker);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -59,9 +59,9 @@ namespace Xamarin.iOS.Tasks
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static AppleSdk GetSdk (string targetFrameworkIdentifier)
|
public static AppleSdk GetSdk (string targetFrameworkMoniker)
|
||||||
{
|
{
|
||||||
return GetSdk (PlatformFrameworkHelper.GetFramework (targetFrameworkIdentifier));
|
return GetSdk (PlatformFrameworkHelper.GetFramework (targetFrameworkMoniker));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,8 +31,10 @@ namespace Xamarin.iOS.Tasks
|
||||||
|
|
||||||
public string TargetArchitectures { get; set; }
|
public string TargetArchitectures { get; set; }
|
||||||
|
|
||||||
|
public TargetFramework TargetFramework { get { return TargetFramework.Parse (TargetFrameworkMoniker); } }
|
||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
public string TargetFrameworkIdentifier { get; set; }
|
public string TargetFrameworkMoniker { get; set; }
|
||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
public bool Debug { get; set; }
|
public bool Debug { get; set; }
|
||||||
|
@ -44,7 +46,7 @@ namespace Xamarin.iOS.Tasks
|
||||||
public string ResourceRules { get; set; }
|
public string ResourceRules { get; set; }
|
||||||
|
|
||||||
public ApplePlatform Framework {
|
public ApplePlatform Framework {
|
||||||
get { return PlatformFrameworkHelper.GetFramework (TargetFrameworkIdentifier); }
|
get { return PlatformFrameworkHelper.GetFramework (TargetFrameworkMoniker); }
|
||||||
}
|
}
|
||||||
|
|
||||||
TargetArchitecture architectures;
|
TargetArchitecture architectures;
|
||||||
|
|
|
@ -5,16 +5,18 @@ using System.Collections.Generic;
|
||||||
using Microsoft.Build.Framework;
|
using Microsoft.Build.Framework;
|
||||||
using Microsoft.Build.Utilities;
|
using Microsoft.Build.Utilities;
|
||||||
|
|
||||||
using Xamarin.MacDev;
|
using Xamarin.Utils;
|
||||||
|
|
||||||
namespace Xamarin.iOS.Tasks
|
namespace Xamarin.iOS.Tasks
|
||||||
{
|
{
|
||||||
public abstract class CompileEntitlementsTaskBase : Xamarin.MacDev.Tasks.CompileEntitlementsTaskBase
|
public abstract class CompileEntitlementsTaskBase : Xamarin.MacDev.Tasks.CompileEntitlementsTaskBase
|
||||||
{
|
{
|
||||||
public bool SdkIsSimulator { get; set; }
|
public bool SdkIsSimulator { get; set; }
|
||||||
|
|
||||||
|
public TargetFramework TargetFramework { get { return TargetFramework.Parse (TargetFrameworkMoniker); } }
|
||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
public string TargetFrameworkIdentifier { get; set; }
|
public string TargetFrameworkMoniker { get; set; }
|
||||||
|
|
||||||
static readonly HashSet<string> allowedProvisioningKeys = new HashSet<string> {
|
static readonly HashSet<string> allowedProvisioningKeys = new HashSet<string> {
|
||||||
"application-identifier",
|
"application-identifier",
|
||||||
|
@ -40,7 +42,7 @@ namespace Xamarin.iOS.Tasks
|
||||||
|
|
||||||
protected override string DefaultEntitlementsPath {
|
protected override string DefaultEntitlementsPath {
|
||||||
get {
|
get {
|
||||||
return Path.Combine (IPhoneSdks.GetSdk (TargetFrameworkIdentifier).GetSdkPath (SdkVersion, false), "Entitlements.plist");
|
return Path.Combine (IPhoneSdks.GetSdk (TargetFrameworkMoniker).GetSdkPath (SdkVersion, false), "Entitlements.plist");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -23,8 +23,10 @@ namespace Xamarin.iOS.Tasks
|
||||||
get; set;
|
get; set;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public TargetFramework TargetFramework { get { return TargetFramework.Parse (TargetFrameworkMoniker); } }
|
||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
public string TargetFrameworkIdentifier {
|
public string TargetFrameworkMoniker {
|
||||||
get; set;
|
get; set;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -78,7 +80,7 @@ namespace Xamarin.iOS.Tasks
|
||||||
#endregion Outputs
|
#endregion Outputs
|
||||||
|
|
||||||
public ApplePlatform Framework {
|
public ApplePlatform Framework {
|
||||||
get { return PlatformFrameworkHelper.GetFramework (TargetFrameworkIdentifier); }
|
get { return PlatformFrameworkHelper.GetFramework (TargetFrameworkMoniker); }
|
||||||
}
|
}
|
||||||
|
|
||||||
public AppleSdk CurrentSdk {
|
public AppleSdk CurrentSdk {
|
||||||
|
@ -120,14 +122,6 @@ namespace Xamarin.iOS.Tasks
|
||||||
return !Log.HasLoggedErrors;
|
return !Log.HasLoggedErrors;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool IsWatchFramework {
|
|
||||||
get { return TargetFrameworkIdentifier == "Xamarin.WatchOS"; }
|
|
||||||
}
|
|
||||||
|
|
||||||
bool IsTVOSFramework {
|
|
||||||
get { return TargetFrameworkIdentifier == "Xamarin.TVOS"; }
|
|
||||||
}
|
|
||||||
|
|
||||||
void EnsureTVOSSdkPath ()
|
void EnsureTVOSSdkPath ()
|
||||||
{
|
{
|
||||||
var currentSdk = IPhoneSdks.GetSdk (Framework);
|
var currentSdk = IPhoneSdks.GetSdk (Framework);
|
||||||
|
|
|
@ -9,17 +9,19 @@ namespace Xamarin.iOS.Tasks
|
||||||
{
|
{
|
||||||
public abstract class DetectSigningIdentityTaskBase : Xamarin.MacDev.Tasks.DetectSigningIdentityTaskBase
|
public abstract class DetectSigningIdentityTaskBase : Xamarin.MacDev.Tasks.DetectSigningIdentityTaskBase
|
||||||
{
|
{
|
||||||
|
public TargetFramework TargetFramework { get { return TargetFramework.Parse (TargetFrameworkMoniker); } }
|
||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
public string TargetFrameworkIdentifier { get; set; }
|
public string TargetFrameworkMoniker { get; set; }
|
||||||
|
|
||||||
static readonly string[] directDistributionPrefixes = new string[0];
|
static readonly string[] directDistributionPrefixes = new string[0];
|
||||||
|
|
||||||
protected override string[] DevelopmentPrefixes { get { return IPhoneCertificate.DevelopmentPrefixes; } }
|
protected override string[] DevelopmentPrefixes { get { return IPhoneCertificate.DevelopmentPrefixes; } }
|
||||||
protected override string[] DirectDistributionPrefixes { get { return directDistributionPrefixes; } }
|
protected override string[] DirectDistributionPrefixes { get { return directDistributionPrefixes; } }
|
||||||
protected override string[] AppStoreDistributionPrefixes { get { return IPhoneCertificate.DistributionPrefixes; } }
|
protected override string[] AppStoreDistributionPrefixes { get { return IPhoneCertificate.DistributionPrefixes; } }
|
||||||
protected override string DeveloperRoot { get { return IPhoneSdks.GetSdk (TargetFrameworkIdentifier).DeveloperRoot; } }
|
protected override string DeveloperRoot { get { return IPhoneSdks.GetSdk (TargetFrameworkMoniker).DeveloperRoot; } }
|
||||||
protected override ApplePlatform Framework {
|
protected override ApplePlatform Framework {
|
||||||
get { return PlatformFrameworkHelper.GetFramework (TargetFrameworkIdentifier); }
|
get { return PlatformFrameworkHelper.GetFramework (TargetFrameworkMoniker); }
|
||||||
}
|
}
|
||||||
protected override string PlatformName {
|
protected override string PlatformName {
|
||||||
get {
|
get {
|
||||||
|
|
|
@ -149,11 +149,14 @@ namespace Xamarin.iOS.Tasks
|
||||||
[Required]
|
[Required]
|
||||||
public string SymbolsList { get; set; }
|
public string SymbolsList { get; set; }
|
||||||
|
|
||||||
[Required]
|
public string TargetFrameworkIdentifier { get { return TargetFramework.Identifier; } }
|
||||||
public string TargetFrameworkIdentifier { get; set; }
|
|
||||||
|
public TargetFramework TargetFramework { get { return TargetFramework.Parse (TargetFrameworkMoniker); } }
|
||||||
|
|
||||||
|
public string TargetFrameworkVersion { get { return TargetFramework.Version.ToString (); } }
|
||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
public string TargetFrameworkVersion { get; set; }
|
public string TargetFrameworkMoniker { get; set; }
|
||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
public bool UseLlvm { get; set; }
|
public bool UseLlvm { get; set; }
|
||||||
|
@ -187,7 +190,7 @@ namespace Xamarin.iOS.Tasks
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
public ApplePlatform Framework {
|
public ApplePlatform Framework {
|
||||||
get { return PlatformFrameworkHelper.GetFramework (TargetFrameworkIdentifier); }
|
get { return PlatformFrameworkHelper.GetFramework (TargetFrameworkMoniker); }
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override string ToolName {
|
protected override string ToolName {
|
||||||
|
|
|
@ -25,8 +25,10 @@ namespace Xamarin.iOS.Tasks
|
||||||
[Required]
|
[Required]
|
||||||
public string OutputPath { get; set; }
|
public string OutputPath { get; set; }
|
||||||
|
|
||||||
|
public TargetFramework TargetFramework { get { return TargetFramework.Parse (TargetFrameworkMoniker); } }
|
||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
public string TargetFrameworkIdentifier { get; set; }
|
public string TargetFrameworkMoniker { get; set; }
|
||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
public string TargetiOSDevice { get; set; }
|
public string TargetiOSDevice { get; set; }
|
||||||
|
@ -59,7 +61,7 @@ namespace Xamarin.iOS.Tasks
|
||||||
PDictionary plist, device;
|
PDictionary plist, device;
|
||||||
PString value, os;
|
PString value, os;
|
||||||
|
|
||||||
switch (PlatformFrameworkHelper.GetFramework (TargetFrameworkIdentifier)) {
|
switch (PlatformFrameworkHelper.GetFramework (TargetFrameworkMoniker)) {
|
||||||
case ApplePlatform.WatchOS:
|
case ApplePlatform.WatchOS:
|
||||||
targetOperatingSystem = "watchOS";
|
targetOperatingSystem = "watchOS";
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -6,6 +6,7 @@ using Microsoft.Build.Utilities;
|
||||||
|
|
||||||
using Xamarin.MacDev.Tasks;
|
using Xamarin.MacDev.Tasks;
|
||||||
using Xamarin.MacDev;
|
using Xamarin.MacDev;
|
||||||
|
using Xamarin.Utils;
|
||||||
|
|
||||||
namespace Xamarin.iOS.Tasks
|
namespace Xamarin.iOS.Tasks
|
||||||
{
|
{
|
||||||
|
@ -22,8 +23,10 @@ namespace Xamarin.iOS.Tasks
|
||||||
[Required]
|
[Required]
|
||||||
public string SdkVersion { get; set; }
|
public string SdkVersion { get; set; }
|
||||||
|
|
||||||
|
public TargetFramework TargetFramework { get { return TargetFramework.Parse (TargetFrameworkMoniker); } }
|
||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
public string TargetFrameworkIdentifier { get; set; }
|
public string TargetFrameworkMoniker { get; set; }
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
@ -36,13 +39,13 @@ namespace Xamarin.iOS.Tasks
|
||||||
|
|
||||||
bool IsWatchFramework {
|
bool IsWatchFramework {
|
||||||
get {
|
get {
|
||||||
return TargetFrameworkIdentifier == "Xamarin.WatchOS";
|
return PlatformFrameworkHelper.GetFramework (TargetFrameworkMoniker) == Utils.ApplePlatform.WatchOS;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public override bool Execute ()
|
public override bool Execute ()
|
||||||
{
|
{
|
||||||
var currentSdk = IPhoneSdks.GetSdk (TargetFrameworkIdentifier);
|
var currentSdk = IPhoneSdks.GetSdk (TargetFrameworkMoniker);
|
||||||
IPhoneSdkVersion version;
|
IPhoneSdkVersion version;
|
||||||
string sdk_path;
|
string sdk_path;
|
||||||
|
|
||||||
|
|
|
@ -24,12 +24,12 @@ namespace Xamarin.iOS.Tasks
|
||||||
public bool SdkIsSimulator { get; set; }
|
public bool SdkIsSimulator { get; set; }
|
||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
public string TargetFrameworkIdentifier { get; set; }
|
public string TargetFrameworkMoniker { get; set; }
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
public ApplePlatform Framework {
|
public ApplePlatform Framework {
|
||||||
get { return PlatformFrameworkHelper.GetFramework (TargetFrameworkIdentifier); }
|
get { return PlatformFrameworkHelper.GetFramework (TargetFrameworkMoniker); }
|
||||||
}
|
}
|
||||||
|
|
||||||
void ValidateAppExtension (string path, string mainBundleIdentifier, string mainShortVersionString, string mainVersion)
|
void ValidateAppExtension (string path, string mainBundleIdentifier, string mainShortVersionString, string mainVersion)
|
||||||
|
|
|
@ -58,7 +58,7 @@ Copyright (C) 2015-2016 Xamarin. All rights reserved.
|
||||||
SessionId="$(BuildSessionId)"
|
SessionId="$(BuildSessionId)"
|
||||||
SdkVersion="$(MtouchSdkVersion)"
|
SdkVersion="$(MtouchSdkVersion)"
|
||||||
SdkIsSimulator="$(_SdkIsSimulator)"
|
SdkIsSimulator="$(_SdkIsSimulator)"
|
||||||
TargetFrameworkIdentifier="$(TargetFrameworkIdentifier)"
|
TargetFrameworkMoniker="$(_ComputedTargetFrameworkMoniker)"
|
||||||
>
|
>
|
||||||
<Output TaskParameter="NativeWatchApp" PropertyName="_NativeWatchApp" />
|
<Output TaskParameter="NativeWatchApp" PropertyName="_NativeWatchApp" />
|
||||||
</ResolveNativeWatchApp>
|
</ResolveNativeWatchApp>
|
||||||
|
|
|
@ -24,6 +24,12 @@ Copyright (C) 2013-2016 Xamarin. All rights reserved.
|
||||||
<_XamarinCommonPropsHasBeenImported>true</_XamarinCommonPropsHasBeenImported>
|
<_XamarinCommonPropsHasBeenImported>true</_XamarinCommonPropsHasBeenImported>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<!-- Get the TargetFrameworkMoniker and store it in our own variable so that it's overridable while only affecting the parts of the build that we care about.
|
||||||
|
This is overridability is a workaround while we wait for .NET 5 to be able to give us the TFM we're supposed to get during the build. -->
|
||||||
|
<_ComputedTargetFrameworkMoniker Condition="'$(_ComputedTargetFrameworkMoniker)' == ''">$(TargetFrameworkMoniker)</_ComputedTargetFrameworkMoniker>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
<!-- When looking for related files to copy, look for Mono debugging files as well -->
|
<!-- When looking for related files to copy, look for Mono debugging files as well -->
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<AllowedReferenceRelatedFileExtensions>
|
<AllowedReferenceRelatedFileExtensions>
|
||||||
|
|
|
@ -230,7 +230,7 @@ Copyright (C) 2013-2016 Xamarin. All rights reserved.
|
||||||
Architectures="$(MtouchArch)"
|
Architectures="$(MtouchArch)"
|
||||||
IntermediateOutputPath="$(IntermediateOutputPath)"
|
IntermediateOutputPath="$(IntermediateOutputPath)"
|
||||||
OutputPath="$(OutputPath)"
|
OutputPath="$(OutputPath)"
|
||||||
TargetFrameworkIdentifier="$(TargetFrameworkIdentifier)"
|
TargetFrameworkMoniker="$(_ComputedTargetFrameworkMoniker)"
|
||||||
TargetiOSDevice="$(TargetiOSDevice)"
|
TargetiOSDevice="$(TargetiOSDevice)"
|
||||||
>
|
>
|
||||||
<Output TaskParameter="DeviceSpecificIntermediateOutputPath" PropertyName="DeviceSpecificIntermediateOutputPath" />
|
<Output TaskParameter="DeviceSpecificIntermediateOutputPath" PropertyName="DeviceSpecificIntermediateOutputPath" />
|
||||||
|
@ -427,7 +427,7 @@ Copyright (C) 2013-2016 Xamarin. All rights reserved.
|
||||||
Username="$(Username)"
|
Username="$(Username)"
|
||||||
Password="$(Password)"
|
Password="$(Password)"
|
||||||
FilePath="$(FilePath)"
|
FilePath="$(FilePath)"
|
||||||
TargetFrameworkIdentifier="$(TargetFrameworkIdentifier)"
|
TargetFrameworkMoniker="$(_ComputedTargetFrameworkMoniker)"
|
||||||
SdkDevPath="$(_SdkDevPath)"
|
SdkDevPath="$(_SdkDevPath)"
|
||||||
/>
|
/>
|
||||||
</Target>
|
</Target>
|
||||||
|
@ -438,7 +438,7 @@ Copyright (C) 2013-2016 Xamarin. All rights reserved.
|
||||||
Username="$(Username)"
|
Username="$(Username)"
|
||||||
Password="$(Password)"
|
Password="$(Password)"
|
||||||
FilePath="$(FilePath)"
|
FilePath="$(FilePath)"
|
||||||
TargetFrameworkIdentifier="$(TargetFrameworkIdentifier)"
|
TargetFrameworkMoniker="$(_ComputedTargetFrameworkMoniker)"
|
||||||
SdkDevPath="$(_SdkDevPath)"
|
SdkDevPath="$(_SdkDevPath)"
|
||||||
/>
|
/>
|
||||||
</Target>
|
</Target>
|
||||||
|
@ -608,7 +608,7 @@ Copyright (C) 2013-2016 Xamarin. All rights reserved.
|
||||||
IntermediateOutputPath="$(DeviceSpecificIntermediateOutputPath)"
|
IntermediateOutputPath="$(DeviceSpecificIntermediateOutputPath)"
|
||||||
AppManifest="$(_AppManifest)"
|
AppManifest="$(_AppManifest)"
|
||||||
ProjectDir="$(MSBuildProjectDirectory)"
|
ProjectDir="$(MSBuildProjectDirectory)"
|
||||||
TargetFrameworkIdentifier="$(TargetFrameworkIdentifier)"
|
TargetFrameworkMoniker="$(_ComputedTargetFrameworkMoniker)"
|
||||||
ResourcePrefix="$(IPhoneResourcePrefix)"
|
ResourcePrefix="$(IPhoneResourcePrefix)"
|
||||||
SdkDevPath="$(_SdkDevPath)"
|
SdkDevPath="$(_SdkDevPath)"
|
||||||
SdkIsSimulator="$(_SdkIsSimulator)"
|
SdkIsSimulator="$(_SdkIsSimulator)"
|
||||||
|
@ -681,7 +681,7 @@ Copyright (C) 2013-2016 Xamarin. All rights reserved.
|
||||||
SessionId="$(BuildSessionId)"
|
SessionId="$(BuildSessionId)"
|
||||||
Condition="'$(IsMacEnabled)' == 'true'"
|
Condition="'$(IsMacEnabled)' == 'true'"
|
||||||
SdkVersion="$(MtouchSdkVersion)"
|
SdkVersion="$(MtouchSdkVersion)"
|
||||||
TargetFrameworkIdentifier="$(TargetFrameworkIdentifier)"
|
TargetFrameworkMoniker="$(_ComputedTargetFrameworkMoniker)"
|
||||||
TargetArchitectures="$(TargetArchitectures)"
|
TargetArchitectures="$(TargetArchitectures)"
|
||||||
>
|
>
|
||||||
|
|
||||||
|
@ -709,7 +709,7 @@ Copyright (C) 2013-2016 Xamarin. All rights reserved.
|
||||||
SdkPlatform="$(_SdkPlatform)"
|
SdkPlatform="$(_SdkPlatform)"
|
||||||
ProvisioningProfile="$(CodesignProvision)"
|
ProvisioningProfile="$(CodesignProvision)"
|
||||||
SigningKey="$(CodesignKey)"
|
SigningKey="$(CodesignKey)"
|
||||||
TargetFrameworkIdentifier="$(TargetFrameworkIdentifier)"
|
TargetFrameworkMoniker="$(_ComputedTargetFrameworkMoniker)"
|
||||||
>
|
>
|
||||||
|
|
||||||
<Output TaskParameter="DetectedAppId" PropertyName="_AppIdentifier" />
|
<Output TaskParameter="DetectedAppId" PropertyName="_AppIdentifier" />
|
||||||
|
@ -785,7 +785,7 @@ Copyright (C) 2013-2016 Xamarin. All rights reserved.
|
||||||
PartialAppManifests="@(_PartialAppManifest)"
|
PartialAppManifests="@(_PartialAppManifest)"
|
||||||
ResourceRules="$(_PreparedResourceRules)"
|
ResourceRules="$(_PreparedResourceRules)"
|
||||||
TargetArchitectures="$(TargetArchitectures)"
|
TargetArchitectures="$(TargetArchitectures)"
|
||||||
TargetFrameworkIdentifier="$(TargetFrameworkIdentifier)"
|
TargetFrameworkMoniker="$(_ComputedTargetFrameworkMoniker)"
|
||||||
SdkPlatform="$(_SdkPlatform)"
|
SdkPlatform="$(_SdkPlatform)"
|
||||||
SdkIsSimulator="$(_SdkIsSimulator)"
|
SdkIsSimulator="$(_SdkIsSimulator)"
|
||||||
DebugIPAddresses="$(_DebugIPAddresses)"
|
DebugIPAddresses="$(_DebugIPAddresses)"
|
||||||
|
@ -911,8 +911,7 @@ Copyright (C) 2013-2016 Xamarin. All rights reserved.
|
||||||
SdkIsSimulator="$(_SdkIsSimulator)"
|
SdkIsSimulator="$(_SdkIsSimulator)"
|
||||||
SdkVersion="$(MtouchSdkVersion)"
|
SdkVersion="$(MtouchSdkVersion)"
|
||||||
SymbolsList="$(_MtouchSymbolsList)"
|
SymbolsList="$(_MtouchSymbolsList)"
|
||||||
TargetFrameworkIdentifier="$(TargetFrameworkIdentifier)"
|
TargetFrameworkMoniker="$(_ComputedTargetFrameworkMoniker)"
|
||||||
TargetFrameworkVersion="$(TargetFrameworkVersion)"
|
|
||||||
UseLlvm="$(MtouchUseLlvm)"
|
UseLlvm="$(MtouchUseLlvm)"
|
||||||
UseFloat32="$(MtouchFloat32)"
|
UseFloat32="$(MtouchFloat32)"
|
||||||
UseThumb="$(MtouchUseThumb)"
|
UseThumb="$(MtouchUseThumb)"
|
||||||
|
@ -1261,7 +1260,7 @@ Copyright (C) 2013-2016 Xamarin. All rights reserved.
|
||||||
SdkRoot="$(_SdkRoot)"
|
SdkRoot="$(_SdkRoot)"
|
||||||
SdkDevPath="$(_SdkDevPath)"
|
SdkDevPath="$(_SdkDevPath)"
|
||||||
SdkVersion="$(MtouchSdkVersion)"
|
SdkVersion="$(MtouchSdkVersion)"
|
||||||
TargetFrameworkIdentifier="$(TargetFrameworkIdentifier)"
|
TargetFrameworkMoniker="$(_ComputedTargetFrameworkMoniker)"
|
||||||
IntermediateOutputPath="$(DeviceSpecificIntermediateOutputPath)"
|
IntermediateOutputPath="$(DeviceSpecificIntermediateOutputPath)"
|
||||||
InputScene="%(_ColladaAssetWithLogicalName.Identity)"
|
InputScene="%(_ColladaAssetWithLogicalName.Identity)"
|
||||||
OutputScene="$(DeviceSpecificIntermediateOutputPath)%(_ColladaAssetWithLogicalName.LogicalName)">
|
OutputScene="$(DeviceSpecificIntermediateOutputPath)%(_ColladaAssetWithLogicalName.LogicalName)">
|
||||||
|
@ -1375,7 +1374,7 @@ Copyright (C) 2013-2016 Xamarin. All rights reserved.
|
||||||
ToolPath="$(CopySceneKitAssetsPath)"
|
ToolPath="$(CopySceneKitAssetsPath)"
|
||||||
SceneKitAssets="@(SceneKitAsset)"
|
SceneKitAssets="@(SceneKitAsset)"
|
||||||
IntermediateOutputPath="$(DeviceSpecificIntermediateOutputPath)"
|
IntermediateOutputPath="$(DeviceSpecificIntermediateOutputPath)"
|
||||||
TargetFrameworkIdentifier="$(TargetFrameworkIdentifier)"
|
TargetFrameworkMoniker="$(_ComputedTargetFrameworkMoniker)"
|
||||||
ProjectDir="$(MSBuildProjectDirectory)"
|
ProjectDir="$(MSBuildProjectDirectory)"
|
||||||
ResourcePrefix="$(IPhoneResourcePrefix)"
|
ResourcePrefix="$(IPhoneResourcePrefix)"
|
||||||
IsWatchApp="$(IsWatchApp)"
|
IsWatchApp="$(IsWatchApp)"
|
||||||
|
@ -1590,7 +1589,7 @@ Copyright (C) 2013-2016 Xamarin. All rights reserved.
|
||||||
SdkIsSimulator="$(_SdkIsSimulator)"
|
SdkIsSimulator="$(_SdkIsSimulator)"
|
||||||
SdkPlatform="$(_SdkPlatform)"
|
SdkPlatform="$(_SdkPlatform)"
|
||||||
SdkVersion="$(MtouchSdkVersion)"
|
SdkVersion="$(MtouchSdkVersion)"
|
||||||
TargetFrameworkIdentifier="$(TargetFrameworkIdentifier)"
|
TargetFrameworkMoniker="$(_ComputedTargetFrameworkMoniker)"
|
||||||
>
|
>
|
||||||
|
|
||||||
<!-- We output the same task parameter to 2 different properties because they will be used differently -->
|
<!-- We output the same task parameter to 2 different properties because they will be used differently -->
|
||||||
|
@ -1730,7 +1729,7 @@ Copyright (C) 2013-2016 Xamarin. All rights reserved.
|
||||||
SessionId="$(BuildSessionId)"
|
SessionId="$(BuildSessionId)"
|
||||||
AppBundlePath="$(_AppBundlePath)"
|
AppBundlePath="$(_AppBundlePath)"
|
||||||
SdkIsSimulator="$(_SdkIsSimulator)"
|
SdkIsSimulator="$(_SdkIsSimulator)"
|
||||||
TargetFrameworkIdentifier="$(TargetFrameworkIdentifier)"
|
TargetFrameworkMoniker="$(_ComputedTargetFrameworkMoniker)"
|
||||||
/>
|
/>
|
||||||
</Target>
|
</Target>
|
||||||
|
|
||||||
|
|
|
@ -79,7 +79,7 @@ Copyright (C) 2013-2016 Xamarin Inc. All rights reserved.
|
||||||
ProcessEnums="$(ProcessEnums)"
|
ProcessEnums="$(ProcessEnums)"
|
||||||
ProjectDir="$(MSBuildProjectDirectory)"
|
ProjectDir="$(MSBuildProjectDirectory)"
|
||||||
References="@(ReferencePath)"
|
References="@(ReferencePath)"
|
||||||
TargetFrameworkIdentifier="$(TargetFrameworkIdentifier)"
|
TargetFrameworkMoniker="$(_ComputedTargetFrameworkMoniker)"
|
||||||
BTouchToolPath="$(BTouchToolPath)"
|
BTouchToolPath="$(BTouchToolPath)"
|
||||||
BTouchToolExe="$(BTouchToolExe)"
|
BTouchToolExe="$(BTouchToolExe)"
|
||||||
StandardOutputImportance="High"
|
StandardOutputImportance="High"
|
||||||
|
|
|
@ -24,6 +24,12 @@ Copyright (C) 2013-2016 Xamarin. All rights reserved.
|
||||||
<_XamarinCommonPropsHasBeenImported>true</_XamarinCommonPropsHasBeenImported>
|
<_XamarinCommonPropsHasBeenImported>true</_XamarinCommonPropsHasBeenImported>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<!-- Get the TargetFrameworkMoniker and store it in our own variable so that it's overridable while only affecting the parts of the build that we care about.
|
||||||
|
This is overridability is a workaround while we wait for .NET 5 to be able to give us the TFM we're supposed to get during the build. -->
|
||||||
|
<_ComputedTargetFrameworkMoniker Condition="'$(_ComputedTargetFrameworkMoniker)' == ''">$(TargetFrameworkMoniker)</_ComputedTargetFrameworkMoniker>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
<!-- This is used to determine if VS is connected to mac. -->
|
<!-- This is used to determine if VS is connected to mac. -->
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<IsMacEnabled>true</IsMacEnabled>
|
<IsMacEnabled>true</IsMacEnabled>
|
||||||
|
|
|
@ -44,7 +44,7 @@ Copyright (C) 2015-2016 Xamarin. All rights reserved.
|
||||||
SessionId="$(BuildSessionId)"
|
SessionId="$(BuildSessionId)"
|
||||||
SdkVersion="$(MtouchSdkVersion)"
|
SdkVersion="$(MtouchSdkVersion)"
|
||||||
SdkIsSimulator="$(_SdkIsSimulator)"
|
SdkIsSimulator="$(_SdkIsSimulator)"
|
||||||
TargetFrameworkIdentifier="$(TargetFrameworkIdentifier)"
|
TargetFrameworkMoniker="$(_ComputedTargetFrameworkMoniker)"
|
||||||
>
|
>
|
||||||
<Output TaskParameter="NativeWatchApp" PropertyName="_NativeWatchApp" />
|
<Output TaskParameter="NativeWatchApp" PropertyName="_NativeWatchApp" />
|
||||||
</ResolveNativeWatchApp>
|
</ResolveNativeWatchApp>
|
||||||
|
|
|
@ -13,7 +13,7 @@ namespace Xamarin.iOS.Tasks
|
||||||
{
|
{
|
||||||
var task = CreateTask<DetectSdkLocations> ();
|
var task = CreateTask<DetectSdkLocations> ();
|
||||||
task.XamarinSdkRoot = "XYZ";
|
task.XamarinSdkRoot = "XYZ";
|
||||||
task.TargetFrameworkIdentifier = "Xamarin.iOS";
|
task.TargetFrameworkMoniker = "Xamarin.iOS,v1.0";
|
||||||
task.Execute ();
|
task.Execute ();
|
||||||
|
|
||||||
Assert.AreEqual ("XYZ", task.XamarinSdkRoot, "#1");
|
Assert.AreEqual ("XYZ", task.XamarinSdkRoot, "#1");
|
||||||
|
@ -24,7 +24,7 @@ namespace Xamarin.iOS.Tasks
|
||||||
{
|
{
|
||||||
var task = CreateTask<DetectSdkLocations> ();
|
var task = CreateTask<DetectSdkLocations> ();
|
||||||
task.SdkVersion = "4.0";
|
task.SdkVersion = "4.0";
|
||||||
task.TargetFrameworkIdentifier = "Xamarin.iOS";
|
task.TargetFrameworkMoniker = "Xamarin.iOS,v1.0";
|
||||||
Assert.IsTrue (task.Execute (), "4.0 Execute");
|
Assert.IsTrue (task.Execute (), "4.0 Execute");
|
||||||
|
|
||||||
Assert.AreNotEqual ("4.0", task.SdkVersion, "#1");
|
Assert.AreNotEqual ("4.0", task.SdkVersion, "#1");
|
||||||
|
|
|
@ -12,7 +12,7 @@ namespace Xamarin.iOS.Tasks
|
||||||
{
|
{
|
||||||
base.ConfigureTask ();
|
base.ConfigureTask ();
|
||||||
Task.DefaultSdkVersion = IPhoneSdks.Native.GetClosestInstalledSdk (IPhoneSdkVersion.V6_1, true).ToString ();
|
Task.DefaultSdkVersion = IPhoneSdks.Native.GetClosestInstalledSdk (IPhoneSdkVersion.V6_1, true).ToString ();
|
||||||
Task.TargetFrameworkIdentifier = "Xamarin.iOS";
|
Task.TargetFrameworkMoniker = "Xamarin.iOS,v1.0";
|
||||||
Task.TargetArchitectures = "ARM64";
|
Task.TargetArchitectures = "ARM64";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@ namespace Xamarin.iOS.Tasks
|
||||||
{
|
{
|
||||||
base.ConfigureTask ();
|
base.ConfigureTask ();
|
||||||
Task.DefaultSdkVersion = IPhoneSdks.TVOS.GetClosestInstalledSdk (IPhoneSdkVersion.V9_0, true).ToString ();
|
Task.DefaultSdkVersion = IPhoneSdks.TVOS.GetClosestInstalledSdk (IPhoneSdkVersion.V9_0, true).ToString ();
|
||||||
Task.TargetFrameworkIdentifier = "Xamarin.TVOS";
|
Task.TargetFrameworkMoniker = "Xamarin.TVOS,v1.0";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,7 @@ namespace Xamarin.iOS.Tasks
|
||||||
{
|
{
|
||||||
base.ConfigureTask ();
|
base.ConfigureTask ();
|
||||||
Task.DefaultSdkVersion = IPhoneSdks.Watch.GetClosestInstalledSdk (IPhoneSdkVersion.V2_0, true).ToString ();
|
Task.DefaultSdkVersion = IPhoneSdks.Watch.GetClosestInstalledSdk (IPhoneSdkVersion.V2_0, true).ToString ();
|
||||||
Task.TargetFrameworkIdentifier = "Xamarin.WatchOS";
|
Task.TargetFrameworkMoniker = "Xamarin.WatchOS,v1.0";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -68,7 +68,7 @@ namespace Xamarin.iOS.Tasks
|
||||||
Task.SdkRoot = "/path/to/sdkroot";
|
Task.SdkRoot = "/path/to/sdkroot";
|
||||||
Task.SdkVersion = "6.1";
|
Task.SdkVersion = "6.1";
|
||||||
Task.SymbolsList = Path.Combine (Path.GetTempPath (), "mtouch-symbol-list");
|
Task.SymbolsList = Path.Combine (Path.GetTempPath (), "mtouch-symbol-list");
|
||||||
Task.TargetFrameworkIdentifier = "Xamarin.iOS";
|
Task.TargetFrameworkMoniker = "Xamarin.iOS,v1.0";
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
|
@ -132,7 +132,7 @@ namespace Xamarin.iOS.Tasks
|
||||||
{
|
{
|
||||||
Task.EnableBitcode = true;
|
Task.EnableBitcode = true;
|
||||||
|
|
||||||
Task.TargetFrameworkIdentifier = frameworkIdentifier;
|
Task.TargetFrameworkMoniker = frameworkIdentifier + ",v1.0";
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
|
@ -211,7 +211,7 @@ namespace Xamarin.iOS.Tasks
|
||||||
public void ReferenceFrameworkFileResolution_WhenReceivedReferencePathExists()
|
public void ReferenceFrameworkFileResolution_WhenReceivedReferencePathExists()
|
||||||
{
|
{
|
||||||
using (var sdk = new TempSdk()) {
|
using (var sdk = new TempSdk()) {
|
||||||
Task.TargetFrameworkIdentifier = "MonoTouch";
|
Task.TargetFrameworkMoniker = "MonoTouch,v1.0";
|
||||||
|
|
||||||
var expectedPath = Path.GetTempFileName ();
|
var expectedPath = Path.GetTempFileName ();
|
||||||
|
|
||||||
|
@ -234,11 +234,11 @@ namespace Xamarin.iOS.Tasks
|
||||||
Assert.IsTrue (args.Contains ($"@{Task.ResponseFilePath}"), "#@response-file");
|
Assert.IsTrue (args.Contains ($"@{Task.ResponseFilePath}"), "#@response-file");
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestCase("Xamarin.iOS", "Xamarin.iOS")]
|
[TestCase("Xamarin.iOS,v1.0", "Xamarin.iOS")]
|
||||||
public void ReferenceFrameworkFileResolution_WhenFacadeFileExists(string targetFramework, string frameworkDir)
|
public void ReferenceFrameworkFileResolution_WhenFacadeFileExists(string targetFrameworkMoniker, string frameworkDir)
|
||||||
{
|
{
|
||||||
using (var sdk = new TempSdk()) {
|
using (var sdk = new TempSdk()) {
|
||||||
Task.TargetFrameworkIdentifier = targetFramework;
|
Task.TargetFrameworkMoniker = targetFrameworkMoniker;
|
||||||
var expectedPath = Path.Combine (IPhoneSdks.MonoTouch.LibDir, "mono", frameworkDir, "Facades", "System.Collections.dll");
|
var expectedPath = Path.Combine (IPhoneSdks.MonoTouch.LibDir, "mono", frameworkDir, "Facades", "System.Collections.dll");
|
||||||
Directory.CreateDirectory (Path.GetDirectoryName (expectedPath));
|
Directory.CreateDirectory (Path.GetDirectoryName (expectedPath));
|
||||||
File.WriteAllText (expectedPath, "");
|
File.WriteAllText (expectedPath, "");
|
||||||
|
@ -259,11 +259,11 @@ namespace Xamarin.iOS.Tasks
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestCase("Xamarin.iOS", "Xamarin.iOS")]
|
[TestCase("Xamarin.iOS,v1.0", "Xamarin.iOS")]
|
||||||
public void ReferenceFrameworkFileResolution_WhenFrameworkFileExists(string targetFramework, string frameworkDir)
|
public void ReferenceFrameworkFileResolution_WhenFrameworkFileExists(string targetFrameworkMoniker, string frameworkDir)
|
||||||
{
|
{
|
||||||
using (var sdk = new TempSdk()) {
|
using (var sdk = new TempSdk()) {
|
||||||
Task.TargetFrameworkIdentifier = targetFramework;
|
Task.TargetFrameworkMoniker = targetFrameworkMoniker;
|
||||||
var expectedPath = Path.Combine (IPhoneSdks.MonoTouch.LibDir, "mono", frameworkDir, "System.Collections.dll");
|
var expectedPath = Path.Combine (IPhoneSdks.MonoTouch.LibDir, "mono", frameworkDir, "System.Collections.dll");
|
||||||
Directory.CreateDirectory (Path.GetDirectoryName (expectedPath));
|
Directory.CreateDirectory (Path.GetDirectoryName (expectedPath));
|
||||||
File.WriteAllText (expectedPath, "");
|
File.WriteAllText (expectedPath, "");
|
||||||
|
@ -284,11 +284,11 @@ namespace Xamarin.iOS.Tasks
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[TestCase("Xamarin.iOS", "Xamarin.iOS")]
|
[TestCase("Xamarin.iOS,v1.0", "Xamarin.iOS")]
|
||||||
public void ReferenceFrameworkFileResolution_WhenResolutionFails(string targetFramework, string frameworkDir)
|
public void ReferenceFrameworkFileResolution_WhenResolutionFails(string targetFrameworkMoniker, string frameworkDir)
|
||||||
{
|
{
|
||||||
using (var sdk = new TempSdk()) {
|
using (var sdk = new TempSdk()) {
|
||||||
Task.TargetFrameworkIdentifier = targetFramework;
|
Task.TargetFrameworkMoniker = targetFrameworkMoniker;
|
||||||
|
|
||||||
Task.References = new[] { new TaskItem ("/usr/foo/System.Collections.dll", new Dictionary<string, string> { { "FrameworkFile", "true" } }) };
|
Task.References = new[] { new TaskItem ("/usr/foo/System.Collections.dll", new Dictionary<string, string> { { "FrameworkFile", "true" } }) };
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@ namespace Xamarin.iOS.Tasks
|
||||||
task = CreateTask<ValidateAppBundleTask> ();
|
task = CreateTask<ValidateAppBundleTask> ();
|
||||||
task.AppBundlePath = AppBundlePath;
|
task.AppBundlePath = AppBundlePath;
|
||||||
task.SdkIsSimulator = true;
|
task.SdkIsSimulator = true;
|
||||||
task.TargetFrameworkIdentifier = "Xamarin.iOS";
|
task.TargetFrameworkMoniker = "Xamarin.iOS,v1.0";
|
||||||
|
|
||||||
extensionBundlePath = Path.Combine (AppBundlePath, "PlugIns", extensionName + ".appex");
|
extensionBundlePath = Path.Combine (AppBundlePath, "PlugIns", extensionName + ".appex");
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче