Skip to content

Commit

Permalink
Merge pull request #56 from xamarin/v10.2.1
Browse files Browse the repository at this point in the history
v10.2.1
  • Loading branch information
Redth committed May 5, 2017
2 parents f1da9ae + 406bbe8 commit 08dc0d1
Show file tree
Hide file tree
Showing 48 changed files with 1,412 additions and 39 deletions.
59 changes: 59 additions & 0 deletions GooglePlayServices.TypeForwarders.sln
@@ -0,0 +1,59 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "PlayServices", "PlayServices", "{AFB1EDA0-E0D2-4E95-BAEC-9781B046413E}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Basement", "basement\source\Basement.csproj", "{6A38FACF-F0C5-4A49-8A8A-7CE6634207CE}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Base", "base\source\Base.csproj", "{3F6BAE25-ADEB-468C-8384-AD655623C341}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tasks", "tasks\source\Tasks.csproj", "{53F87D88-8871-41A2-9F81-B79AB02FEC24}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Firebase", "Firebase", "{1EC5651F-83A6-4862-AED2-6BE5103652D0}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Firebase-Common", "firebase-common\source\Firebase-Common.csproj", "{865652D3-8D1A-4779-92FC-4C54719286B7}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Firebase-AppIndexing", "firebase-appindexing\source\Firebase-AppIndexing.csproj", "{8D01CC30-64F5-4AD3-B9C8-0970B0F1D562}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AppIndexing", "appindexing\source\AppIndexing.csproj", "{1C70BA5A-5819-4823-8BEA-0FFEEA39B1E4}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{3F6BAE25-ADEB-468C-8384-AD655623C341}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3F6BAE25-ADEB-468C-8384-AD655623C341}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3F6BAE25-ADEB-468C-8384-AD655623C341}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3F6BAE25-ADEB-468C-8384-AD655623C341}.Release|Any CPU.Build.0 = Release|Any CPU
{53F87D88-8871-41A2-9F81-B79AB02FEC24}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{53F87D88-8871-41A2-9F81-B79AB02FEC24}.Debug|Any CPU.Build.0 = Debug|Any CPU
{53F87D88-8871-41A2-9F81-B79AB02FEC24}.Release|Any CPU.ActiveCfg = Release|Any CPU
{53F87D88-8871-41A2-9F81-B79AB02FEC24}.Release|Any CPU.Build.0 = Release|Any CPU
{6A38FACF-F0C5-4A49-8A8A-7CE6634207CE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{6A38FACF-F0C5-4A49-8A8A-7CE6634207CE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{6A38FACF-F0C5-4A49-8A8A-7CE6634207CE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{6A38FACF-F0C5-4A49-8A8A-7CE6634207CE}.Release|Any CPU.Build.0 = Release|Any CPU
{865652D3-8D1A-4779-92FC-4C54719286B7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{865652D3-8D1A-4779-92FC-4C54719286B7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{865652D3-8D1A-4779-92FC-4C54719286B7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{865652D3-8D1A-4779-92FC-4C54719286B7}.Release|Any CPU.Build.0 = Release|Any CPU
{8D01CC30-64F5-4AD3-B9C8-0970B0F1D562}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{8D01CC30-64F5-4AD3-B9C8-0970B0F1D562}.Debug|Any CPU.Build.0 = Debug|Any CPU
{8D01CC30-64F5-4AD3-B9C8-0970B0F1D562}.Release|Any CPU.ActiveCfg = Release|Any CPU
{8D01CC30-64F5-4AD3-B9C8-0970B0F1D562}.Release|Any CPU.Build.0 = Release|Any CPU
{1C70BA5A-5819-4823-8BEA-0FFEEA39B1E4}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1C70BA5A-5819-4823-8BEA-0FFEEA39B1E4}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1C70BA5A-5819-4823-8BEA-0FFEEA39B1E4}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1C70BA5A-5819-4823-8BEA-0FFEEA39B1E4}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{6A38FACF-F0C5-4A49-8A8A-7CE6634207CE} = {AFB1EDA0-E0D2-4E95-BAEC-9781B046413E}
{3F6BAE25-ADEB-468C-8384-AD655623C341} = {AFB1EDA0-E0D2-4E95-BAEC-9781B046413E}
{53F87D88-8871-41A2-9F81-B79AB02FEC24} = {AFB1EDA0-E0D2-4E95-BAEC-9781B046413E}
{865652D3-8D1A-4779-92FC-4C54719286B7} = {1EC5651F-83A6-4862-AED2-6BE5103652D0}
{8D01CC30-64F5-4AD3-B9C8-0970B0F1D562} = {1EC5651F-83A6-4862-AED2-6BE5103652D0}
{1C70BA5A-5819-4823-8BEA-0FFEEA39B1E4} = {AFB1EDA0-E0D2-4E95-BAEC-9781B046413E}
EndGlobalSection
EndGlobal
@@ -0,0 +1,29 @@
<?xml version="1.0"?>
<package>
<metadata>
<id>Xamarin.GooglePlayServices.AppIndexing</id>
<title>Xamarin Google Play Services - AppIndexing</title>
<version>$version$</version>
<authors>Xamarin Inc.</authors>
<owners>Xamarin Inc.</owners>
<requireLicenseAcceptance>true</requireLicenseAcceptance>
<summary>Xamarin.Android Bindings for Google Play Services - AppIndexing $aar-version$</summary>
<description>
Xamarin.Android Bindings for Google Play Services - AppIndexing $aar-version$

NOTE: This is package only contains type forwarders to the types which now exist in Xamarin.Firebase.AppIndexing and is only available for backwards compatibility purposes.
</description>
<copyright>Copyright © Microsoft Corporation</copyright>
<projectUrl>http://components.xamarin.com/view/googleplayservices-appindexing/</projectUrl>
<licenseUrl>http://components.xamarin.com/license/googleplayservices-appindexing/</licenseUrl>
<iconUrl>https://raw.githubusercontent.com/xamarin/GooglePlayServicesComponents/master/icons/play-services-appindexing_128x128.png</iconUrl>
<dependencies>
<group targetFramework="MonoAndroid70">
<dependency id="Xamarin.Firebase.AppIndexing" version="[$version$]"/>
</group>
</dependencies>
</metadata>
<files>
<file src="output/Xamarin.GooglePlayServices.AppIndexing.dll" target="lib/MonoAndroid70" />
</files>
</package>
90 changes: 90 additions & 0 deletions appindexing/source/AppIndexing.csproj
@@ -0,0 +1,90 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\..\packages\Xamarin.Build.Download.0.4.3\build\Xamarin.Build.Download.props" Condition="Exists('..\..\packages\Xamarin.Build.Download.0.4.3\build\Xamarin.Build.Download.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{1C70BA5A-5819-4823-8BEA-0FFEEA39B1E4}</ProjectGuid>
<ProjectTypeGuids>{10368E6C-D01B-4462-8E8B-01FC667A7035};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
<OutputType>Library</OutputType>
<RootNamespace>Xamarin.GooglePlayServices.AppIndexing</RootNamespace>
<MonoAndroidResourcePrefix>Resources</MonoAndroidResourcePrefix>
<MonoAndroidAssetsPrefix>Assets</MonoAndroidAssetsPrefix>
<AssemblyName>Xamarin.GooglePlayServices.AppIndexing</AssemblyName>
<TargetFrameworkVersion>v7.0</TargetFrameworkVersion>
<!-- <SignAssembly>true</SignAssembly>
<DelaySign>true</DelaySign>
<AssemblyOriginatorKeyFile>publickey.snk</AssemblyOriginatorKeyFile> -->
<AndroidClassParser>class-parse</AndroidClassParser>
<ProductVersion>8.0.30703</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug</OutputPath>
<DefineConstants>DEBUG;</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AndroidLinkMode>None</AndroidLinkMode>
<ConsolePause>false</ConsolePause>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>full</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release</OutputPath>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<AndroidUseSharedRuntime>false</AndroidUseSharedRuntime>
<ConsolePause>false</ConsolePause>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Xml" />
<Reference Include="System.Core" />
<Reference Include="Mono.Android" />
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="..\..\output\Xamarin.Firebase.AppIndexing.dll.generated.cs">
<Link>Xamarin.Firebase.AppIndexing.dll.generated.cs</Link>
</Compile>
</ItemGroup>
<ItemGroup>
<TransformFile Include="Transforms\EnumFields.xml" />
<TransformFile Include="Transforms\EnumMethods.xml" />
<TransformFile Include="Transforms\Metadata.xml" />
</ItemGroup>
<ItemGroup>
<Folder Include="Additions\" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\base\source\Base.csproj">
<Project>{3F6BAE25-ADEB-468C-8384-AD655623C341}</Project>
<Name>Base</Name>
</ProjectReference>
<ProjectReference Include="..\..\basement\source\Basement.csproj">
<Project>{6A38FACF-F0C5-4A49-8A8A-7CE6634207CE}</Project>
<Name>Basement</Name>
</ProjectReference>
<ProjectReference Include="..\..\firebase-appindexing\source\Firebase-AppIndexing.csproj">
<Project>{8D01CC30-64F5-4AD3-B9C8-0970B0F1D562}</Project>
<Name>Firebase-AppIndexing</Name>
</ProjectReference>
<ProjectReference Include="..\..\firebase-common\source\Firebase-Common.csproj">
<Project>{865652D3-8D1A-4779-92FC-4C54719286B7}</Project>
<Name>Firebase-Common</Name>
</ProjectReference>
<ProjectReference Include="..\..\tasks\source\Tasks.csproj">
<Project>{53F87D88-8871-41A2-9F81-B79AB02FEC24}</Project>
<Name>Tasks</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.Bindings.targets" />
<Import Project="..\..\generated.targets" />
<Import Project="..\..\packages\Xamarin.Build.Download.0.4.3\build\Xamarin.Build.Download.targets" Condition="Exists('..\..\packages\Xamarin.Build.Download.0.4.3\build\Xamarin.Build.Download.targets')" />
</Project>
27 changes: 27 additions & 0 deletions appindexing/source/Properties/AssemblyInfo.cs
@@ -0,0 +1,27 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using Android.App;

// Information about this assembly is defined by the following attributes.
// Change them to the values specific to your project.

[assembly: AssemblyTitle("Xamarin.GooglePlayServices.AppIndexing")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany ("Microsoft Corporation")]
[assembly: AssemblyProduct("")]
[assembly: AssemblyCopyright ("Copyright © Microsoft Corporation")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
// The form "{Major}.{Minor}.*" will automatically update the build and revision,
// and "{Major}.{Minor}.{Build}.*" will update just the revision.

[assembly: AssemblyVersion("1.0.0")]

// The following attributes are used to specify the signing key for the assembly,
// if desired. See the Mono documentation for more information about signing.

//[assembly: AssemblyDelaySign(false)]
//[assembly: AssemblyKeyFile("")]
2 changes: 2 additions & 0 deletions appindexing/source/Transforms/EnumFields.xml
@@ -0,0 +1,2 @@
<enum-field-mappings>
</enum-field-mappings>
2 changes: 2 additions & 0 deletions appindexing/source/Transforms/EnumMethods.xml
@@ -0,0 +1,2 @@
<enum-method-mappings>
</enum-method-mappings>
2 changes: 2 additions & 0 deletions appindexing/source/Transforms/Metadata.xml
@@ -0,0 +1,2 @@
<metadata>
</metadata>
4 changes: 4 additions & 0 deletions appindexing/source/packages.config
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<packages>
<package id="Xamarin.Build.Download" version="0.4.3" targetFramework="monoandroid70" />
</packages>
Expand Up @@ -21,6 +21,7 @@
<dependency id="Xamarin.GooglePlayServices.Basement" version="[$version$]" />
<dependency id="Xamarin.GooglePlayServices.Location" version="[$version$]" />
<dependency id="Xamarin.GooglePlayServices.Places" version="[$version$]" />
<dependency id="Xamarin.GooglePlayServices.Tasks" version="[$version$]" />
</group>
</dependencies>
</metadata>
Expand Down
4 changes: 4 additions & 0 deletions awareness/source/Awareness.csproj
Expand Up @@ -98,6 +98,10 @@
<Project>{D42D621B-0370-44F6-A58E-0749629F9F4D}</Project>
<Name>Places</Name>
</ProjectReference>
<ProjectReference Include="..\..\tasks\source\Tasks.csproj">
<Project>{53F87D88-8871-41A2-9F81-B79AB02FEC24}</Project>
<Name>Tasks</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.Bindings.targets" />
<Import Project="..\..\generated.targets" />
Expand Down
1 change: 1 addition & 0 deletions base/source/Transforms/Metadata.xml
Expand Up @@ -18,6 +18,7 @@

<!-- Allowing zzc classes allows a bit too much, so remove these specifically -->
<remove-node path="/api/package[@name='com.google.android.gms.common.data']/class[contains(@name, 'zz') and @name != 'zzc' and @name != 'zzf']" />
<remove-node path="/api/package[@name='com.google.android.gms.auth.api.signin.internal']/class[@name='zzf']" />

<!-- These CREATOR fields are of some zz* types, so let's remove them -->
<remove-node path="/api/package[@name='com.google.android.gms.common.data']/class[@name='DataHolder']/field[@name='CREATOR']" />
Expand Down
18 changes: 14 additions & 4 deletions basement/buildtasks.tests/Basement.BuildTasks.Tests.csproj
Expand Up @@ -31,20 +31,30 @@
<ItemGroup>
<Reference Include="System" />
<Reference Include="nunit.framework">
<HintPath>..\..\packages\NUnit.2.6.4\lib\nunit.framework.dll</HintPath>
<HintPath>..\..\packages\NUnit.3.0.1\lib\net45\nunit.framework.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Build" />
<Reference Include="Microsoft.Build.Framework" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Test.cs" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
<Compile Include="Helpers\MSBuildExtensions.cs" />
<Compile Include="Helpers\MSBuildTestLogger.cs" />
<Compile Include="Helpers\TestsBase.cs" />
<Compile Include="BuildTaskTests.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\buildtasks\Basement-BuildTasks.csproj">
<Project>{21D99A15-AB98-4691-A45B-D236B2A91DEB}</Project>
<Name>Basement-BuildTasks</Name>
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Folder Include="Helpers\" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
</Project>
97 changes: 97 additions & 0 deletions basement/buildtasks.tests/BuildTaskTests.cs
@@ -0,0 +1,97 @@
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Microsoft.Build.Construction;
using Microsoft.Build.Evaluation;
using Microsoft.Build.Execution;
using NUnit.Framework;
using Xamarin.ContentPipeline.Tests;

namespace buildtasks.tests
{
class BuildTaskTests : TestsBase
{
public void AddCoreTargets(ProjectRootElement el)
{
//var props = Path.Combine(
// Path.GetDirectoryName(GetType().Assembly.Location),
// "..", "..", "..", "buildtasks", "bin", "Debug", "Xamarin.GooglePlayServices.Basement.props"
//);
//el.AddImport(props);
var targets = Path.Combine(
Path.GetDirectoryName(GetType().Assembly.Location),
"..", "..", "..", "buildtasks", "bin", "Debug", "Xamarin.GooglePlayServices.Basement.targets"
);
el.AddImport(targets);

}

[Test]
public void Test_Skip_Due_To_Newer_Outputs_Than_Inputs()
{
var googleServicesJsonPath = Path.Combine(TestContext.CurrentContext.TestDirectory, "..", "..", "google-services.json");

var monoAndroidResDirIntermediate = Path.Combine(TempDir, "Debug");

Directory.CreateDirectory(monoAndroidResDirIntermediate);

File.WriteAllText(Path.Combine(monoAndroidResDirIntermediate, "ProcessGoogleServicesJson.stamp"), "STAMPS");


var engine = new ProjectCollection();
var prel = ProjectRootElement.Create(Path.Combine(TempDir, "project.csproj"), engine);

Console.WriteLine("TempDir: {0}", TempDir);

prel.AddProperty("AndroidApplication", "True");
prel.AddProperty("IntermediateOutputPath", monoAndroidResDirIntermediate);
prel.AddProperty("MonoAndroidResDirIntermediate", monoAndroidResDirIntermediate);
prel.AddProperty("_AndroidPackage", "com.xamarin.sample");

prel.AddItem("GoogleServicesJson", googleServicesJsonPath);

AddCoreTargets(prel);

var project = new ProjectInstance(prel);
var log = new MSBuildTestLogger();

var success = BuildProject(engine, project, "ProcessGoogleServicesJson", log);

Assert.IsTrue(success);
Assert.IsTrue(log.Events.Any(e => e.Message.Contains("ProcessGoogleServicesJson") && e.Message.Contains("skipped")));
}

[Test]
public void Test_Inputs_Newer_Than_Outputs()
{
var googleServicesJsonPath = Path.Combine(TestContext.CurrentContext.TestDirectory, "..", "..", "google-services.json");

var monoAndroidResDirIntermediate = Path.Combine(TempDir, "Debug");

Directory.CreateDirectory(monoAndroidResDirIntermediate);

var engine = new ProjectCollection();
var prel = ProjectRootElement.Create(Path.Combine(TempDir, "project.csproj"), engine);

Console.WriteLine("TempDir: {0}", TempDir);

prel.AddProperty("AndroidApplication", "True");
prel.AddProperty("IntermediateOutputPath", monoAndroidResDirIntermediate);
prel.AddProperty("MonoAndroidResDirIntermediate", monoAndroidResDirIntermediate);
prel.AddProperty("_AndroidPackage", "com.xamarin.sample");

prel.AddItem("GoogleServicesJson", googleServicesJsonPath);

AddCoreTargets(prel);

var project = new ProjectInstance(prel);
var log = new MSBuildTestLogger();

var success = BuildProject(engine, project, "ProcessGoogleServicesJson", log);

Assert.IsTrue(success);
Assert.IsFalse(log.Events.Any(e => e.Message.Contains("ProcessGoogleServicesJson") && e.Message.Contains("skipped")));
}
}
}

0 comments on commit 08dc0d1

Please sign in to comment.