Added bindings for support-annotations
This commit is contained in:
Родитель
964d2ef9bd
Коммит
a694ff176c
|
@ -53,6 +53,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Transition", "transition\so
|
|||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Exif", "exifinterface\source\Exif.csproj", "{EBD7CBA0-E16C-460D-908C-89D453DDC556}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Annotations", "support-annotations\source\Annotations.csproj", "{EFC85AD8-90A7-4C98-8CEA-A875213DA5DC}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
|
@ -163,5 +165,9 @@ Global
|
|||
{EBD7CBA0-E16C-460D-908C-89D453DDC556}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{EBD7CBA0-E16C-460D-908C-89D453DDC556}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{EBD7CBA0-E16C-460D-908C-89D453DDC556}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{EFC85AD8-90A7-4C98-8CEA-A875213DA5DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{EFC85AD8-90A7-4C98-8CEA-A875213DA5DC}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{EFC85AD8-90A7-4C98-8CEA-A875213DA5DC}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{EFC85AD8-90A7-4C98-8CEA-A875213DA5DC}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
|
42
build.cake
42
build.cake
|
@ -244,6 +244,7 @@ Task ("externals")
|
|||
MoveFile (implFile, path + aarDir + "/libs/internal_impl.jar");
|
||||
}
|
||||
|
||||
CopyFile (string.Format (path + "m2repository/com/android/support/support-annotations/{0}/support-annotations-{0}.jar", AAR_VERSION), path + "support-annotations.jar");
|
||||
// We get docs a different way now
|
||||
// // Get android docs
|
||||
// if (!FileExists (path + "docs.zip")) {
|
||||
|
@ -327,7 +328,23 @@ Task ("component-setup").Does (() =>
|
|||
});
|
||||
|
||||
Task ("nuget-setup").IsDependentOn ("buildtasks").IsDependentOn ("externals")
|
||||
.WithCriteria (!FileExists ("./generated.targets")).Does (() => {
|
||||
.WithCriteria (!FileExists ("./generated.targets")).Does (() =>
|
||||
{
|
||||
|
||||
Action<FilePath, FilePath> mergeTargetsFiles = (FilePath fromFile, FilePath intoFile) =>
|
||||
{
|
||||
// Load the doc to append to, and the doc to append
|
||||
var xOrig = System.Xml.Linq.XDocument.Load (MakeAbsolute(intoFile).FullPath);
|
||||
System.Xml.Linq.XNamespace nsOrig = xOrig.Root.Name.Namespace;
|
||||
var xMerge = System.Xml.Linq.XDocument.Load (MakeAbsolute(fromFile).FullPath);
|
||||
System.Xml.Linq.XNamespace nsMerge = xMerge.Root.Name.Namespace;
|
||||
// Add all the elements under <Project> into the existing file's <Project> node
|
||||
foreach (var xItemToAdd in xMerge.Element (nsMerge + "Project").Elements ())
|
||||
xOrig.Element (nsOrig + "Project").Add (xItemToAdd);
|
||||
|
||||
xOrig.Save (MakeAbsolute (intoFile).FullPath);
|
||||
};
|
||||
|
||||
var templateText = FileReadText ("./template.targets");
|
||||
|
||||
if (FileExists ("./generated.targets"))
|
||||
|
@ -417,19 +434,20 @@ Task ("nuget-setup").IsDependentOn ("buildtasks").IsDependentOn ("externals")
|
|||
|
||||
if (FileExists (mergeFile)) {
|
||||
Information ("merge.targets found, merging into generated file...");
|
||||
|
||||
// Load the doc to append to, and the doc to append
|
||||
var xOrig = System.Xml.Linq.XDocument.Load (MakeAbsolute(targetsFile).FullPath);
|
||||
System.Xml.Linq.XNamespace nsOrig = xOrig.Root.Name.Namespace;
|
||||
var xMerge = System.Xml.Linq.XDocument.Load (MakeAbsolute(mergeFile).FullPath);
|
||||
System.Xml.Linq.XNamespace nsMerge = xMerge.Root.Name.Namespace;
|
||||
// Add all the elements under <Project> into the existing file's <Project> node
|
||||
foreach (var xItemToAdd in xMerge.Element (nsMerge + "Project").Elements ())
|
||||
xOrig.Element (nsOrig + "Project").Add (xItemToAdd);
|
||||
|
||||
xOrig.Save (MakeAbsolute (targetsFile).FullPath);
|
||||
mergeTargetsFiles (mergeFile, targetsFile);
|
||||
}
|
||||
}
|
||||
|
||||
// Support annotations needs merging tool
|
||||
var annotationsPart = downloadParts.FirstOrDefault (p => p.LocalPath.EndsWith ("/support-annotations-" + AAR_VERSION + ".jar"));
|
||||
var annotationsTemplateText = FileReadText ("./support-annotations/nuget/template.targets");
|
||||
annotationsTemplateText = annotationsTemplateText.Replace ("$AarVersion$", AAR_VERSION)
|
||||
.Replace ("$XbdRangeStart$", annotationsPart.RangeStart.ToString())
|
||||
.Replace ("$XbdRangeEnd$", annotationsPart.RangeEnd.ToString())
|
||||
.Replace ("$XbdMd5$", annotationsPart.Md5);
|
||||
|
||||
FileWriteText ("./support-annotations/nuget/Xamarin.Android.Support.Annotations.targets", annotationsTemplateText);
|
||||
mergeTargetsFiles ("./support-annotations/nuget/Xamarin.Android.Support.Annotations.targets", "./generated.targets");
|
||||
});
|
||||
|
||||
Task ("nuget").IsDependentOn ("nuget-setup").IsDependentOn ("nuget-base").IsDependentOn ("libs");
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
<?xml version="1.0"?>
|
||||
<package>
|
||||
<metadata>
|
||||
<id>Xamarin.Android.Support.Annotations</id>
|
||||
<title>Xamarin Android Support Library - Annotations</title>
|
||||
<version>$version$</version>
|
||||
<authors>Xamarin Inc.</authors>
|
||||
<owners>Xamarin Inc.</owners>
|
||||
<requireLicenseAcceptance>true</requireLicenseAcceptance>
|
||||
<description>Annotations Android Support Library C# bindings for Xamarin</description>
|
||||
<copyright>Copyright © Microsoft Corporation</copyright>
|
||||
<projectUrl>https://github.com/xamarin/AndroidSupportComponents/</projectUrl>
|
||||
<licenseUrl>https://github.com/xamarin/AndroidSupportComponents/blob/master/LICENSE.md</licenseUrl>
|
||||
<iconUrl>https://raw.githubusercontent.com/xamarin/GooglePlayServicesComponents/master/icons/support-annotations_128x128.png</iconUrl>
|
||||
<dependencies>
|
||||
<group targetFramework="MonoAndroid70">
|
||||
<dependency id="Xamarin.Build.Download" version="0.4.2" />
|
||||
</group>
|
||||
</dependencies>
|
||||
</metadata>
|
||||
<files>
|
||||
<file src="support-annotations/nuget/Xamarin.Android.Support.Annotations.targets" target="build/MonoAndroid70" />
|
||||
|
||||
<file src="output/Xamarin.Android.Support.Annotations.dll" target="lib/MonoAndroid70" />
|
||||
</files>
|
||||
</package>
|
|
@ -0,0 +1,74 @@
|
|||
<?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.2\build\Xamarin.Build.Download.props" Condition="Exists('..\..\packages\Xamarin.Build.Download.0.4.2\build\Xamarin.Build.Download.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{EFC85AD8-90A7-4C98-8CEA-A875213DA5DC}</ProjectGuid>
|
||||
<ProjectTypeGuids>{10368E6C-D01B-4462-8E8B-01FC667A7035};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||
<OutputType>Library</OutputType>
|
||||
<RootNamespace>Android.Support.Annotations</RootNamespace>
|
||||
<MonoAndroidResourcePrefix>Resources</MonoAndroidResourcePrefix>
|
||||
<MonoAndroidAssetsPrefix>Assets</MonoAndroidAssetsPrefix>
|
||||
<AssemblyName>Xamarin.Android.Support.Annotations</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>
|
||||
<PropertyGroup>
|
||||
<!--Docs URL Can be found here: http://dl-ssl.google.com/android/repository/repository-8.xml -->
|
||||
<DroidDocPaths>..\..\externals\docs\reference</DroidDocPaths>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="Mono.Android" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</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>
|
||||
<InputJar Include="..\..\externals\support-annotations.jar">
|
||||
<Link>Jars\support-annotations.jar</Link>
|
||||
</InputJar>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.Bindings.targets" />
|
||||
<Import Project="..\..\generated.targets" />
|
||||
<Import Project="..\..\packages\Xamarin.Build.Download.0.4.2\build\Xamarin.Build.Download.targets" Condition="Exists('..\..\packages\Xamarin.Build.Download.0.4.2\build\Xamarin.Build.Download.targets')" />
|
||||
</Project>
|
|
@ -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.Android.Support.Annotations")]
|
||||
[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("")]
|
|
@ -0,0 +1,7 @@
|
|||
<enum-field-mappings>
|
||||
<!-- <mapping jni-class="android/support/v4/app/FragmentActivity$FragmentTag" clr-enum-type="Android.Support.V4.App.FragmentTagType">
|
||||
<field jni-name="Fragment_id" clr-name="Id" value="1" />
|
||||
<field jni-name="Fragment_name" clr-name="Name" value="0" />
|
||||
<field jni-name="Fragment_tag" clr-name="Tag" value="2" />
|
||||
</mapping>-->
|
||||
</enum-field-mappings>
|
|
@ -0,0 +1,3 @@
|
|||
<enum-method-mappings>
|
||||
|
||||
</enum-method-mappings>
|
|
@ -0,0 +1,5 @@
|
|||
<metadata>
|
||||
|
||||
<attr path="/api/package[@name='android.support.annotations']" name="managedName">Android.Support.Annotations</attr>
|
||||
|
||||
</metadata>
|
|
@ -0,0 +1,4 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Xamarin.Build.Download" version="0.4.2" targetFramework="monoandroid70" />
|
||||
</packages>
|
Загрузка…
Ссылка в новой задаче