From 9cc1488dab045d4f571afeb064a0f1d4789f25a7 Mon Sep 17 00:00:00 2001 From: Albert Bosma <albert@freed.nl> Date: Fri, 25 Jun 2021 11:08:43 +0200 Subject: [PATCH 1/8] Updated OpenId Android to AndroidX --- .../OpenId.AppAuth.Android.csproj | 63 +++++++++++++++++-- .../OpenId.AppAuth.Android/packages.config | 13 +++- XPlat/OpenId/build.cake | 4 +- 3 files changed, 71 insertions(+), 9 deletions(-) diff --git a/XPlat/OpenId/Android/source/OpenId.AppAuth.Android/OpenId.AppAuth.Android.csproj b/XPlat/OpenId/Android/source/OpenId.AppAuth.Android/OpenId.AppAuth.Android.csproj index 60caba5936..c3f89620a1 100644 --- a/XPlat/OpenId/Android/source/OpenId.AppAuth.Android/OpenId.AppAuth.Android.csproj +++ b/XPlat/OpenId/Android/source/OpenId.AppAuth.Android/OpenId.AppAuth.Android.csproj @@ -1,8 +1,9 @@ <?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.AndroidX.Migration.1.0.8\build\monoandroid90\Xamarin.AndroidX.Migration.props" Condition="Exists('..\packages\Xamarin.AndroidX.Migration.1.0.8\build\monoandroid90\Xamarin.AndroidX.Migration.props')" /> <PropertyGroup> <AndroidCodeGenTarget>XAJavaInterop1</AndroidCodeGenTarget> - <TargetFrameworkVersion>v4.4</TargetFrameworkVersion> + <TargetFrameworkVersion>v10.0</TargetFrameworkVersion> </PropertyGroup> <PropertyGroup> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> @@ -40,16 +41,57 @@ <AllowUnsafeBlocks>false</AllowUnsafeBlocks> </PropertyGroup> <ItemGroup> + <Reference Include="Java.Interop" /> <Reference Include="System" /> <Reference Include="System.Xml" /> <Reference Include="System.Core" /> <Reference Include="Mono.Android" /> - <Reference Include="Xamarin.Android.Support.v4"> - <HintPath>..\packages\Xamarin.Android.Support.v4.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.v4.dll</HintPath> + <Reference Include="Xamarin.AndroidX.Annotation, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"> + <HintPath>..\packages\Xamarin.AndroidX.Annotation.1.1.0.9\lib\monoandroid90\Xamarin.AndroidX.Annotation.dll</HintPath> + <Private>True</Private> </Reference> - <Reference Include="Xamarin.Android.Support.CustomTabs"> - <HintPath>..\packages\Xamarin.Android.Support.CustomTabs.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.CustomTabs.dll</HintPath> + <Reference Include="Xamarin.AndroidX.Arch.Core.Common, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"> + <HintPath>..\packages\Xamarin.AndroidX.Arch.Core.Common.2.1.0.8\lib\monoandroid90\Xamarin.AndroidX.Arch.Core.Common.dll</HintPath> + <Private>True</Private> </Reference> + <Reference Include="Xamarin.AndroidX.Browser, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"> + <HintPath>..\packages\Xamarin.AndroidX.Browser.1.3.0.5\lib\monoandroid90\Xamarin.AndroidX.Browser.dll</HintPath> + <Private>True</Private> + </Reference> + <Reference Include="Xamarin.AndroidX.Collection, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"> + <HintPath>..\packages\Xamarin.AndroidX.Collection.1.1.0.7\lib\monoandroid90\Xamarin.AndroidX.Collection.dll</HintPath> + <Private>True</Private> + </Reference> + <Reference Include="Xamarin.AndroidX.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"> + <HintPath>..\packages\Xamarin.AndroidX.Core.1.3.2.3\lib\monoandroid90\Xamarin.AndroidX.Core.dll</HintPath> + <Private>True</Private> + </Reference> + <Reference Include="Xamarin.AndroidX.Lifecycle.Common, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"> + <HintPath>..\packages\Xamarin.AndroidX.Lifecycle.Common.2.3.0.1\lib\monoandroid90\Xamarin.AndroidX.Lifecycle.Common.dll</HintPath> + <Private>True</Private> + </Reference> + <Reference Include="Xamarin.AndroidX.Lifecycle.Runtime, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"> + <HintPath>..\packages\Xamarin.AndroidX.Lifecycle.Runtime.2.3.0.1\lib\monoandroid90\Xamarin.AndroidX.Lifecycle.Runtime.dll</HintPath> + <Private>True</Private> + </Reference> + <Reference Include="Xamarin.AndroidX.MultiDex, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"> + <HintPath>..\packages\Xamarin.AndroidX.MultiDex.2.0.1.5\lib\monoandroid90\Xamarin.AndroidX.MultiDex.dll</HintPath> + <Private>True</Private> + </Reference> + <Reference Include="Xamarin.AndroidX.VersionedParcelable, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"> + <HintPath>..\packages\Xamarin.AndroidX.VersionedParcelable.1.1.1.7\lib\monoandroid90\Xamarin.AndroidX.VersionedParcelable.dll</HintPath> + <Private>True</Private> + </Reference> + <Reference Include="Xamarin.Google.Guava.ListenableFuture, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"> + <HintPath>..\packages\Xamarin.Google.Guava.ListenableFuture.1.0.0.2\lib\monoandroid50\Xamarin.Google.Guava.ListenableFuture.dll</HintPath> + <Private>True</Private> + </Reference> +<!-- <Reference Include="Xamarin.Android.Support.v4">--> +<!-- <HintPath>..\packages\Xamarin.Android.Support.v4.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.v4.dll</HintPath>--> +<!-- </Reference>--> +<!-- <Reference Include="Xamarin.Android.Support.CustomTabs">--> +<!-- <HintPath>..\packages\Xamarin.Android.Support.CustomTabs.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.CustomTabs.dll</HintPath>--> +<!-- </Reference>--> </ItemGroup> <ItemGroup> <Compile Include="Properties\AssemblyInfo.cs" /> @@ -74,4 +116,15 @@ <Folder Include="Native\" /> </ItemGroup> <Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.Bindings.targets" /> + <Import Project="..\packages\Xamarin.AndroidX.MultiDex.2.0.1.5\build\monoandroid90\Xamarin.AndroidX.MultiDex.targets" Condition="Exists('..\packages\Xamarin.AndroidX.MultiDex.2.0.1.5\build\monoandroid90\Xamarin.AndroidX.MultiDex.targets')" /> + <Import Project="..\packages\Xamarin.AndroidX.Migration.1.0.8\build\monoandroid90\Xamarin.AndroidX.Migration.targets" Condition="Exists('..\packages\Xamarin.AndroidX.Migration.1.0.8\build\monoandroid90\Xamarin.AndroidX.Migration.targets')" /> + <Import Project="..\packages\Xamarin.AndroidX.Annotation.1.1.0.9\build\monoandroid9.0\Xamarin.AndroidX.Annotation.targets" Condition="Exists('..\packages\Xamarin.AndroidX.Annotation.1.1.0.9\build\monoandroid9.0\Xamarin.AndroidX.Annotation.targets')" /> + <Import Project="..\packages\Xamarin.AndroidX.Arch.Core.Common.2.1.0.8\build\monoandroid9.0\Xamarin.AndroidX.Arch.Core.Common.targets" Condition="Exists('..\packages\Xamarin.AndroidX.Arch.Core.Common.2.1.0.8\build\monoandroid9.0\Xamarin.AndroidX.Arch.Core.Common.targets')" /> + <Import Project="..\packages\Xamarin.AndroidX.Collection.1.1.0.7\build\monoandroid9.0\Xamarin.AndroidX.Collection.targets" Condition="Exists('..\packages\Xamarin.AndroidX.Collection.1.1.0.7\build\monoandroid9.0\Xamarin.AndroidX.Collection.targets')" /> + <Import Project="..\packages\Xamarin.AndroidX.Lifecycle.Common.2.3.0.1\build\monoandroid9.0\Xamarin.AndroidX.Lifecycle.Common.targets" Condition="Exists('..\packages\Xamarin.AndroidX.Lifecycle.Common.2.3.0.1\build\monoandroid9.0\Xamarin.AndroidX.Lifecycle.Common.targets')" /> + <Import Project="..\packages\Xamarin.AndroidX.Lifecycle.Runtime.2.3.0.1\build\monoandroid9.0\Xamarin.AndroidX.Lifecycle.Runtime.targets" Condition="Exists('..\packages\Xamarin.AndroidX.Lifecycle.Runtime.2.3.0.1\build\monoandroid9.0\Xamarin.AndroidX.Lifecycle.Runtime.targets')" /> + <Import Project="..\packages\Xamarin.AndroidX.VersionedParcelable.1.1.1.7\build\monoandroid9.0\Xamarin.AndroidX.VersionedParcelable.targets" Condition="Exists('..\packages\Xamarin.AndroidX.VersionedParcelable.1.1.1.7\build\monoandroid9.0\Xamarin.AndroidX.VersionedParcelable.targets')" /> + <Import Project="..\packages\Xamarin.AndroidX.Core.1.3.2.3\build\monoandroid9.0\Xamarin.AndroidX.Core.targets" Condition="Exists('..\packages\Xamarin.AndroidX.Core.1.3.2.3\build\monoandroid9.0\Xamarin.AndroidX.Core.targets')" /> + <Import Project="..\packages\Xamarin.Google.Guava.ListenableFuture.1.0.0.2\build\monoandroid50\Xamarin.Google.Guava.ListenableFuture.targets" Condition="Exists('..\packages\Xamarin.Google.Guava.ListenableFuture.1.0.0.2\build\monoandroid50\Xamarin.Google.Guava.ListenableFuture.targets')" /> + <Import Project="..\packages\Xamarin.AndroidX.Browser.1.3.0.5\build\monoandroid9.0\Xamarin.AndroidX.Browser.targets" Condition="Exists('..\packages\Xamarin.AndroidX.Browser.1.3.0.5\build\monoandroid9.0\Xamarin.AndroidX.Browser.targets')" /> </Project> \ No newline at end of file diff --git a/XPlat/OpenId/Android/source/OpenId.AppAuth.Android/packages.config b/XPlat/OpenId/Android/source/OpenId.AppAuth.Android/packages.config index 553131600e..b7f6517b33 100644 --- a/XPlat/OpenId/Android/source/OpenId.AppAuth.Android/packages.config +++ b/XPlat/OpenId/Android/source/OpenId.AppAuth.Android/packages.config @@ -1,5 +1,14 @@ <?xml version="1.0" encoding="utf-8"?> <packages> - <package id="Xamarin.Android.Support.CustomTabs" version="23.3.0" targetFramework="monoandroid60" /> - <package id="Xamarin.Android.Support.v4" version="23.3.0" targetFramework="monoandroid60" /> + <package id="Xamarin.AndroidX.Annotation" version="1.1.0.9" targetFramework="monoandroid10.0" /> + <package id="Xamarin.AndroidX.Arch.Core.Common" version="2.1.0.8" targetFramework="monoandroid10.0" /> + <package id="Xamarin.AndroidX.Browser" version="1.3.0.5" targetFramework="monoandroid10.0" /> + <package id="Xamarin.AndroidX.Collection" version="1.1.0.7" targetFramework="monoandroid10.0" /> + <package id="Xamarin.AndroidX.Core" version="1.3.2.3" targetFramework="monoandroid10.0" /> + <package id="Xamarin.AndroidX.Lifecycle.Common" version="2.3.0.1" targetFramework="monoandroid10.0" /> + <package id="Xamarin.AndroidX.Lifecycle.Runtime" version="2.3.0.1" targetFramework="monoandroid10.0" /> + <package id="Xamarin.AndroidX.Migration" version="1.0.8" targetFramework="monoandroid10.0" /> + <package id="Xamarin.AndroidX.MultiDex" version="2.0.1.5" targetFramework="monoandroid10.0" /> + <package id="Xamarin.AndroidX.VersionedParcelable" version="1.1.1.7" targetFramework="monoandroid10.0" /> + <package id="Xamarin.Google.Guava.ListenableFuture" version="1.0.0.2" targetFramework="monoandroid10.0" /> </packages> \ No newline at end of file diff --git a/XPlat/OpenId/build.cake b/XPlat/OpenId/build.cake index 9fe6b968a5..2a4a603989 100644 --- a/XPlat/OpenId/build.cake +++ b/XPlat/OpenId/build.cake @@ -3,8 +3,8 @@ var TARGET = Argument ("t", Argument ("target", "ci")); -var ANDROID_VERSION = "0.7.0"; -var ANDROID_NUGET_VERSION = "0.7.0"; +var ANDROID_VERSION = "0.9.0"; +var ANDROID_NUGET_VERSION = "0.9.0"; var IOS_VERSION = "0.92.0"; var IOS_NUGET_VERSION = "0.92.0"; From ab76d4926a945ad92ba9abdae47465f9a4a9c40a Mon Sep 17 00:00:00 2001 From: Albert Bosma <albert@freed.nl> Date: Fri, 25 Jun 2021 11:09:18 +0200 Subject: [PATCH 2/8] Enabled OpenId again in manifest.yaml --- manifest.yaml | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/manifest.yaml b/manifest.yaml index 2200483cac..2ca853a643 100644 --- a/manifest.yaml +++ b/manifest.yaml @@ -692,11 +692,10 @@ BuildScript: ./XPlat/GoogleVR/iOS/build.cake TriggerPaths: [ XPlat/GoogleVR/iOS ] MacBuildTargets: [ nuget, samples ] -# Obsolete -# - Name: OpenId -# BuildScript: ./XPlat/OpenId/build.cake -# TriggerPaths: [ XPlat/OpenId ] -# MacBuildTargets: [ nuget, samples ] +- Name: OpenId + BuildScript: ./XPlat/OpenId/build.cake + TriggerPaths: [ XPlat/OpenId ] + MacBuildTargets: [ nuget, samples ] - Name: AzureMessaging BuildScript: ./XPlat/AzureMessaging/build.cake TriggerPaths: [ XPlat/AzureMessaging ] From bf5c67f909f2b1557de298668d7e4321ebb180a4 Mon Sep 17 00:00:00 2001 From: Albert Bosma <albert@freed.nl> Date: Fri, 25 Jun 2021 11:12:06 +0200 Subject: [PATCH 3/8] Cleanup --- .../OpenId.AppAuth.Android/OpenId.AppAuth.Android.csproj | 6 ------ 1 file changed, 6 deletions(-) diff --git a/XPlat/OpenId/Android/source/OpenId.AppAuth.Android/OpenId.AppAuth.Android.csproj b/XPlat/OpenId/Android/source/OpenId.AppAuth.Android/OpenId.AppAuth.Android.csproj index c3f89620a1..ccea52698b 100644 --- a/XPlat/OpenId/Android/source/OpenId.AppAuth.Android/OpenId.AppAuth.Android.csproj +++ b/XPlat/OpenId/Android/source/OpenId.AppAuth.Android/OpenId.AppAuth.Android.csproj @@ -86,12 +86,6 @@ <HintPath>..\packages\Xamarin.Google.Guava.ListenableFuture.1.0.0.2\lib\monoandroid50\Xamarin.Google.Guava.ListenableFuture.dll</HintPath> <Private>True</Private> </Reference> -<!-- <Reference Include="Xamarin.Android.Support.v4">--> -<!-- <HintPath>..\packages\Xamarin.Android.Support.v4.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.v4.dll</HintPath>--> -<!-- </Reference>--> -<!-- <Reference Include="Xamarin.Android.Support.CustomTabs">--> -<!-- <HintPath>..\packages\Xamarin.Android.Support.CustomTabs.23.3.0\lib\MonoAndroid403\Xamarin.Android.Support.CustomTabs.dll</HintPath>--> -<!-- </Reference>--> </ItemGroup> <ItemGroup> <Compile Include="Properties\AssemblyInfo.cs" /> From 0d30aea8f78ceda04b75a7bbe97f045c4175c507 Mon Sep 17 00:00:00 2001 From: Albert Bosma <albert@freed.nl> Date: Mon, 12 Jul 2021 14:37:42 +0200 Subject: [PATCH 4/8] Updated Android and iOS to sdk style projects --- .../{ => Additions}/AuthState.cs | 0 .../{ => Additions}/AuthorizationService.cs | 0 .../AuthorizationServiceConfiguration.cs | 0 .../OpenId.AppAuth.Android.csproj | 177 ++++--------- .../Properties/AssemblyInfo.cs | 29 +-- .../OpenId.AppAuth.Android/packages.config | 14 - XPlat/OpenId/build.cake | 246 ++++++++++++------ .../OpenId.AppAuth.iOS.csproj | 106 ++++---- .../Properties/AssemblyInfo.cs | 35 --- 9 files changed, 274 insertions(+), 333 deletions(-) rename XPlat/OpenId/Android/source/OpenId.AppAuth.Android/{ => Additions}/AuthState.cs (100%) rename XPlat/OpenId/Android/source/OpenId.AppAuth.Android/{ => Additions}/AuthorizationService.cs (100%) rename XPlat/OpenId/Android/source/OpenId.AppAuth.Android/{ => Additions}/AuthorizationServiceConfiguration.cs (100%) delete mode 100644 XPlat/OpenId/Android/source/OpenId.AppAuth.Android/packages.config delete mode 100644 XPlat/OpenId/iOS/source/OpenId.AppAuth.iOS/Properties/AssemblyInfo.cs diff --git a/XPlat/OpenId/Android/source/OpenId.AppAuth.Android/AuthState.cs b/XPlat/OpenId/Android/source/OpenId.AppAuth.Android/Additions/AuthState.cs similarity index 100% rename from XPlat/OpenId/Android/source/OpenId.AppAuth.Android/AuthState.cs rename to XPlat/OpenId/Android/source/OpenId.AppAuth.Android/Additions/AuthState.cs diff --git a/XPlat/OpenId/Android/source/OpenId.AppAuth.Android/AuthorizationService.cs b/XPlat/OpenId/Android/source/OpenId.AppAuth.Android/Additions/AuthorizationService.cs similarity index 100% rename from XPlat/OpenId/Android/source/OpenId.AppAuth.Android/AuthorizationService.cs rename to XPlat/OpenId/Android/source/OpenId.AppAuth.Android/Additions/AuthorizationService.cs diff --git a/XPlat/OpenId/Android/source/OpenId.AppAuth.Android/AuthorizationServiceConfiguration.cs b/XPlat/OpenId/Android/source/OpenId.AppAuth.Android/Additions/AuthorizationServiceConfiguration.cs similarity index 100% rename from XPlat/OpenId/Android/source/OpenId.AppAuth.Android/AuthorizationServiceConfiguration.cs rename to XPlat/OpenId/Android/source/OpenId.AppAuth.Android/Additions/AuthorizationServiceConfiguration.cs diff --git a/XPlat/OpenId/Android/source/OpenId.AppAuth.Android/OpenId.AppAuth.Android.csproj b/XPlat/OpenId/Android/source/OpenId.AppAuth.Android/OpenId.AppAuth.Android.csproj index ccea52698b..8ed89ac161 100644 --- a/XPlat/OpenId/Android/source/OpenId.AppAuth.Android/OpenId.AppAuth.Android.csproj +++ b/XPlat/OpenId/Android/source/OpenId.AppAuth.Android/OpenId.AppAuth.Android.csproj @@ -1,124 +1,55 @@ -<?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.AndroidX.Migration.1.0.8\build\monoandroid90\Xamarin.AndroidX.Migration.props" Condition="Exists('..\packages\Xamarin.AndroidX.Migration.1.0.8\build\monoandroid90\Xamarin.AndroidX.Migration.props')" /> - <PropertyGroup> - <AndroidCodeGenTarget>XAJavaInterop1</AndroidCodeGenTarget> - <TargetFrameworkVersion>v10.0</TargetFrameworkVersion> - </PropertyGroup> - <PropertyGroup> - <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> - <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> - <ProjectGuid>{DDD84AB4-80CE-4C3E-A6D0-8284A881A7A8}</ProjectGuid> - <ProjectTypeGuids>{10368E6C-D01B-4462-8E8B-01FC667A7035};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> - <OutputType>Library</OutputType> - <RootNamespace>OpenId.AppAuth</RootNamespace> - <AssemblyName>OpenId.AppAuth.Android</AssemblyName> - <MonoAndroidResourcePrefix>Resources</MonoAndroidResourcePrefix> - <MonoAndroidAssetsPrefix>Assets</MonoAndroidAssetsPrefix> - <AndroidUseLatestPlatformSdk>false</AndroidUseLatestPlatformSdk> - <AndroidClassParser>class-parse</AndroidClassParser> - </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> - <AllowUnsafeBlocks>false</AllowUnsafeBlocks> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> - <DebugSymbols>true</DebugSymbols> - <DebugType>pdbonly</DebugType> - <Optimize>true</Optimize> - <OutputPath>bin\Release</OutputPath> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - <AndroidManagedSymbols>true</AndroidManagedSymbols> - <AndroidUseSharedRuntime>false</AndroidUseSharedRuntime> - <AllowUnsafeBlocks>false</AllowUnsafeBlocks> - </PropertyGroup> - <ItemGroup> - <Reference Include="Java.Interop" /> - <Reference Include="System" /> - <Reference Include="System.Xml" /> - <Reference Include="System.Core" /> - <Reference Include="Mono.Android" /> - <Reference Include="Xamarin.AndroidX.Annotation, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"> - <HintPath>..\packages\Xamarin.AndroidX.Annotation.1.1.0.9\lib\monoandroid90\Xamarin.AndroidX.Annotation.dll</HintPath> - <Private>True</Private> - </Reference> - <Reference Include="Xamarin.AndroidX.Arch.Core.Common, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"> - <HintPath>..\packages\Xamarin.AndroidX.Arch.Core.Common.2.1.0.8\lib\monoandroid90\Xamarin.AndroidX.Arch.Core.Common.dll</HintPath> - <Private>True</Private> - </Reference> - <Reference Include="Xamarin.AndroidX.Browser, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"> - <HintPath>..\packages\Xamarin.AndroidX.Browser.1.3.0.5\lib\monoandroid90\Xamarin.AndroidX.Browser.dll</HintPath> - <Private>True</Private> - </Reference> - <Reference Include="Xamarin.AndroidX.Collection, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"> - <HintPath>..\packages\Xamarin.AndroidX.Collection.1.1.0.7\lib\monoandroid90\Xamarin.AndroidX.Collection.dll</HintPath> - <Private>True</Private> - </Reference> - <Reference Include="Xamarin.AndroidX.Core, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"> - <HintPath>..\packages\Xamarin.AndroidX.Core.1.3.2.3\lib\monoandroid90\Xamarin.AndroidX.Core.dll</HintPath> - <Private>True</Private> - </Reference> - <Reference Include="Xamarin.AndroidX.Lifecycle.Common, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"> - <HintPath>..\packages\Xamarin.AndroidX.Lifecycle.Common.2.3.0.1\lib\monoandroid90\Xamarin.AndroidX.Lifecycle.Common.dll</HintPath> - <Private>True</Private> - </Reference> - <Reference Include="Xamarin.AndroidX.Lifecycle.Runtime, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"> - <HintPath>..\packages\Xamarin.AndroidX.Lifecycle.Runtime.2.3.0.1\lib\monoandroid90\Xamarin.AndroidX.Lifecycle.Runtime.dll</HintPath> - <Private>True</Private> - </Reference> - <Reference Include="Xamarin.AndroidX.MultiDex, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"> - <HintPath>..\packages\Xamarin.AndroidX.MultiDex.2.0.1.5\lib\monoandroid90\Xamarin.AndroidX.MultiDex.dll</HintPath> - <Private>True</Private> - </Reference> - <Reference Include="Xamarin.AndroidX.VersionedParcelable, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"> - <HintPath>..\packages\Xamarin.AndroidX.VersionedParcelable.1.1.1.7\lib\monoandroid90\Xamarin.AndroidX.VersionedParcelable.dll</HintPath> - <Private>True</Private> - </Reference> - <Reference Include="Xamarin.Google.Guava.ListenableFuture, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null"> - <HintPath>..\packages\Xamarin.Google.Guava.ListenableFuture.1.0.0.2\lib\monoandroid50\Xamarin.Google.Guava.ListenableFuture.dll</HintPath> - <Private>True</Private> - </Reference> - </ItemGroup> - <ItemGroup> - <Compile Include="Properties\AssemblyInfo.cs" /> - <Compile Include="AuthorizationService.cs" /> - <Compile Include="AuthorizationServiceConfiguration.cs" /> - <Compile Include="AuthState.cs" /> - </ItemGroup> - <ItemGroup> - <TransformFile Include="Transforms\EnumFields.xml" /> - <TransformFile Include="Transforms\EnumMethods.xml" /> - <TransformFile Include="Transforms\Metadata.xml" /> - </ItemGroup> - <ItemGroup> - <LibraryProjectZip Include="..\..\..\externals\android\appauth.aar"> - <Link>Native\appauth.aar</Link> - </LibraryProjectZip> - </ItemGroup> - <ItemGroup> - <None Include="packages.config" /> - </ItemGroup> - <ItemGroup> - <Folder Include="Native\" /> - </ItemGroup> - <Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.Bindings.targets" /> - <Import Project="..\packages\Xamarin.AndroidX.MultiDex.2.0.1.5\build\monoandroid90\Xamarin.AndroidX.MultiDex.targets" Condition="Exists('..\packages\Xamarin.AndroidX.MultiDex.2.0.1.5\build\monoandroid90\Xamarin.AndroidX.MultiDex.targets')" /> - <Import Project="..\packages\Xamarin.AndroidX.Migration.1.0.8\build\monoandroid90\Xamarin.AndroidX.Migration.targets" Condition="Exists('..\packages\Xamarin.AndroidX.Migration.1.0.8\build\monoandroid90\Xamarin.AndroidX.Migration.targets')" /> - <Import Project="..\packages\Xamarin.AndroidX.Annotation.1.1.0.9\build\monoandroid9.0\Xamarin.AndroidX.Annotation.targets" Condition="Exists('..\packages\Xamarin.AndroidX.Annotation.1.1.0.9\build\monoandroid9.0\Xamarin.AndroidX.Annotation.targets')" /> - <Import Project="..\packages\Xamarin.AndroidX.Arch.Core.Common.2.1.0.8\build\monoandroid9.0\Xamarin.AndroidX.Arch.Core.Common.targets" Condition="Exists('..\packages\Xamarin.AndroidX.Arch.Core.Common.2.1.0.8\build\monoandroid9.0\Xamarin.AndroidX.Arch.Core.Common.targets')" /> - <Import Project="..\packages\Xamarin.AndroidX.Collection.1.1.0.7\build\monoandroid9.0\Xamarin.AndroidX.Collection.targets" Condition="Exists('..\packages\Xamarin.AndroidX.Collection.1.1.0.7\build\monoandroid9.0\Xamarin.AndroidX.Collection.targets')" /> - <Import Project="..\packages\Xamarin.AndroidX.Lifecycle.Common.2.3.0.1\build\monoandroid9.0\Xamarin.AndroidX.Lifecycle.Common.targets" Condition="Exists('..\packages\Xamarin.AndroidX.Lifecycle.Common.2.3.0.1\build\monoandroid9.0\Xamarin.AndroidX.Lifecycle.Common.targets')" /> - <Import Project="..\packages\Xamarin.AndroidX.Lifecycle.Runtime.2.3.0.1\build\monoandroid9.0\Xamarin.AndroidX.Lifecycle.Runtime.targets" Condition="Exists('..\packages\Xamarin.AndroidX.Lifecycle.Runtime.2.3.0.1\build\monoandroid9.0\Xamarin.AndroidX.Lifecycle.Runtime.targets')" /> - <Import Project="..\packages\Xamarin.AndroidX.VersionedParcelable.1.1.1.7\build\monoandroid9.0\Xamarin.AndroidX.VersionedParcelable.targets" Condition="Exists('..\packages\Xamarin.AndroidX.VersionedParcelable.1.1.1.7\build\monoandroid9.0\Xamarin.AndroidX.VersionedParcelable.targets')" /> - <Import Project="..\packages\Xamarin.AndroidX.Core.1.3.2.3\build\monoandroid9.0\Xamarin.AndroidX.Core.targets" Condition="Exists('..\packages\Xamarin.AndroidX.Core.1.3.2.3\build\monoandroid9.0\Xamarin.AndroidX.Core.targets')" /> - <Import Project="..\packages\Xamarin.Google.Guava.ListenableFuture.1.0.0.2\build\monoandroid50\Xamarin.Google.Guava.ListenableFuture.targets" Condition="Exists('..\packages\Xamarin.Google.Guava.ListenableFuture.1.0.0.2\build\monoandroid50\Xamarin.Google.Guava.ListenableFuture.targets')" /> - <Import Project="..\packages\Xamarin.AndroidX.Browser.1.3.0.5\build\monoandroid9.0\Xamarin.AndroidX.Browser.targets" Condition="Exists('..\packages\Xamarin.AndroidX.Browser.1.3.0.5\build\monoandroid9.0\Xamarin.AndroidX.Browser.targets')" /> +<?xml version="1.0" encoding="utf-8"?> +<Project Sdk="MSBuild.Sdk.Extras"> + <PropertyGroup> + <TargetFrameworks>MonoAndroid10.0</TargetFrameworks> + <IsBindingProject>true</IsBindingProject> + <AssemblyName>OpenId.AppAuth.Android</AssemblyName> + <MonoAndroidResourcePrefix>Resources</MonoAndroidResourcePrefix> + <MonoAndroidAssetsPrefix>Assets</MonoAndroidAssetsPrefix> + <AndroidUseLatestPlatformSdk>False</AndroidUseLatestPlatformSdk> + <AndroidUseIntermediateDesignerFile>True</AndroidUseIntermediateDesignerFile> + <AndroidResgenFile>Resources\Resource.designer.cs</AndroidResgenFile> + <RootNamespace>OpenId.AppAuth</RootNamespace> + <AndroidClassParser>class-parse</AndroidClassParser> + <AndroidCodegenTarget>XAJavaInterop1</AndroidCodegenTarget> + </PropertyGroup> + + <PropertyGroup> + <PackageId>Xamarin.OpenId.AppAuth.Android</PackageId> + <Title>OpenID AppAuth (OAuth Client) for Android</Title> + <PackageDescription> + AppAuth for Android is a client SDK for communicating with OAuth 2.0 and OpenID Connect providers. + It strives to directly map the requests and responses of those specifications, while following the idiomatic style of the implementation language. + In addition to mapping the raw protocol flows, convenience methods are available to assist with common tasks like performing an action with fresh tokens. + </PackageDescription> + <Authors>Microsoft</Authors> + <Owners>Microsoft</Owners> + <Copyright>© Microsoft Corporation. All rights reserved.</Copyright> + <PackageIconUrl>https://raw.githubusercontent.com/xamarin/XamarinComponents/master/XPlat/OpenId/images/logo_128x128.png</PackageIconUrl> + <PackageProjectUrl>https://go.microsoft.com/fwlink/?linkid=865038</PackageProjectUrl> + <PackageLicenseUrl>https://go.microsoft.com/fwlink/?linkid=864980</PackageLicenseUrl> + <PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance> + <PackageVersion>0.9.0</PackageVersion> + </PropertyGroup> + + <ItemGroup> + <TransformFile Include="Transforms\*.xml" /> + </ItemGroup> + + <ItemGroup> + <None Include="..\..\..\externals\android\appauth.aar"> + <Link>appauth.aar</Link> + </None> + <None Include="..\..\..\External-Dependency-Info.txt" Pack="True" PackagePath="THIRD-PARTY-NOTICES.txt" /> + </ItemGroup> + + <ItemGroup> + <LibraryProjectZip Include="..\..\..\externals\android\appauth.aar" /> + </ItemGroup> + + <ItemGroup> + <PackageReference Include="Xamarin.AndroidX.Annotation" Version="1.2.0" /> + <PackageReference Include="Xamarin.AndroidX.AppCompat" Version="1.3.0" /> + <PackageReference Include="Xamarin.AndroidX.Browser" Version="1.3.0.5" /> + </ItemGroup> </Project> \ No newline at end of file diff --git a/XPlat/OpenId/Android/source/OpenId.AppAuth.Android/Properties/AssemblyInfo.cs b/XPlat/OpenId/Android/source/OpenId.AppAuth.Android/Properties/AssemblyInfo.cs index 21a0651230..02a9501470 100644 --- a/XPlat/OpenId/Android/source/OpenId.AppAuth.Android/Properties/AssemblyInfo.cs +++ b/XPlat/OpenId/Android/source/OpenId.AppAuth.Android/Properties/AssemblyInfo.cs @@ -1,28 +1 @@ -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("OpenId.AppAuth.Android")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("")] -[assembly: AssemblyCopyright("(c) Matthew Leibowitz")] -[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.0")] -[assembly: AssemblyFileVersion("0.7.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("")] +[assembly: Android.LinkerSafe] \ No newline at end of file diff --git a/XPlat/OpenId/Android/source/OpenId.AppAuth.Android/packages.config b/XPlat/OpenId/Android/source/OpenId.AppAuth.Android/packages.config deleted file mode 100644 index b7f6517b33..0000000000 --- a/XPlat/OpenId/Android/source/OpenId.AppAuth.Android/packages.config +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<packages> - <package id="Xamarin.AndroidX.Annotation" version="1.1.0.9" targetFramework="monoandroid10.0" /> - <package id="Xamarin.AndroidX.Arch.Core.Common" version="2.1.0.8" targetFramework="monoandroid10.0" /> - <package id="Xamarin.AndroidX.Browser" version="1.3.0.5" targetFramework="monoandroid10.0" /> - <package id="Xamarin.AndroidX.Collection" version="1.1.0.7" targetFramework="monoandroid10.0" /> - <package id="Xamarin.AndroidX.Core" version="1.3.2.3" targetFramework="monoandroid10.0" /> - <package id="Xamarin.AndroidX.Lifecycle.Common" version="2.3.0.1" targetFramework="monoandroid10.0" /> - <package id="Xamarin.AndroidX.Lifecycle.Runtime" version="2.3.0.1" targetFramework="monoandroid10.0" /> - <package id="Xamarin.AndroidX.Migration" version="1.0.8" targetFramework="monoandroid10.0" /> - <package id="Xamarin.AndroidX.MultiDex" version="2.0.1.5" targetFramework="monoandroid10.0" /> - <package id="Xamarin.AndroidX.VersionedParcelable" version="1.1.1.7" targetFramework="monoandroid10.0" /> - <package id="Xamarin.Google.Guava.ListenableFuture" version="1.0.0.2" targetFramework="monoandroid10.0" /> -</packages> \ No newline at end of file diff --git a/XPlat/OpenId/build.cake b/XPlat/OpenId/build.cake index 2a4a603989..62270b35a9 100644 --- a/XPlat/OpenId/build.cake +++ b/XPlat/OpenId/build.cake @@ -1,5 +1,6 @@ - -#load "../../common.cake" +#addin nuget:?package=Cake.XCode&version=4.2.0 +#addin nuget:?package=Cake.Xamarin.Build&version=4.1.2 +#addin nuget:?package=Cake.FileHelpers&version=3.2.1 var TARGET = Argument ("t", Argument ("target", "ci")); @@ -18,108 +19,191 @@ var PODFILE = new List<string> { "end", }; -var buildSpec = new BuildSpec { - Libs = new [] { - new DefaultSolutionBuilder { - SolutionPath = "./iOS/source/OpenId.AppAuth.iOS.sln", - Configuration="Release", - OutputFiles = new [] { - new OutputFileCopy { - FromFile = "./iOS/source/OpenId.AppAuth.iOS/bin/Release/OpenId.AppAuth.iOS.dll", - } - } - }, - new DefaultSolutionBuilder { - SolutionPath = "./Android/source/OpenId.AppAuth.Android.sln", - OutputFiles = new [] { - new OutputFileCopy { - FromFile = "./Android/source/OpenId.AppAuth.Android/bin/Release/OpenId.AppAuth.Android.dll", - } - } - } - }, - - NuGets = new [] { - new NuGetInfo { NuSpec = "./nuget/OpenId.AppAuth.Android.nuspec", Version = ANDROID_NUGET_VERSION }, - new NuGetInfo { NuSpec = "./nuget/OpenId.AppAuth.iOS.nuspec", Version = IOS_NUGET_VERSION }, - }, - - Samples = new [] { - new IOSSolutionBuilder { SolutionPath = "./iOS/samples/OpenIdAuthSampleiOS.sln", Configuration = "Release", Platform="iPhone" }, - new DefaultSolutionBuilder { SolutionPath = "./Android/samples/OpenIdAuthSampleAndroid.sln" } - }, - - Components = new [] { - new Component { ManifestDirectory = "./component" } - } -}; - -Task ("externals-android") - .WithCriteria (!FileExists ("./externals/android/appauth.aar")) - .Does (() => +Task("externals-ios") + .WithCriteria(IsRunningOnUnix()) + .WithCriteria(!FileExists("./externals/ios/libAppAuth.a")) + .Does(() => { - EnsureDirectoryExists ("./externals/android"); - - DownloadFile (AAR_URL, "./externals/android/appauth.aar"); -}); -Task ("externals-ios") - .WithCriteria (!FileExists ("./externals/ios/libAppAuth.a")) - .Does (() => -{ - if (CocoaPodVersion (new CocoaPodSettings ()) < new System.Version (1, 0)) - PODFILE.RemoveAt (1); - EnsureDirectoryExists ("./externals/ios"); - FileWriteLines ("./externals/ios/Podfile", PODFILE.ToArray ()); + FileWriteLines("./externals/ios/Podfile", PODFILE.ToArray()); + CocoaPodRepoUpdate(); + CocoaPodInstall("./externals/ios", new CocoaPodInstallSettings { NoIntegrate = true }); - CocoaPodRepoUpdate (); - - CocoaPodInstall ("./externals/ios", new CocoaPodInstallSettings { NoIntegrate = true }); - - XCodeBuild (new XCodeBuildSettings { + XCodeBuild(new XCodeBuildSettings { Project = "./externals/ios/Pods/Pods.xcodeproj", Target = "AppAuth", Sdk = "iphoneos", Configuration = "Release", }); - XCodeBuild (new XCodeBuildSettings { + XCodeBuild(new XCodeBuildSettings { Project = "./externals/ios/Pods/Pods.xcodeproj", Target = "AppAuth", Sdk = "iphonesimulator", Configuration = "Release", }); - /* - fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: - externals/ios/build/Release-iphoneos/AppAuth/libAppAuth.a - and - externals/ios/build/Release-iphonesimulator/AppAuth/libAppAuth.a - have the same architectures (arm64) and can't be in the same fat output file - */ - /* - RunLipoCreate ("./", - "./externals/ios/libAppAuth.a", - "./externals/ios/build/Release-iphoneos/AppAuth/libAppAuth.a", - "./externals/ios/build/Release-iphonesimulator/AppAuth/libAppAuth.a"); - */ - CopyFile("./externals/ios/build/Release-iphonesimulator/AppAuth/libAppAuth.a", "./externals/ios/libAppAuth.a"); + // RunLipoCreate("./", + // "./externals/ios/libAppAuth.a", + // "./externals/ios/build/Release-iphoneos/AppAuth/libAppAuth.a", + // "./externals/ios/build/Release-iphonesimulator/AppAuth/libAppAuth.a"); + + CopyFile("./externals/ios/build/Release-iphonesimulator/AppAuth/libAppAuth.a", "./externals/ios/libAppAuth.a"); + + XmlPoke("./iOS/source/OpenId.AppAuth.iOS/OpenId.AppAuth.iOS.csproj", "/Project/PropertyGroup/PackageVersion", IOS_NUGET_VERSION); +}); + +Task("externals-android") + .WithCriteria(!FileExists("./externals/android/appauth.aar")) + .Does(() => +{ + EnsureDirectoryExists("./externals/android"); + + DownloadFile(AAR_URL, "./externals/android/appauth.aar"); + + XmlPoke("./Android/source/OpenId.AppAuth.Android/OpenId.AppAuth.Android.csproj", "/Project/PropertyGroup/PackageVersion", ANDROID_NUGET_VERSION); +}); + +Task("libs-ios") + .WithCriteria(IsRunningOnUnix()) + .IsDependentOn("externals-ios") + .Does(() => +{ + MSBuild("./iOS/source/OpenId.AppAuth.iOS.sln", c => { + c.Configuration = "Release"; + c.Restore = true; + c.Targets.Clear(); + c.Targets.Add("Rebuild"); + c.Properties.Add("DesignTimeBuild", new [] { "false" }); + c.BinaryLogger = new MSBuildBinaryLogSettings { + Enabled = true, + FileName = "./output/libs-ios.binlog" + }; + }); +}); + +Task("libs-android") + .IsDependentOn("externals-android") + .Does(() => +{ + MSBuild("./Android/source/OpenId.AppAuth.Android.sln", c => { + c.Configuration = "Release"; + c.Restore = true; + c.Targets.Clear(); + c.Targets.Add("Rebuild"); + c.Properties.Add("DesignTimeBuild", new [] { "false" }); + c.BinaryLogger = new MSBuildBinaryLogSettings { + Enabled = true, + FileName = "./output/libs-android.binlog" + }; + }); }); -Task ("externals") - .IsDependentOn ("externals-android") - .IsDependentOn ("externals-ios"); -Task ("clean").IsDependentOn ("clean-base").Does (() => +Task("nuget-ios") + .WithCriteria(IsRunningOnUnix()) + .IsDependentOn("libs-ios") + .Does(() => { - if (DirectoryExists ("./externals")) - DeleteDirectory ("./externals", true); + MSBuild("./iOS/source/OpenId.AppAuth.iOS.sln", c => { + c.Configuration = "Release"; + c.Targets.Clear(); + c.Targets.Add("Pack"); + c.Properties.Add("PackageOutputPath", new [] { MakeAbsolute(new FilePath("./output")).FullPath }); + c.Properties.Add("PackageRequireLicenseAcceptance", new [] { "true" }); + c.Properties.Add("DesignTimeBuild", new [] { "false" }); + c.BinaryLogger = new MSBuildBinaryLogSettings { + Enabled = true, + FileName = "./output/nuget-ios.binlog" + }; + }); +}); + +Task("nuget-android") + .IsDependentOn("libs-android") + .Does(() => +{ + MSBuild("./Android/source/OpenId.AppAuth.Android.sln", c => { + c.Configuration = "Release"; + c.Targets.Clear(); + c.Targets.Add("Pack"); + c.Properties.Add("PackageOutputPath", new [] { MakeAbsolute(new FilePath("./output")).FullPath }); + c.Properties.Add("PackageRequireLicenseAcceptance", new [] { "true" }); + c.Properties.Add("DesignTimeBuild", new [] { "false" }); + c.BinaryLogger = new MSBuildBinaryLogSettings { + Enabled = true, + FileName = "./output/nuget-android.binlog" + }; + }); +}); + +Task("samples-ios") + .WithCriteria(IsRunningOnUnix()) + .IsDependentOn("nuget-ios") + .Does(() => +{ + MSBuild("./iOS/samples/OpenIdAuthSampleiOS.sln", c => { + c.Configuration = "Release"; + c.Restore = true; + c.Targets.Clear(); + c.Targets.Add("Build"); + c.BinaryLogger = new MSBuildBinaryLogSettings { + Enabled = true, + FileName = "./output/samples-ios.binlog" + }; + }); +}); + +Task("samples-android") + .IsDependentOn("nuget-android") + .Does(() => +{ + MSBuild("./Android/samples/OpenIdAuthSampleAndroid.sln", c => { + c.Configuration = "Release"; + c.Restore = true; + c.Targets.Clear(); + c.Targets.Add("Build"); + c.BinaryLogger = new MSBuildBinaryLogSettings { + Enabled = true, + FileName = "./output/samples-android.binlog" + }; + }); +}); + +Task("externals") + .IsDependentOn("externals-ios") + .IsDependentOn("externals-android"); + +Task("libs") + .IsDependentOn("libs-ios") + .IsDependentOn("libs-android"); + +Task("nuget") + .IsDependentOn("nuget-ios") + .IsDependentOn("nuget-android"); + +Task("samples") + .IsDependentOn("samples-ios") + .IsDependentOn("samples-android"); + +Task("clean") + .Does(() => +{ + if(DirectoryExists ("./externals/android")) + DeleteDirectory ("./externals/android", new DeleteDirectorySettings { + Recursive = true, + Force = true + }); + + if(DirectoryExists ("./externals/ios")) + DeleteDirectory ("./externals/ios", new DeleteDirectorySettings { + Recursive = true, + Force = true + }); }); Task("ci") .IsDependentOn("nuget"); -SetupXamarinBuildTasks (buildSpec, Tasks, Task); - RunTarget (TARGET); diff --git a/XPlat/OpenId/iOS/source/OpenId.AppAuth.iOS/OpenId.AppAuth.iOS.csproj b/XPlat/OpenId/iOS/source/OpenId.AppAuth.iOS/OpenId.AppAuth.iOS.csproj index 0be85799d2..6263d226a5 100644 --- a/XPlat/OpenId/iOS/source/OpenId.AppAuth.iOS/OpenId.AppAuth.iOS.csproj +++ b/XPlat/OpenId/iOS/source/OpenId.AppAuth.iOS/OpenId.AppAuth.iOS.csproj @@ -1,53 +1,55 @@ -<?xml version="1.0" encoding="utf-8"?> -<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> - <PropertyGroup> - <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> - <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> - <ProjectGuid>{CEE5309A-3522-4BAC-A305-9127C323420E}</ProjectGuid> - <ProjectTypeGuids>{8FFB629D-F513-41CE-95D2-7ECE97B6EEEC};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids> - <OutputType>Library</OutputType> - <RootNamespace>OpenId.AppAuth</RootNamespace> - <AssemblyName>OpenId.AppAuth.iOS</AssemblyName> - <IPhoneResourcePrefix>Resources</IPhoneResourcePrefix> - </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> - <AllowUnsafeBlocks>true</AllowUnsafeBlocks> - </PropertyGroup> - <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> - <Optimize>true</Optimize> - <OutputPath>bin\Release</OutputPath> - <DefineConstants></DefineConstants> - <ErrorReport>prompt</ErrorReport> - <WarningLevel>4</WarningLevel> - <AllowUnsafeBlocks>true</AllowUnsafeBlocks> - </PropertyGroup> - <ItemGroup> - <Reference Include="System" /> - <Reference Include="Xamarin.iOS" /> - </ItemGroup> - <ItemGroup> - <Compile Include="Properties\AssemblyInfo.cs" /> - <Compile Include="Adjustments.cs" /> - </ItemGroup> - <ItemGroup> - <ObjcBindingApiDefinition Include="ApiDefinition.cs" /> - </ItemGroup> - <ItemGroup> - <ObjcBindingCoreSource Include="Structs.cs" /> - </ItemGroup> - <ItemGroup> - <NativeReference Include="..\..\..\externals\ios\libAppAuth.a"> - <Kind>Static</Kind> - <ForceLoad>True</ForceLoad> - <Frameworks>SafariServices</Frameworks> - </NativeReference> - </ItemGroup> - <Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.ObjCBinding.CSharp.targets" /> +<Project Sdk="MSBuild.Sdk.Extras/2.0.54"> + <PropertyGroup> + <TargetFrameworks>Xamarin.iOS10</TargetFrameworks> + <IsBindingProject>true</IsBindingProject> + <RootNamespace>OpenId.AppAuth</RootNamespace> + <AssemblyName>OpenId.AppAuth.iOS</AssemblyName> + <AssemblyVersion>1.0.0.0</AssemblyVersion> + <IPhoneResourcePrefix>Resources</IPhoneResourcePrefix> + <AllowUnsafeBlocks>true</AllowUnsafeBlocks> + </PropertyGroup> + + <PropertyGroup> + <PackageId>Xamarin.OpenId.AppAuth.iOS</PackageId> + <Title>OpenID AppAuth (OAuth Client) for iOS</Title> + <PackageDescription> + AppAuth for iOS is a client SDK for communicating with OAuth 2.0 and OpenID Connect providers. + It strives to directly map the requests and responses of those specifications, while following the idiomatic style of the implementation language. + In addition to mapping the raw protocol flows, convenience methods are available to assist with common tasks like performing an action with fresh tokens. + </PackageDescription> + <Authors>Microsoft</Authors> + <Owners>Microsoft</Owners> + <Copyright>© Microsoft Corporation. All rights reserved.</Copyright> + <PackageIconUrl>https://raw.githubusercontent.com/xamarin/XamarinComponents/master/XPlat/OpenId/images/logo_128x128.png</PackageIconUrl> + <PackageProjectUrl>https://go.microsoft.com/fwlink/?linkid=864982</PackageProjectUrl> + <PackageLicenseUrl>https://go.microsoft.com/fwlink/?linkid=864984</PackageLicenseUrl> + <PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance> + <PackageVersion>0.92.0</PackageVersion> + </PropertyGroup> + + <ItemGroup> + <Folder Include="Resources\" /> + </ItemGroup> + + <ItemGroup> + <NativeReference Include="..\..\..\externals\ios\libAppAuth.a"> + <Kind>Static</Kind> + <ForceLoad>True</ForceLoad> + <Frameworks>SafariServices</Frameworks> + </NativeReference> + <None Include="..\..\..\External-Dependency-Info.txt" Pack="True" PackagePath="THIRD-PARTY-NOTICES.txt" /> + </ItemGroup> + + <ItemGroup> + <Compile Remove="Structs.cs" /> + <Compile Remove="ApiDefinition.cs" /> + </ItemGroup> + + <ItemGroup> + <ObjcBindingCoreSource Include="Structs.cs" Condition=" '$(EnableDefaultCompileItems)' == 'true'" /> + </ItemGroup> + + <ItemGroup> + <ObjcBindingApiDefinition Include="ApiDefinition.cs" Condition=" '$(EnableDefaultCompileItems)' == 'true'" /> + </ItemGroup> </Project> \ No newline at end of file diff --git a/XPlat/OpenId/iOS/source/OpenId.AppAuth.iOS/Properties/AssemblyInfo.cs b/XPlat/OpenId/iOS/source/OpenId.AppAuth.iOS/Properties/AssemblyInfo.cs deleted file mode 100644 index f729158201..0000000000 --- a/XPlat/OpenId/iOS/source/OpenId.AppAuth.iOS/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,35 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; - -using Foundation; - -// This attribute allows you to mark your assemblies as “safe to link”. -// When the attribute is present, the linker—if enabled—will process the assembly -// even if you’re using the “Link SDK assemblies only” option, which is the default for device builds. - -[assembly: LinkerSafe] - -// Information about this assembly is defined by the following attributes. -// Change them to the values specific to your project. - -[assembly: AssemblyTitle("OpenId.AppAuth.iOS")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("")] -[assembly: AssemblyCopyright("(c) Matthew Leibowitz")] -[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.0")] -[assembly: AssemblyFileVersion("0.92.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("")] From a811d441b20d7cf4c52a23175a7391d7ffefbeb1 Mon Sep 17 00:00:00 2001 From: Albert Bosma <albert@freed.nl> Date: Mon, 12 Jul 2021 14:39:08 +0200 Subject: [PATCH 5/8] Removed old nuspec files --- .../nuget/OpenId.AppAuth.Android.nuspec | 24 ------------------- XPlat/OpenId/nuget/OpenId.AppAuth.iOS.nuspec | 24 ------------------- 2 files changed, 48 deletions(-) delete mode 100644 XPlat/OpenId/nuget/OpenId.AppAuth.Android.nuspec delete mode 100644 XPlat/OpenId/nuget/OpenId.AppAuth.iOS.nuspec diff --git a/XPlat/OpenId/nuget/OpenId.AppAuth.Android.nuspec b/XPlat/OpenId/nuget/OpenId.AppAuth.Android.nuspec deleted file mode 100644 index 1d2b342743..0000000000 --- a/XPlat/OpenId/nuget/OpenId.AppAuth.Android.nuspec +++ /dev/null @@ -1,24 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd"> - <metadata> - <id>Xamarin.OpenId.AppAuth.Android</id> - <title>OpenID AppAuth (OAuth Client) for Android</title> - <version>$version$</version> - <authors>Microsoft</authors> - <owners>Microsoft</owners> - <requireLicenseAcceptance>true</requireLicenseAcceptance> - <summary>AppAuth for Android is a client SDK for communicating with OAuth 2.0 and OpenID Connect providers.</summary> - <description>AppAuth for Android is a client SDK for communicating with OAuth 2.0 and OpenID Connect providers. -It strives to directly map the requests and responses of those specifications, while following the idiomatic style of the implementation language. -In addition to mapping the raw protocol flows, convenience methods are available to assist with common tasks like performing an action with fresh tokens. - </description> - <copyright>© Microsoft Corporation. All rights reserved.</copyright> - <licenseUrl>https://go.microsoft.com/fwlink/?linkid=864980</licenseUrl> - <iconUrl>https://github.com/xamarin/XamarinComponents/raw/master/XPlat/OpenId/images/logo_1024x1024.png</iconUrl> - <projectUrl>https://go.microsoft.com/fwlink/?linkid=865038</projectUrl> - </metadata> - <files> - <file src="output/OpenId.AppAuth.Android.dll" target="lib/MonoAndroid" /> - <file src="External-Dependency-Info.txt" target="THIRD-PARTY-NOTICES.txt" /> - </files> -</package> \ No newline at end of file diff --git a/XPlat/OpenId/nuget/OpenId.AppAuth.iOS.nuspec b/XPlat/OpenId/nuget/OpenId.AppAuth.iOS.nuspec deleted file mode 100644 index eda5d74f08..0000000000 --- a/XPlat/OpenId/nuget/OpenId.AppAuth.iOS.nuspec +++ /dev/null @@ -1,24 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd"> - <metadata> - <id>Xamarin.OpenId.AppAuth.iOS</id> - <title>OpenID AppAuth (OAuth Client) for iOS</title> - <version>$version$</version> - <authors>Microsoft</authors> - <owners>Microsoft</owners> - <requireLicenseAcceptance>true</requireLicenseAcceptance> - <summary>AppAuth for iOS is a client SDK for communicating with OAuth 2.0 and OpenID Connect providers.</summary> - <description>AppAuth for iOS is a client SDK for communicating with OAuth 2.0 and OpenID Connect providers. -It strives to directly map the requests and responses of those specifications, while following the idiomatic style of the implementation language. -In addition to mapping the raw protocol flows, convenience methods are available to assist with common tasks like performing an action with fresh tokens. - </description> - <copyright>© Microsoft Corporation. All rights reserved.</copyright> - <licenseUrl>https://go.microsoft.com/fwlink/?linkid=864984</licenseUrl> - <iconUrl>https://github.com/xamarin/XamarinComponents/raw/master/XPlat/OpenId/images/logo_1024x1024.png</iconUrl> - <projectUrl>https://go.microsoft.com/fwlink/?linkid=864982</projectUrl> - </metadata> - <files> - <file src="output/OpenId.AppAuth.iOS.dll" target="lib/Xamarin.iOS10" /> - <file src="External-Dependency-Info.txt" target="THIRD-PARTY-NOTICES.txt" /> - </files> -</package> \ No newline at end of file From c43bcbdb79348d8d92378d98ab26792c91de36d0 Mon Sep 17 00:00:00 2001 From: Albert Bosma <albert@freed.nl> Date: Mon, 19 Jul 2021 17:41:38 +0200 Subject: [PATCH 6/8] Updated Project type --- .../iOS/source/OpenId.AppAuth.iOS/OpenId.AppAuth.iOS.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/XPlat/OpenId/iOS/source/OpenId.AppAuth.iOS/OpenId.AppAuth.iOS.csproj b/XPlat/OpenId/iOS/source/OpenId.AppAuth.iOS/OpenId.AppAuth.iOS.csproj index 6263d226a5..e3142a68e7 100644 --- a/XPlat/OpenId/iOS/source/OpenId.AppAuth.iOS/OpenId.AppAuth.iOS.csproj +++ b/XPlat/OpenId/iOS/source/OpenId.AppAuth.iOS/OpenId.AppAuth.iOS.csproj @@ -1,4 +1,4 @@ -<Project Sdk="MSBuild.Sdk.Extras/2.0.54"> +<Project Sdk="MSBuild.Sdk.Extras"> <PropertyGroup> <TargetFrameworks>Xamarin.iOS10</TargetFrameworks> <IsBindingProject>true</IsBindingProject> From 358933b1a9f60ebb09f4c16f17a8796bd2a77cc8 Mon Sep 17 00:00:00 2001 From: Albert Bosma <albert@freed.nl> Date: Mon, 13 Sep 2021 11:17:40 +0200 Subject: [PATCH 7/8] Set targetframework to 9 --- .../source/OpenId.AppAuth.Android/OpenId.AppAuth.Android.csproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/XPlat/OpenId/Android/source/OpenId.AppAuth.Android/OpenId.AppAuth.Android.csproj b/XPlat/OpenId/Android/source/OpenId.AppAuth.Android/OpenId.AppAuth.Android.csproj index 8ed89ac161..610ff7f808 100644 --- a/XPlat/OpenId/Android/source/OpenId.AppAuth.Android/OpenId.AppAuth.Android.csproj +++ b/XPlat/OpenId/Android/source/OpenId.AppAuth.Android/OpenId.AppAuth.Android.csproj @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="MSBuild.Sdk.Extras"> <PropertyGroup> - <TargetFrameworks>MonoAndroid10.0</TargetFrameworks> + <TargetFramework>MonoAndroid9.0</TargetFramework> <IsBindingProject>true</IsBindingProject> <AssemblyName>OpenId.AppAuth.Android</AssemblyName> <MonoAndroidResourcePrefix>Resources</MonoAndroidResourcePrefix> From e9f16e9d4dc331d7e663c9413a19384041d37383 Mon Sep 17 00:00:00 2001 From: Albert Bosma <albertb22@hotmail.com> Date: Mon, 26 Sep 2022 11:14:32 +0200 Subject: [PATCH 8/8] Updated Android OpenId package to support Anrdoid 12 --- .../OpenId.AppAuth.Android/OpenId.AppAuth.Android.csproj | 4 ++-- XPlat/OpenId/build.cake | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/XPlat/OpenId/Android/source/OpenId.AppAuth.Android/OpenId.AppAuth.Android.csproj b/XPlat/OpenId/Android/source/OpenId.AppAuth.Android/OpenId.AppAuth.Android.csproj index 610ff7f808..b90a9933b3 100644 --- a/XPlat/OpenId/Android/source/OpenId.AppAuth.Android/OpenId.AppAuth.Android.csproj +++ b/XPlat/OpenId/Android/source/OpenId.AppAuth.Android/OpenId.AppAuth.Android.csproj @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="utf-8"?> <Project Sdk="MSBuild.Sdk.Extras"> <PropertyGroup> - <TargetFramework>MonoAndroid9.0</TargetFramework> + <TargetFramework>MonoAndroid12.0</TargetFramework> <IsBindingProject>true</IsBindingProject> <AssemblyName>OpenId.AppAuth.Android</AssemblyName> <MonoAndroidResourcePrefix>Resources</MonoAndroidResourcePrefix> @@ -29,7 +29,7 @@ <PackageProjectUrl>https://go.microsoft.com/fwlink/?linkid=865038</PackageProjectUrl> <PackageLicenseUrl>https://go.microsoft.com/fwlink/?linkid=864980</PackageLicenseUrl> <PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance> - <PackageVersion>0.9.0</PackageVersion> + <PackageVersion>0.11.1</PackageVersion> </PropertyGroup> <ItemGroup> diff --git a/XPlat/OpenId/build.cake b/XPlat/OpenId/build.cake index 62270b35a9..91506e98fa 100644 --- a/XPlat/OpenId/build.cake +++ b/XPlat/OpenId/build.cake @@ -4,8 +4,8 @@ var TARGET = Argument ("t", Argument ("target", "ci")); -var ANDROID_VERSION = "0.9.0"; -var ANDROID_NUGET_VERSION = "0.9.0"; +var ANDROID_VERSION = "0.11.1"; +var ANDROID_NUGET_VERSION = "0.11.1"; var IOS_VERSION = "0.92.0"; var IOS_NUGET_VERSION = "0.92.0";