Skip to content
This repository was archived by the owner on Jun 20, 2023. It is now read-only.

Commit e546d84

Browse files
authored
Merge pull request #79 from cosminstirbu/android-arch-lifecycle-extensions
Adds bindings for android.arch.lifecycle:extensions:1.0.0
2 parents 1a6cd0b + fad166b commit e546d84

File tree

10 files changed

+211
-2
lines changed

10 files changed

+211
-2
lines changed

AndroidSupport.sln

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Arch.Lifecycle.Runtime", "a
7575
EndProject
7676
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Core-Utils", "support-core-utils\source\Core-Utils.csproj", "{BEABEB36-8FFE-4CD9-B6E6-D67686C8BB98}"
7777
EndProject
78+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Arch.Lifecycle.Extensions", "arch-lifecycle\extensions\source\Arch.Lifecycle.Extensions.csproj", "{8DFA4E1A-7DF0-4FC5-A8F3-8E6E30E3DA70}"
79+
EndProject
7880
Global
7981
GlobalSection(SolutionConfigurationPlatforms) = preSolution
8082
Debug|Any CPU = Debug|Any CPU
@@ -225,10 +227,15 @@ Global
225227
{BEABEB36-8FFE-4CD9-B6E6-D67686C8BB98}.Debug|Any CPU.Build.0 = Debug|Any CPU
226228
{BEABEB36-8FFE-4CD9-B6E6-D67686C8BB98}.Release|Any CPU.ActiveCfg = Release|Any CPU
227229
{BEABEB36-8FFE-4CD9-B6E6-D67686C8BB98}.Release|Any CPU.Build.0 = Release|Any CPU
230+
{8DFA4E1A-7DF0-4FC5-A8F3-8E6E30E3DA70}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
231+
{8DFA4E1A-7DF0-4FC5-A8F3-8E6E30E3DA70}.Debug|Any CPU.Build.0 = Debug|Any CPU
232+
{8DFA4E1A-7DF0-4FC5-A8F3-8E6E30E3DA70}.Release|Any CPU.ActiveCfg = Release|Any CPU
233+
{8DFA4E1A-7DF0-4FC5-A8F3-8E6E30E3DA70}.Release|Any CPU.Build.0 = Release|Any CPU
228234
EndGlobalSection
229235
GlobalSection(NestedProjects) = preSolution
230236
{4C9E1C1E-09C3-469C-B3C2-79651DF13870} = {3AC04D8E-9E4C-401F-AED5-239F226BF9C2}
231237
{1489A4D8-8D13-4113-BD73-3025CDE3E3A0} = {3AC04D8E-9E4C-401F-AED5-239F226BF9C2}
232238
{25CE44A9-FA51-4468-952F-21A13F066384} = {3AC04D8E-9E4C-401F-AED5-239F226BF9C2}
239+
{8DFA4E1A-7DF0-4FC5-A8F3-8E6E30E3DA70} = {3AC04D8E-9E4C-401F-AED5-239F226BF9C2}
233240
EndGlobalSection
234241
EndGlobal
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<?xml version="1.0"?>
2+
<package>
3+
<metadata>
4+
<id>Xamarin.Android.Arch.Lifecycle.Extensions</id>
5+
<title>Xamarin Android Architecture Lifecycle - Extensions</title>
6+
<version>$version$</version>
7+
<authors>Xamarin Inc.</authors>
8+
<owners>Xamarin Inc.</owners>
9+
<requireLicenseAcceptance>true</requireLicenseAcceptance>
10+
<description>Android Architecture Lifecycle - Extensions C# bindings for Xamarin</description>
11+
<copyright>Copyright © Microsoft Corporation</copyright>
12+
<projectUrl>https://github.com/xamarin/AndroidSupportComponents/</projectUrl>
13+
<licenseUrl>https://github.com/xamarin/AndroidSupportComponents/blob/master/LICENSE.md</licenseUrl>
14+
<iconUrl>https://raw.githubusercontent.com/xamarin/AndroidSupportComponents/master/icons/arch-lifecycle-extensions_128x128.png</iconUrl>
15+
<dependencies>
16+
<group targetFramework="MonoAndroid80">
17+
<dependency id="Xamarin.Android.Support.Annotations" version="26.1.0"/>
18+
<dependency id="Xamarin.Android.Support.Fragment" version="26.1.0"/>
19+
<dependency id="Xamarin.Android.Support.Compat" version="26.1.0"/>
20+
<dependency id="Xamarin.Android.Arch.Lifecycle.Runtime" version="1.0.3" />
21+
<dependency id="Xamarin.Android.Arch.Lifecycle.Common" version="1.0.1" />
22+
<dependency id="Xamarin.Android.Arch.Core.Common" version="1.0.0" />
23+
</group>
24+
</dependencies>
25+
</metadata>
26+
<files>
27+
<file src="arch-lifecycle/extensions/nuget/Xamarin.Android.Arch.Lifecycle.Extensions.targets" target="build/MonoAndroid80" />
28+
29+
<file src="output/Xamarin.Android.Arch.Lifecycle.Extensions.dll" target="lib/MonoAndroid80" />
30+
31+
<file src="External-Dependency-Info.txt" target="THIRD-PARTY-NOTICES.txt" />
32+
</files>
33+
</package>
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup>
4+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
5+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
6+
<ProjectGuid>{8DFA4E1A-7DF0-4FC5-A8F3-8E6E30E3DA70}</ProjectGuid>
7+
<ProjectTypeGuids>{10368E6C-D01B-4462-8E8B-01FC667A7035};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
8+
<OutputType>Library</OutputType>
9+
<RootNamespace>Android.Arch.Lifecycle.Extensions</RootNamespace>
10+
<AssemblyName>Xamarin.Android.Arch.Lifecycle.Extensions</AssemblyName>
11+
<TargetFrameworkVersion>v8.0</TargetFrameworkVersion>
12+
<MonoAndroidResourcePrefix>Resources</MonoAndroidResourcePrefix>
13+
<MonoAndroidAssetsPrefix>Assets</MonoAndroidAssetsPrefix>
14+
<AndroidUseLatestPlatformSdk>true</AndroidUseLatestPlatformSdk>
15+
<AndroidClassParser>class-parse</AndroidClassParser>
16+
</PropertyGroup>
17+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
18+
<DebugSymbols>true</DebugSymbols>
19+
<DebugType>full</DebugType>
20+
<Optimize>false</Optimize>
21+
<OutputPath>bin\Debug</OutputPath>
22+
<DefineConstants>DEBUG;</DefineConstants>
23+
<ErrorReport>prompt</ErrorReport>
24+
<WarningLevel>4</WarningLevel>
25+
<AndroidLinkMode>None</AndroidLinkMode>
26+
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
27+
</PropertyGroup>
28+
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
29+
<DebugSymbols>true</DebugSymbols>
30+
<DebugType>pdbonly</DebugType>
31+
<Optimize>true</Optimize>
32+
<OutputPath>bin\Release</OutputPath>
33+
<ErrorReport>prompt</ErrorReport>
34+
<WarningLevel>4</WarningLevel>
35+
<AndroidManagedSymbols>true</AndroidManagedSymbols>
36+
<AndroidUseSharedRuntime>false</AndroidUseSharedRuntime>
37+
<AllowUnsafeBlocks>false</AllowUnsafeBlocks>
38+
</PropertyGroup>
39+
<ItemGroup>
40+
<Reference Include="System" />
41+
<Reference Include="System.Xml" />
42+
<Reference Include="System.Core" />
43+
<Reference Include="Mono.Android" />
44+
</ItemGroup>
45+
<ItemGroup>
46+
<Compile Include="Properties\AssemblyInfo.cs" />
47+
</ItemGroup>
48+
<ItemGroup>
49+
<TransformFile Include="Transforms\EnumFields.xml" />
50+
<TransformFile Include="Transforms\EnumMethods.xml" />
51+
<TransformFile Include="Transforms\Metadata.xml" />
52+
</ItemGroup>
53+
<ItemGroup>
54+
<Folder Include="Jars\" />
55+
<Folder Include="Additions\" />
56+
</ItemGroup>
57+
<ItemGroup>
58+
<ProjectReference Include="..\..\..\support-fragment\source\Fragment.csproj">
59+
<Project>{2DE9FDA4-3F63-49E2-BD45-5C072A0350D8}</Project>
60+
<Name>Fragment</Name>
61+
</ProjectReference>
62+
<ProjectReference Include="..\..\..\support-annotations\source\Annotations.csproj">
63+
<Project>{EFC85AD8-90A7-4C98-8CEA-A875213DA5DC}</Project>
64+
<Name>Annotations</Name>
65+
</ProjectReference>
66+
<ProjectReference Include="..\..\..\arch-core\common\source\Arch.Core.Common.csproj">
67+
<Project>{4C9E1C1E-09C3-469C-B3C2-79651DF13870}</Project>
68+
<Name>Arch.Core.Common</Name>
69+
</ProjectReference>
70+
<ProjectReference Include="..\..\common\source\Arch.Lifecycle.Common.csproj">
71+
<Project>{1489A4D8-8D13-4113-BD73-3025CDE3E3A0}</Project>
72+
<Name>Arch.Lifecycle.Common</Name>
73+
</ProjectReference>
74+
<ProjectReference Include="..\..\runtime\source\Arch.Lifecycle.Runtime.csproj">
75+
<Project>{25CE44A9-FA51-4468-952F-21A13F066384}</Project>
76+
<Name>Arch.Lifecycle.Runtime</Name>
77+
</ProjectReference>
78+
<ProjectReference Include="..\..\..\support-compat\source\Compat.csproj">
79+
<Project>{CA4194B2-8B2D-4C37-8790-C79C5803357A}</Project>
80+
<Name>Compat</Name>
81+
</ProjectReference>
82+
</ItemGroup>
83+
<ItemGroup>
84+
<LibraryProjectZip Include="..\..\..\externals\arch-lifecycle\arch-lifecycle-extensions.aar">
85+
<Link>arch-lifecycle-extensions.aar</Link>
86+
</LibraryProjectZip>
87+
</ItemGroup>
88+
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.Bindings.targets" />
89+
</Project>
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
using System.Reflection;
2+
using System.Runtime.CompilerServices;
3+
using Android.App;
4+
5+
// Information about this assembly is defined by the following attributes.
6+
// Change them to the values specific to your project.
7+
8+
[assembly: AssemblyTitle("Xamarin.Android.Arch.Lifecycle.Extensions")]
9+
[assembly: AssemblyDescription("")]
10+
[assembly: AssemblyConfiguration("")]
11+
[assembly: AssemblyCompany("Microsoft Corporation")]
12+
[assembly: AssemblyProduct("")]
13+
[assembly: AssemblyCopyright("Copyright © Microsoft Corporation")]
14+
[assembly: AssemblyTrademark("")]
15+
[assembly: AssemblyCulture("")]
16+
17+
// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}".
18+
// The form "{Major}.{Minor}.*" will automatically update the build and revision,
19+
// and "{Major}.{Minor}.{Build}.*" will update just the revision.
20+
21+
[assembly: AssemblyVersion("1.0.0")]
22+
23+
// The following attributes are used to specify the signing key for the assembly,
24+
// if desired. See the Mono documentation for more information about signing.
25+
26+
//[assembly: AssemblyDelaySign(false)]
27+
//[assembly: AssemblyKeyFile("")]
28+
[assembly: AssemblyMetadata("BUILD_COMMIT", "{BUILD_COMMIT}")]
29+
[assembly: AssemblyMetadata("BUILD_NUMBER", "{BUILD_NUMBER}")]
30+
[assembly: AssemblyMetadata("BUILD_TIMESTAMP", "{BUILD_TIMESTAMP}")]
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<enum-field-mappings>
3+
<!--
4+
This example converts the constants Fragment_id, Fragment_name,
5+
and Fragment_tag from android.support.v4.app.FragmentActivity.FragmentTag
6+
to an enum called Android.Support.V4.App.FragmentTagType with values
7+
Id, Name, and Tag.
8+
9+
<mapping clr-enum-type="Android.Support.V4.App.FragmentTagType" jni-class="android/support/v4/app/FragmentActivity$FragmentTag">
10+
<field clr-name="Id" jni-name="Fragment_id" value="1" />
11+
<field clr-name="Name" jni-name="Fragment_name" value="0" />
12+
<field clr-name="Tag" jni-name="Fragment_tag" value="2" />
13+
</type>
14+
15+
Notes:
16+
- An optional "bitfield" attribute marks the enum type with [Flags].
17+
- For Java interfaces, use "jni-interface" attribute instead of "jni-class" attribute.
18+
-->
19+
</enum-field-mappings>
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<enum-method-mappings>
3+
<!--
4+
This example changes the Java method:
5+
android.support.v4.app.Fragment.SavedState.writeToParcel (int flags)
6+
to be:
7+
android.support.v4.app.Fragment.SavedState.writeToParcel (Android.OS.ParcelableWriteFlags flags)
8+
when bound in C#.
9+
10+
<mapping jni-class="android/support/v4/app/Fragment.SavedState">
11+
<method jni-name="writeToParcel" parameter="flags" clr-enum-type="Android.OS.ParcelableWriteFlags" />
12+
</mapping>
13+
14+
Notes:
15+
- For Java interfaces, use "jni-interface" attribute instead of "jni-class" attribute.
16+
- To change the type of the return value, use "return" as the parameter name.
17+
- The parameter names will be p0, p1, ... unless you provide JavaDoc file in the project.
18+
-->
19+
</enum-method-mappings>
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<metadata>
3+
<!--
4+
This sample removes the class: android.support.v4.content.AsyncTaskLoader.LoadTask:
5+
<remove-node path="/api/package[@name='android.support.v4.content']/class[@name='AsyncTaskLoader.LoadTask']" />
6+
7+
This sample removes the method: android.support.v4.content.CursorLoader.loadInBackground:
8+
<remove-node path="/api/package[@name='android.support.v4.content']/class[@name='CursorLoader']/method[@name='loadInBackground']" />
9+
-->
10+
</metadata>

