Родитель
a0d3c13fa1
Коммит
97b53d8e63
|
@ -19,11 +19,11 @@
|
|||
<dependency id="Xamarin.Android.Support.v4" version="28.0.0.3"/>
|
||||
</group>
|
||||
<group targetFramework="MonoAndroid10.0">
|
||||
<dependency id="Xamarin.AndroidX.Migration" version="1.0.0"/>
|
||||
<dependency id="Xamarin.AndroidX.Migration" version="1.0.0.1"/>
|
||||
<dependency id="Xamarin.Firebase.AppIndexing" version="71.1602.0"/>
|
||||
<dependency id="Xamarin.Android.Support.v4" version="28.0.0.3"/>
|
||||
<dependency id="Xamarin.AndroidX.Lifecycle.LiveData" version="2.1.0"/>
|
||||
<dependency id="Xamarin.AndroidX.Legacy.Support.V4" version="1.0.0"/>
|
||||
<dependency id="Xamarin.AndroidX.Lifecycle.LiveData" version="2.1.0.1"/>
|
||||
<dependency id="Xamarin.AndroidX.Legacy.Support.V4" version="1.0.0.1"/>
|
||||
</group>
|
||||
</dependencies>
|
||||
<references>
|
||||
|
|
|
@ -18,11 +18,11 @@
|
|||
<dependency id="Xamarin.Forms" version="$version$"/>
|
||||
</group>
|
||||
<group targetFramework="MonoAndroid10.0">
|
||||
<dependency id="Xamarin.AndroidX.Migration" version="1.0.0"/>
|
||||
<dependency id="Xamarin.AndroidX.Lifecycle.LiveData" version="2.1.0"/>
|
||||
<dependency id="Xamarin.AndroidX.Legacy.Support.V4" version="1.0.0"/>
|
||||
<dependency id="Xamarin.AndroidX.Legacy.Support.Core.UI" version="1.0.0"/>
|
||||
<dependency id="Xamarin.AndroidX.AppCompat" version="1.1.0"/>
|
||||
<dependency id="Xamarin.AndroidX.Migration" version="1.0.0.1"/>
|
||||
<dependency id="Xamarin.AndroidX.Lifecycle.LiveData" version="2.1.0.1"/>
|
||||
<dependency id="Xamarin.AndroidX.Legacy.Support.V4" version="1.0.0.1"/>
|
||||
<dependency id="Xamarin.AndroidX.Legacy.Support.Core.UI" version="1.0.0.1"/>
|
||||
<dependency id="Xamarin.AndroidX.AppCompat" version="1.1.0.1"/>
|
||||
<dependency id="Xamarin.GooglePlayServices.Maps" version="71.1610.0"/>
|
||||
<dependency id="Xamarin.Forms" version="$version$"/>
|
||||
<dependency id="Xamarin.Android.Support.v4" version="28.0.0.3"/>
|
||||
|
|
|
@ -25,8 +25,8 @@
|
|||
<dependency id="Xamarin.Android.Support.v7.AppCompat" version="28.0.0.3"/>
|
||||
</group>
|
||||
<group targetFramework="MonoAndroid10.0">
|
||||
<dependency id="Xamarin.AndroidX.Lifecycle.LiveData" version="2.1.0" />
|
||||
<dependency id="Xamarin.Google.Android.Material" version="1.0.0" />
|
||||
<dependency id="Xamarin.AndroidX.Lifecycle.LiveData" version="2.1.0.1" />
|
||||
<dependency id="Xamarin.Google.Android.Material" version="1.0.0.1" />
|
||||
</group>
|
||||
<group targetFramework="Xamarin.iOS10">
|
||||
<dependency id="Xamarin.iOS.MaterialComponents" version="92.0.0"/>
|
||||
|
|
|
@ -15,10 +15,10 @@
|
|||
<copyright>© Microsoft Corporation. All rights reserved.</copyright>
|
||||
<dependencies>
|
||||
<group targetFramework="MonoAndroid10.0">
|
||||
<dependency id="Xamarin.AndroidX.Lifecycle.LiveData" version="2.1.0" />
|
||||
<dependency id="Xamarin.Google.Android.Material" version="1.0.0" />
|
||||
<dependency id="Xamarin.AndroidX.Legacy.Support.V4" version="1.0.0" />
|
||||
<dependency id="Xamarin.AndroidX.Browser" version="1.0.0" />
|
||||
<dependency id="Xamarin.AndroidX.Lifecycle.LiveData" version="2.1.0.1" />
|
||||
<dependency id="Xamarin.Google.Android.Material" version="1.0.0.1" />
|
||||
<dependency id="Xamarin.AndroidX.Legacy.Support.V4" version="1.0.0.1" />
|
||||
<dependency id="Xamarin.AndroidX.Browser" version="1.0.0.1" />
|
||||
</group>
|
||||
<group targetFramework="MonoAndroid90">
|
||||
<dependency id="Xamarin.Android.Support.v4" version="28.0.0.3"/>
|
||||
|
|
|
@ -119,8 +119,8 @@
|
|||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Xamarin.AndroidX.MediaRouter" Version="1.1.0" />
|
||||
<PackageReference Include="Xamarin.AndroidX.Lifecycle.LiveData" Version="2.1.0" />
|
||||
<PackageReference Include="Xamarin.AndroidX.MediaRouter" Version="1.1.0.1" />
|
||||
<PackageReference Include="Xamarin.AndroidX.Lifecycle.LiveData" Version="2.1.0.1" />
|
||||
<PackageReference Include="Xamarin.Google.Android.Material" Version="1.1.0-rc3" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
<Project>
|
||||
<ItemGroup Condition="'$(TargetFrameworkVersion)' == 'v10.0'">
|
||||
<PackageReference Include="Xamarin.AndroidX.Migration">
|
||||
<Version>1.0.0</Version>
|
||||
<Version>1.0.0.1</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Xamarin.AndroidX.Browser" Version="1.0.0" />
|
||||
<PackageReference Include="Xamarin.AndroidX.Palette" Version="1.0.0" />
|
||||
<PackageReference Include="Xamarin.AndroidX.Lifecycle.LiveData" Version="2.1.0" />
|
||||
<PackageReference Include="Xamarin.Google.Android.Material" Version="1.0.0" />
|
||||
<PackageReference Include="Xamarin.AndroidX.Legacy.Support.V4" Version="1.0.0" />
|
||||
<PackageReference Include="Xamarin.AndroidX.Browser" Version="1.0.0.1" />
|
||||
<PackageReference Include="Xamarin.AndroidX.Palette" Version="1.0.0.1" />
|
||||
<PackageReference Include="Xamarin.AndroidX.Lifecycle.LiveData" Version="2.1.0.1" />
|
||||
<PackageReference Include="Xamarin.Google.Android.Material" Version="1.0.0.1" />
|
||||
<PackageReference Include="Xamarin.AndroidX.Legacy.Support.V4" Version="1.0.0.1" />
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -1,12 +1,12 @@
|
|||
<Project>
|
||||
<ItemGroup Condition="'$(TargetFrameworkVersion)' == 'v10.0'">
|
||||
<PackageReference Include="Xamarin.AndroidX.Migration">
|
||||
<Version>1.0.0</Version>
|
||||
<Version>1.0.0.1</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Xamarin.AndroidX.Browser" Version="1.0.0" />
|
||||
<PackageReference Include="Xamarin.AndroidX.Palette" Version="1.0.0" />
|
||||
<PackageReference Include="Xamarin.AndroidX.Lifecycle.LiveData" Version="2.1.0" />
|
||||
<PackageReference Include="Xamarin.Google.Android.Material" Version="1.0.0" />
|
||||
<PackageReference Include="Xamarin.AndroidX.Legacy.Support.V4" Version="1.0.0" />
|
||||
<PackageReference Include="Xamarin.AndroidX.Browser" Version="1.0.0.1" />
|
||||
<PackageReference Include="Xamarin.AndroidX.Palette" Version="1.0.0.1" />
|
||||
<PackageReference Include="Xamarin.AndroidX.Lifecycle.LiveData" Version="2.1.0.1" />
|
||||
<PackageReference Include="Xamarin.Google.Android.Material" Version="1.0.0.1" />
|
||||
<PackageReference Include="Xamarin.AndroidX.Legacy.Support.V4" Version="1.0.0.1" />
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -26,10 +26,10 @@
|
|||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="'$(TargetFramework)' == 'MonoAndroid10.0'">
|
||||
<PackageReference Include="Xamarin.AndroidX.Lifecycle.LiveData" Version="2.1.0" />
|
||||
<PackageReference Include="Xamarin.AndroidX.Legacy.Support.V4" Version="1.0.0" />
|
||||
<PackageReference Include="Xamarin.Google.Android.Material" Version="1.0.0" />
|
||||
<PackageReference Include="Xamarin.AndroidX.RecyclerView" Version="1.1.0" />
|
||||
<PackageReference Include="Xamarin.AndroidX.Lifecycle.LiveData" Version="2.1.0.1" />
|
||||
<PackageReference Include="Xamarin.AndroidX.Legacy.Support.V4" Version="1.0.0.1" />
|
||||
<PackageReference Include="Xamarin.Google.Android.Material" Version="1.0.0.1" />
|
||||
<PackageReference Include="Xamarin.AndroidX.RecyclerView" Version="1.1.0.1" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="'$(TargetFramework)' == 'MonoAndroid90'">
|
||||
<PackageReference Include="Xamarin.Android.Support.v4" Version="28.0.0.3" />
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
<Project>
|
||||
<ItemGroup Condition="'$(TargetFrameworkVersion)' == 'v10.0'">
|
||||
<PackageReference Include="Xamarin.AndroidX.Migration">
|
||||
<Version>1.0.0</Version>
|
||||
<Version>1.0.0.1</Version>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Xamarin.AndroidX.Lifecycle.LiveData" Version="2.1.0" />
|
||||
<PackageReference Include="Xamarin.AndroidX.Browser" Version="1.0.0" />
|
||||
<PackageReference Include="Xamarin.Google.Android.Material" Version="1.0.0" />
|
||||
<PackageReference Include="Xamarin.AndroidX.Legacy.Support.V4" Version="1.0.0" />
|
||||
<PackageReference Include="Xamarin.AndroidX.Palette" Version="1.0.0" />
|
||||
<PackageReference Include="Xamarin.AndroidX.Lifecycle.LiveData" Version="2.1.0.1" />
|
||||
<PackageReference Include="Xamarin.AndroidX.Browser" Version="1.0.0.1" />
|
||||
<PackageReference Include="Xamarin.Google.Android.Material" Version="1.0.0.1" />
|
||||
<PackageReference Include="Xamarin.AndroidX.Legacy.Support.V4" Version="1.0.0.1" />
|
||||
<PackageReference Include="Xamarin.AndroidX.Palette" Version="1.0.0.1" />
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -12,7 +12,6 @@ using Xamarin.Forms.Controls;
|
|||
[assembly: UsesPermission(Android.Manifest.Permission.Internet)]
|
||||
[assembly: UsesPermission(Android.Manifest.Permission.WriteExternalStorage)]
|
||||
|
||||
[assembly: Android.App.MetaData("com.google.android.maps.v2.API_KEY", Value = "AIzaSyAdstcJQswxEjzX5YjLaMcu2aRVEBJw39Y")]
|
||||
[assembly: Xamarin.Forms.ResolutionGroupName(Xamarin.Forms.Controls.Issues.Effects.ResolutionGroupName)]
|
||||
|
||||
// Deliberately broken image source and handler so we can test handling of image loading errors
|
||||
|
|
|
@ -1,6 +0,0 @@
|
|||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using Android.App;
|
||||
|
||||
[assembly: Android.App.MetaData("com.google.android.maps.v2.API_KEY", Value = "")]
|
|
@ -109,7 +109,6 @@
|
|||
<Compile Include="Tests\TestingPlatformService.cs" />
|
||||
<Compile Include="Tests\PlatformTestSettings.cs" />
|
||||
<Compile Include="PreApplicationClassActivity.cs" />
|
||||
<Compile Include="Properties\MapsKey.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="RegistrarValidationService.cs" />
|
||||
<Compile Include="CustomRenderers.cs" />
|
||||
|
@ -408,12 +407,9 @@
|
|||
<SubType>Designer</SubType>
|
||||
</AndroidResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="Exists('Properties\MapsKey.cs')">
|
||||
<Compile Include="Properties\MapsKey.cs" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />
|
||||
<Import Project="$(SolutionDir)\.nuget\NuGet.targets" Condition="Exists('$(SolutionDir)\.nuget\NuGet.targets')" />
|
||||
<Target Name="BeforeBuild">
|
||||
<CreateItem Include="Properties\MapsKey.cs.blank">
|
||||
<Output TaskParameter="Include" ItemName="MapsKey" />
|
||||
</CreateItem>
|
||||
<Copy SourceFiles="@(MapsKey)" DestinationFiles="Properties\MapsKey.cs" Condition="!Exists('Properties\MapsKey.cs')" />
|
||||
</Target>
|
||||
</Project>
|
|
@ -68,9 +68,9 @@
|
|||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="'$(TargetFramework)' == 'MonoAndroid10.0'">
|
||||
<PackageReference Include="Xamarin.AndroidX.Lifecycle.LiveData" Version="2.1.0" />
|
||||
<PackageReference Include="Xamarin.Google.Android.Material" Version="1.0.0" />
|
||||
<PackageReference Include="Xamarin.AndroidX.Legacy.Support.V4" Version="1.0.0" />
|
||||
<PackageReference Include="Xamarin.AndroidX.Lifecycle.LiveData" Version="2.1.0.1" />
|
||||
<PackageReference Include="Xamarin.Google.Android.Material" Version="1.0.0.1" />
|
||||
<PackageReference Include="Xamarin.AndroidX.Legacy.Support.V4" Version="1.0.0.1" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="'$(TargetFramework)' == 'MonoAndroid90'">
|
||||
<PackageReference Include="Xamarin.Android.Support.Design" Version="28.0.0.3" />
|
||||
|
|
|
@ -24,11 +24,11 @@
|
|||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="'$(TargetFramework)' == 'MonoAndroid10.0'">
|
||||
<PackageReference Include="Xamarin.AndroidX.Lifecycle.LiveData" Version="2.1.0" />
|
||||
<PackageReference Include="Xamarin.Google.Android.Material" Version="1.0.0" />
|
||||
<PackageReference Include="Xamarin.AndroidX.Legacy.Support.V4" Version="1.0.0" />
|
||||
<PackageReference Include="Xamarin.AndroidX.Lifecycle.LiveData" Version="2.1.0.1" />
|
||||
<PackageReference Include="Xamarin.Google.Android.Material" Version="1.0.0.1" />
|
||||
<PackageReference Include="Xamarin.AndroidX.Legacy.Support.V4" Version="1.0.0.1" />
|
||||
<PackageReference Include="Xamarin.AndroidX.Migration">
|
||||
<Version>1.0.0</Version>
|
||||
<Version>1.0.0.1</Version>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
|
|
@ -19,8 +19,8 @@
|
|||
<AndroidResource Include="Resources\**\*" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="'$(TargetFramework)' == 'MonoAndroid10.0'">
|
||||
<PackageReference Include="Xamarin.AndroidX.Lifecycle.LiveData" Version="2.1.0" />
|
||||
<PackageReference Include="Xamarin.Google.Android.Material" Version="1.0.0" />
|
||||
<PackageReference Include="Xamarin.AndroidX.Lifecycle.LiveData" Version="2.1.0.1" />
|
||||
<PackageReference Include="Xamarin.Google.Android.Material" Version="1.0.0.1" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="'$(TargetFramework)' == 'MonoAndroid90'">
|
||||
<PackageReference Include="Xamarin.Android.Support.v7.AppCompat" Version="28.0.0.3" />
|
||||
|
|
|
@ -30,10 +30,10 @@
|
|||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="'$(TargetFramework)' == 'MonoAndroid10.0'">
|
||||
<PackageReference Include="Xamarin.AndroidX.Lifecycle.LiveData" Version="2.1.0" />
|
||||
<PackageReference Include="Xamarin.AndroidX.Legacy.Support.V4" Version="1.0.0" />
|
||||
<PackageReference Include="Xamarin.AndroidX.Lifecycle.LiveData" Version="2.1.0.1" />
|
||||
<PackageReference Include="Xamarin.AndroidX.Legacy.Support.V4" Version="1.0.0.1" />
|
||||
<PackageReference Include="Xamarin.AndroidX.Migration">
|
||||
<Version>1.0.0</Version>
|
||||
<Version>1.0.0.1</Version>
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
|
|
@ -51,9 +51,9 @@
|
|||
<Reference Include="System.Net.Http" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="'$(TargetFramework)' == 'MonoAndroid10.0'">
|
||||
<PackageReference Include="Xamarin.AndroidX.Lifecycle.LiveData" Version="2.1.0" />
|
||||
<PackageReference Include="Xamarin.Google.Android.Material" Version="1.0.0" />
|
||||
<PackageReference Include="Xamarin.AndroidX.Legacy.Support.V4" Version="1.0.0" />
|
||||
<PackageReference Include="Xamarin.AndroidX.Lifecycle.LiveData" Version="2.1.0.1" />
|
||||
<PackageReference Include="Xamarin.Google.Android.Material" Version="1.0.0.1" />
|
||||
<PackageReference Include="Xamarin.AndroidX.Legacy.Support.V4" Version="1.0.0.1" />
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="'$(TargetFramework)' == 'MonoAndroid90'">
|
||||
<PackageReference Include="Xamarin.Android.Support.Design" Version="28.0.0.3" />
|
||||
|
|
103
build.cake
103
build.cake
|
@ -43,10 +43,10 @@ var releaseChannelArg = Argument("CHANNEL", "Stable");
|
|||
releaseChannelArg = EnvironmentVariable("CHANNEL") ?? releaseChannelArg;
|
||||
var teamProject = Argument("TeamProject", "");
|
||||
bool buildForVS2017 = Convert.ToBoolean(Argument("buildForVS2017", "false"));
|
||||
string agentName = EnvironmentVariable("Agent_Name", "");
|
||||
string agentName = EnvironmentVariable("AGENT_NAME", "");
|
||||
bool isHostedAgent = agentName.StartsWith("Azure Pipelines");
|
||||
bool isCIBuild = !String.IsNullOrWhiteSpace(agentName);
|
||||
string artifactStagingDirectory = Argument("Build_ArtifactStagingDirectory", (string)null) ?? EnvironmentVariable("Build.ArtifactStagingDirectory") ?? EnvironmentVariable("Build_ArtifactStagingDirectory") ?? ".";
|
||||
string artifactStagingDirectory = EnvironmentVariable("BUILD_ARTIFACTSTAGINGDIRECTORY", ".");
|
||||
var ANDROID_HOME = EnvironmentVariable("ANDROID_HOME") ??
|
||||
(IsRunningOnWindows () ? "C:\\Program Files (x86)\\Android\\android-sdk\\" : "");
|
||||
|
||||
|
@ -89,9 +89,9 @@ Information ("configuration: {0}", configuration);
|
|||
Information ("ANDROID_HOME: {0}", ANDROID_HOME);
|
||||
Information ("Team Project: {0}", teamProject);
|
||||
Information ("buildForVS2017: {0}", buildForVS2017);
|
||||
Information ("Agent.Name: {0}", EnvironmentVariable("Agent_Name"));
|
||||
Information ("Agent.Name: {0}", agentName);
|
||||
Information ("isCIBuild: {0}", isCIBuild);
|
||||
|
||||
Information ("artifactStagingDirectory: {0}", artifactStagingDirectory);
|
||||
|
||||
var releaseChannel = ReleaseChannel.Stable;
|
||||
if(releaseChannelArg == "Preview")
|
||||
|
@ -488,6 +488,19 @@ Task("Restore")
|
|||
}
|
||||
});
|
||||
|
||||
Task("WriteGoogleMapsAPIKey")
|
||||
.Description("Write GoogleMapsAPIKey to Android Control Gallery")
|
||||
.Does(() =>
|
||||
{
|
||||
string GoogleMapsAPIKey = Argument("GoogleMapsAPIKey", "");
|
||||
|
||||
if(!String.IsNullOrWhiteSpace(GoogleMapsAPIKey))
|
||||
{
|
||||
Information("Writing GoogleMapsAPIKey");
|
||||
System.IO.File.WriteAllText("Xamarin.Forms.ControlGallery.Android/Properties/MapsKey.cs", "[assembly: Android.App.MetaData(\"com.google.android.maps.v2.API_KEY\", Value = \"" + GoogleMapsAPIKey + "\")]");
|
||||
}
|
||||
});
|
||||
|
||||
Task("BuildForNuget")
|
||||
.Description("Builds all necessary projects to create Nuget Packages")
|
||||
.Does(() =>
|
||||
|
@ -500,7 +513,6 @@ Task("BuildForNuget")
|
|||
};
|
||||
|
||||
msbuildSettings.BinaryLogger = binaryLogger;
|
||||
msbuildSettings.ArgumentCustomization = args => args.Append("/nowarn:VSX1000");
|
||||
binaryLogger.FileName = $"{artifactStagingDirectory}/win-{configuration}.binlog";
|
||||
|
||||
MSBuild("./Xamarin.Forms.sln", msbuildSettings);
|
||||
|
@ -586,6 +598,56 @@ Task("VSMAC")
|
|||
StartProcess("open", new ProcessSettings{ Arguments = "Xamarin.Forms.sln" });
|
||||
});
|
||||
|
||||
Task("cg-android")
|
||||
.Description("Builds Android Control Gallery")
|
||||
.IsDependentOn("WriteGoogleMapsAPIKey")
|
||||
.IsDependentOn("BuildTasks")
|
||||
.Does(() =>
|
||||
{
|
||||
var buildSettings = GetMSBuildSettings();
|
||||
|
||||
if(isCIBuild)
|
||||
{
|
||||
buildSettings = buildSettings.WithTarget("Rebuild").WithTarget("SignAndroidPackage");
|
||||
var binaryLogger = new MSBuildBinaryLogSettings {
|
||||
Enabled = true
|
||||
};
|
||||
|
||||
buildSettings.BinaryLogger = binaryLogger;
|
||||
binaryLogger.FileName = $"{artifactStagingDirectory}/android-{ANDROID_RENDERERS}.binlog";
|
||||
}
|
||||
else
|
||||
{
|
||||
buildSettings = buildSettings.WithRestore();
|
||||
}
|
||||
|
||||
MSBuild("./Xamarin.Forms.ControlGallery.Android/Xamarin.Forms.ControlGallery.Android.csproj", buildSettings);
|
||||
});
|
||||
|
||||
Task("cg-android-vs")
|
||||
.Description("Builds Android Control Gallery and open VS")
|
||||
.IsDependentOn("cg-android")
|
||||
.Does(() =>
|
||||
{
|
||||
StartVisualStudio();
|
||||
});
|
||||
|
||||
Task("cg-ios")
|
||||
.Description("Builds iOS Control Gallery and open VS")
|
||||
.IsDependentOn("BuildTasks")
|
||||
.Does(() =>
|
||||
{
|
||||
MSBuild("./Xamarin.Forms.ControlGallery.iOS/Xamarin.Forms.ControlGallery.iOS.csproj", GetMSBuildSettings().WithRestore());
|
||||
});
|
||||
|
||||
Task("cg-ios-vs")
|
||||
.Description("Builds iOS Control Gallery and open VS")
|
||||
.IsDependentOn("cg-ios")
|
||||
.Does(() =>
|
||||
{
|
||||
StartVisualStudio();
|
||||
});
|
||||
|
||||
/*
|
||||
Task("Deploy")
|
||||
.IsDependentOn("DeployiOS")
|
||||
|
@ -613,6 +675,27 @@ Task("DeployAndroid")
|
|||
AmStartActivity("AndroidControlGallery.AndroidControlGallery/md546303760447087909496d02dc7b17ae8.Activity1");
|
||||
});
|
||||
|
||||
Task("_PrintEnvironmentVariables")
|
||||
.Does(() =>
|
||||
{
|
||||
var envVars = EnvironmentVariables();
|
||||
|
||||
string path;
|
||||
if (envVars.TryGetValue("PATH", out path))
|
||||
{
|
||||
Information("Path: {0}", path);
|
||||
}
|
||||
|
||||
foreach(var envVar in envVars)
|
||||
{
|
||||
Information(
|
||||
"Key: {0}\tValue: \"{1}\"",
|
||||
envVar.Key,
|
||||
envVar.Value
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
// TASK TARGETS
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -627,6 +710,16 @@ Task("Default")
|
|||
|
||||
RunTarget(target);
|
||||
|
||||
void StartVisualStudio(string sln = "Xamarin.Forms.sln")
|
||||
{
|
||||
if(isCIBuild)
|
||||
return;
|
||||
|
||||
if(IsRunningOnWindows())
|
||||
StartProcess("start", new ProcessSettings{ Arguments = "Xamarin.Forms.sln" });
|
||||
else
|
||||
StartProcess("open", new ProcessSettings{ Arguments = "Xamarin.Forms.sln" });
|
||||
}
|
||||
|
||||
MSBuildSettings GetMSBuildSettings()
|
||||
{
|
||||
|
|
|
@ -77,18 +77,12 @@ jobs:
|
|||
feedsToUse: config
|
||||
nugetConfigPath: 'DevopsNuget.config'
|
||||
|
||||
- task: MSBuild@1
|
||||
displayName: 'Build ${{ parameters.buildTaskPath }}'
|
||||
inputs:
|
||||
solution: ${{ parameters.buildTaskPath }}
|
||||
configuration: ${{ parameters.buildConfiguration }}
|
||||
|
||||
- task: MSBuild@1
|
||||
- task: Bash@3
|
||||
displayName: 'Build Android $(renderers)'
|
||||
inputs:
|
||||
solution: ${{ parameters.androidProjectPath }}
|
||||
configuration: ${{ parameters.buildConfiguration }}
|
||||
msbuildArguments: '/t:"Rebuild;SignAndroidPackage" /p:ANDROID_RENDERERS="$(renderers)" /bl:$(Build.ArtifactStagingDirectory)/android-$(renderers).binlog'
|
||||
targetType: 'filePath'
|
||||
filePath: 'build.sh'
|
||||
arguments: --target cg-android --ANDROID_RENDERERS="$(renderers)" --GoogleMapsAPIKey="$(GoogleMapsAPIKey)"
|
||||
|
||||
- task: CopyFiles@2
|
||||
displayName: 'Copy $(renderers)'
|
||||
|
|
Загрузка…
Ссылка в новой задаче