build.cake

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ if (!IsRunningOnWindows())
6969
var ARTIFACTS = new [] {
7070
new ArtifactInfo (ARCH_CORE_PKG_NAME, "common", "Xamarin.Android.Arch.Core.Common", "1.0.0", "1.0.0", "1.0.0.0", true) { PathPrefix = "arch-core/" },
7171
new ArtifactInfo (ARCH_LIFECYCLE_PKG_NAME, "common", "Xamarin.Android.Arch.Lifecycle.Common", "1.0.1", "1.0.1", "1.0.1.0", true) { PathPrefix = "arch-lifecycle/" },
72-
new ArtifactInfo (ARCH_LIFECYCLE_PKG_NAME, "runtime", "Xamarin.Android.Arch.Lifecycle.Runtime", "1.0.0", "1.0.0", "1.0.0.0") { PathPrefix = "arch-lifecycle/" },
72+
new ArtifactInfo (ARCH_LIFECYCLE_PKG_NAME, "runtime", "Xamarin.Android.Arch.Lifecycle.Runtime", "1.0.3", "1.0.3", "1.0.3.0") { PathPrefix = "arch-lifecycle/" },
73+
new ArtifactInfo (ARCH_LIFECYCLE_PKG_NAME, "extensions", "Xamarin.Android.Arch.Lifecycle.Extensions", "1.0.0", "1.0.0", "1.0.0.0") { PathPrefix = "arch-lifecycle/" },
7374

7475
//new ArtifactInfo (SUPPORT_PKG_NAME, "support-v4", "Xamarin.Android.Support.v4", AAR_VERSION, NUGET_VERSION, COMPONENT_VERSION),
7576
new ArtifactInfo (SUPPORT_PKG_NAME, "support-v13", "Xamarin.Android.Support.v13", AAR_VERSION, NUGET_VERSION, COMPONENT_VERSION),
@@ -274,6 +275,7 @@ Task ("externals")
274275
MoveFile ("./externals/arch-core/common.jar", "./externals/arch-core/arch-core-common.jar");
275276
MoveFile ("./externals/arch-lifecycle/common.jar", "./externals/arch-lifecycle/arch-lifecycle-common.jar");
276277
MoveFile ("./externals/arch-lifecycle/runtime.aar", "./externals/arch-lifecycle/arch-lifecycle-runtime.aar");
278+
MoveFile ("./externals/arch-lifecycle/extensions.aar", "./externals/arch-lifecycle/arch-lifecycle-extensions.aar");
277279
});
278280

279281
Task ("diff")

build.sh

100644100755
File mode changed.

support-compat/nuget/template.nuspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
<dependencies>
1616
<group targetFramework="MonoAndroid80">
1717
<dependency id="Xamarin.Android.Support.Annotations" version="[$version$]" />
18-
<dependency id="Xamarin.Android.Arch.Lifecycle.Runtime" version="1.0.0" />
18+
<dependency id="Xamarin.Android.Arch.Lifecycle.Runtime" version="1.0.3" />
1919
</group>
2020
</dependencies>
2121
</metadata>

0 commit comments

Comments
 (0)