From 0ea28724761ef9839f1b0a1677fead378688deda Mon Sep 17 00:00:00 2001 From: moljac Date: Tue, 2 Aug 2022 12:36:05 +0200 Subject: [PATCH 1/6] version bumps --- Android/Glide/build.cake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Android/Glide/build.cake b/Android/Glide/build.cake index 8a7982fe85..b72547e881 100644 --- a/Android/Glide/build.cake +++ b/Android/Glide/build.cake @@ -1,8 +1,8 @@ var TARGET = Argument ("t", Argument ("target", "ci")); -var NUGET_PATCH = ".2"; +var NUGET_PATCH = ".0"; -var GLIDE_VERSION = "4.12.0"; +var GLIDE_VERSION = "4.13.2"; var GLIDE_NUGET_VERSION = GLIDE_VERSION + NUGET_PATCH; var GLIDE_URL = $"https://repo1.maven.org/maven2/com/github/bumptech/glide/glide/{GLIDE_VERSION}/glide-{GLIDE_VERSION}.aar"; From 3b02c0caa307eb4cbb1fac12baec24e39fe38bfa Mon Sep 17 00:00:00 2001 From: moljac Date: Tue, 2 Aug 2022 12:36:48 +0200 Subject: [PATCH 2/6] TFMs updates + nuget dependencies bumps --- Android/Glide/source/Directory.Build.props | 8 +- .../Xamarin.Android.Glide.DiskLruCache.csproj | 2 +- .../Xamarin.Android.Glide.GifDecoder.csproj | 4 +- ...droid.Glide.RecyclerViewIntegration.csproj | 4 +- .../Additions/Additions.cs | 144 +++++++++--------- .../Xamarin.Android.Glide.csproj | 8 +- 6 files changed, 85 insertions(+), 85 deletions(-) diff --git a/Android/Glide/source/Directory.Build.props b/Android/Glide/source/Directory.Build.props index 3dc7b61fe0..9b56ca542c 100644 --- a/Android/Glide/source/Directory.Build.props +++ b/Android/Glide/source/Directory.Build.props @@ -1,6 +1,6 @@ - MonoAndroid9.0;MonoAndroid10.0;net6.0-android + MonoAndroid12.0;net6.0-android true Microsoft Microsoft @@ -18,11 +18,9 @@ false - - + - - + \ No newline at end of file diff --git a/Android/Glide/source/Xamarin.Android.Glide.DiskLruCache/Xamarin.Android.Glide.DiskLruCache.csproj b/Android/Glide/source/Xamarin.Android.Glide.DiskLruCache/Xamarin.Android.Glide.DiskLruCache.csproj index d37ae8f9a8..20778b0500 100644 --- a/Android/Glide/source/Xamarin.Android.Glide.DiskLruCache/Xamarin.Android.Glide.DiskLruCache.csproj +++ b/Android/Glide/source/Xamarin.Android.Glide.DiskLruCache/Xamarin.Android.Glide.DiskLruCache.csproj @@ -6,7 +6,7 @@ Glide Disk LRU Cache for Xamarin.Android Xamarin.Android bindings for Glide Disk LRU Cache - 4.12.0.2 + 4.13.2.0 diff --git a/Android/Glide/source/Xamarin.Android.Glide.GifDecoder/Xamarin.Android.Glide.GifDecoder.csproj b/Android/Glide/source/Xamarin.Android.Glide.GifDecoder/Xamarin.Android.Glide.GifDecoder.csproj index 61d85d496d..b8023bf53c 100644 --- a/Android/Glide/source/Xamarin.Android.Glide.GifDecoder/Xamarin.Android.Glide.GifDecoder.csproj +++ b/Android/Glide/source/Xamarin.Android.Glide.GifDecoder/Xamarin.Android.Glide.GifDecoder.csproj @@ -6,11 +6,11 @@ Glide GIF Decoder for Xamarin.Android Xamarin.Android bindings for Glide GIF Decoder - 4.12.0.2 + 4.13.2.0 - + diff --git a/Android/Glide/source/Xamarin.Android.Glide.RecyclerViewIntegration/Xamarin.Android.Glide.RecyclerViewIntegration.csproj b/Android/Glide/source/Xamarin.Android.Glide.RecyclerViewIntegration/Xamarin.Android.Glide.RecyclerViewIntegration.csproj index 05cd603af1..e0d58537e0 100644 --- a/Android/Glide/source/Xamarin.Android.Glide.RecyclerViewIntegration/Xamarin.Android.Glide.RecyclerViewIntegration.csproj +++ b/Android/Glide/source/Xamarin.Android.Glide.RecyclerViewIntegration/Xamarin.Android.Glide.RecyclerViewIntegration.csproj @@ -6,7 +6,7 @@ Glide RecyclerView integration for Xamarin.Android Xamarin.Android bindings for Glide RecyclerView integration - 4.12.0.2 + 4.13.2.0 @@ -20,7 +20,7 @@ - + diff --git a/Android/Glide/source/Xamarin.Android.Glide/Additions/Additions.cs b/Android/Glide/source/Xamarin.Android.Glide/Additions/Additions.cs index b2f04f4b83..20b6dcb2e9 100644 --- a/Android/Glide/source/Xamarin.Android.Glide/Additions/Additions.cs +++ b/Android/Glide/source/Xamarin.Android.Glide/Additions/Additions.cs @@ -7,6 +7,7 @@ using Android.Net; using Android.OS; using Android.Runtime; +using Android.Service.Autofill; using Bumptech.Glide.Load; using Bumptech.Glide.Load.Engine; using Bumptech.Glide.Load.Resource.Bitmap; @@ -15,6 +16,7 @@ using Java.IO; using Java.Lang; using Java.Util.Concurrent; +using static Android.Graphics.BitmapFactory; namespace Bumptech.Glide { @@ -35,13 +37,13 @@ public partial class RequestBuilder public virtual RequestBuilder Decode(Class resourceClass) => (RequestBuilder)Decode_T(resourceClass); public virtual RequestBuilder DisallowHardwareConfig() => (RequestBuilder)DisallowHardwareConfig_T(); - + public virtual RequestBuilder Downsample(DownsampleStrategy strategy) => (RequestBuilder)Downsample_T(strategy); public virtual RequestBuilder EncodeFormat(Bitmap.CompressFormat format) => (RequestBuilder)EncodeFormat_T(format); public virtual RequestBuilder EncodeQuality(int quality) => (RequestBuilder)EncodeQuality_T(quality); - + public virtual RequestBuilder Error(Drawable drawable) => (RequestBuilder)Error_T(drawable); public virtual RequestBuilder Error(int resourceId) => (RequestBuilder)Error_T(resourceId); @@ -57,7 +59,7 @@ public partial class RequestBuilder public virtual RequestBuilder Frame(long frameTimeMicros) => (RequestBuilder)Frame_T(frameTimeMicros); public virtual RequestBuilder Lock() => (RequestBuilder)Lock_T(); - + public virtual RequestBuilder OptionalCenterCrop() => (RequestBuilder)OptionalCenterCrop_T(); public virtual RequestBuilder OptionalCenterInside() => (RequestBuilder)OptionalCenterInside_T(); @@ -77,7 +79,7 @@ public partial class RequestBuilder public virtual RequestBuilder Placeholder(Drawable drawable) => (RequestBuilder)Placeholder_T(drawable); public virtual RequestBuilder Placeholder(int resourceId) => (RequestBuilder)Placeholder_T(resourceId); - + public virtual RequestBuilder Set(Option option, Object value) => (RequestBuilder)Set_T(option, value); public virtual RequestBuilder SetDiskCacheStrategy(DiskCacheStrategy strategy) => (RequestBuilder)DiskCacheStrategy_T(strategy); @@ -118,22 +120,22 @@ public partial class AssetFileDescriptorLocalUriFetcher } public partial class FileDescriptorAssetPathFetcher - { + { protected override void Close(Object data) => Close((ParcelFileDescriptor)data); protected override Object LoadResource(AssetManager assetManager, string path) => LoadResource_T(assetManager, path); } - public partial class FileDescriptorLocalUriFetcher - { - protected override void Close(Object data) => Close((ParcelFileDescriptor)data); + public partial class FileDescriptorLocalUriFetcher + { + protected override void Close(Object data) => Close((ParcelFileDescriptor)data); protected override Object LoadResource(Uri uri, ContentResolver contentResolver) => LoadResource_T(uri, contentResolver); } public partial class StreamAssetPathFetcher - { - protected override void Close(Object data) + { + protected override void Close(Object data) { var stream = InputStreamInvoker.FromJniHandle(((InputStream)data).Handle, JniHandleOwnership.DoNotTransfer); @@ -141,23 +143,23 @@ protected override void Close(Object data) } protected override Object LoadResource(AssetManager assetManager, string path) - { - var handle = InputStreamAdapter.ToLocalJniHandle(LoadResource_T(assetManager, path)); - - try - { - return new Object(handle, JniHandleOwnership.TransferLocalRef); - } - finally - { - JNIEnv.DeleteLocalRef(handle); - } - } - } + { + var handle = InputStreamAdapter.ToLocalJniHandle(LoadResource_T(assetManager, path)); + + try + { + return new Object(handle, JniHandleOwnership.TransferLocalRef); + } + finally + { + JNIEnv.DeleteLocalRef(handle); + } + } + } public partial class StreamLocalUriFetcher - { - protected override void Close(Object data) + { + protected override void Close(Object data) { var stream = InputStreamInvoker.FromJniHandle(((InputStream)data).Handle, JniHandleOwnership.DoNotTransfer); @@ -165,19 +167,19 @@ protected override void Close(Object data) } protected override Object LoadResource(Uri uri, ContentResolver contentResolver) - { - var handle = InputStreamAdapter.ToLocalJniHandle(LoadResource_T(uri, contentResolver)); - - try - { - return new Object(handle, JniHandleOwnership.TransferLocalRef); - } - finally - { - JNIEnv.DeleteLocalRef(handle); - } - } - } + { + var handle = InputStreamAdapter.ToLocalJniHandle(LoadResource_T(uri, contentResolver)); + + try + { + return new Object(handle, JniHandleOwnership.TransferLocalRef); + } + finally + { + JNIEnv.DeleteLocalRef(handle); + } + } + } } namespace Bumptech.Glide.Load.Engine.Executor @@ -196,32 +198,32 @@ public partial class GlideExecutor namespace Bumptech.Glide.Load.Model { - public partial class AssetUriLoader - { - public virtual ModelLoaderLoadData BuildLoadData(Object model, int width, int height, Options options) => + public partial class AssetUriLoader + { + public virtual ModelLoaderLoadData BuildLoadData(Object model, int width, int height, Options options) => BuildLoadData((Uri)model, width, height, options); public virtual bool Handles(Object model) => Handles((Uri)model); } public partial class ByteArrayLoader - { - public virtual ModelLoaderLoadData BuildLoadData(Object model, int width, int height, Options options) => + { + public virtual ModelLoaderLoadData BuildLoadData(Object model, int width, int height, Options options) => BuildLoadData(model?.ToArray(), width, height, options); public virtual bool Handles(Object model) => Handles(model?.ToArray()); } - public partial class StringLoader - { - public virtual ModelLoaderLoadData BuildLoadData(Object model, int width, int height, Options options) => + public partial class StringLoader + { + public virtual ModelLoaderLoadData BuildLoadData(Object model, int width, int height, Options options) => BuildLoadData(model?.ToString(), width, height, options); public virtual bool Handles(Object model) => Handles(model?.ToString()); } public partial class FileLoader - { - public virtual ModelLoaderLoadData BuildLoadData(Object model, int width, int height, Options options) => + { + public virtual ModelLoaderLoadData BuildLoadData(Object model, int width, int height, Options options) => BuildLoadData((File)model, width, height, options); public virtual bool Handles(Object model) => Handles((File)model); @@ -236,16 +238,16 @@ public virtual ModelLoaderLoadData BuildLoadData(Object model, int width, int he } public partial class UriLoader - { - public virtual ModelLoaderLoadData BuildLoadData(Object model, int width, int height, Options options) => + { + public virtual ModelLoaderLoadData BuildLoadData(Object model, int width, int height, Options options) => BuildLoadData((Uri)model, width, height, options); public virtual bool Handles(Object model) => Handles((Uri)model); } public partial class UrlUriLoader - { - public virtual ModelLoaderLoadData BuildLoadData(Object model, int width, int height, Options options) => + { + public virtual ModelLoaderLoadData BuildLoadData(Object model, int width, int height, Options options) => BuildLoadData((Uri)model, width, height, options); public virtual bool Handles(Object model) => Handles((Uri)model); @@ -280,7 +282,7 @@ public bool Handles(Object source, Options options) namespace Bumptech.Glide.Load.Resource.Gif { public partial class GifDrawableEncoder - { + { public virtual unsafe bool Encode(Object data, global::Java.IO.File file, global::Bumptech.Glide.Load.Options options) => Encode((IResource)data, file, options); } @@ -288,32 +290,32 @@ public virtual unsafe bool Encode(Object data, global::Java.IO.File file, global namespace Bumptech.Glide.Load.Resource.Bitmap { - public partial class BitmapDrawableEncoder - { - public virtual bool Encode(Object data, Java.IO.File file, Options options) => Encode((IResource)data, file, options); + public partial class BitmapDrawableEncoder + { + public virtual bool Encode(Object data, Java.IO.File file, Options options) => Encode((IResource)data, file, options); } public partial class BitmapEncoder - { - public virtual bool Encode(Object data, Java.IO.File file, Options options) => Encode((IResource)data, file, options); + { + public virtual bool Encode(Object data, Java.IO.File file, Options options) => Encode((IResource)data, file, options); } public partial class StreamBitmapDecoder : IResourceDecoder - { - IResource IResourceDecoder.Decode(Object source, int width, int height, Options options) - { - var stream = InputStreamInvoker.FromJniHandle(source.Handle, JniHandleOwnership.DoNotTransfer); + { + IResource IResourceDecoder.Decode(Object source, int width, int height, Options options) + { + var stream = InputStreamInvoker.FromJniHandle(source.Handle, JniHandleOwnership.DoNotTransfer); - return Decode(stream, width, height, options); - } + return Decode(stream, width, height, options); + } - bool IResourceDecoder.Handles(Object source, Options options) - { - var stream = InputStreamInvoker.FromJniHandle(source.Handle, JniHandleOwnership.DoNotTransfer); + bool IResourceDecoder.Handles(Object source, Options options) + { + var stream = InputStreamInvoker.FromJniHandle(source.Handle, JniHandleOwnership.DoNotTransfer); - return Handles(stream, options); - } - } + return Handles(stream, options); + } + } } namespace Bumptech.Glide.Request @@ -341,7 +343,7 @@ public partial class RequestOptions public virtual RequestOptions EncodeFormat(Bitmap.CompressFormat format) => (RequestOptions)EncodeFormat_T(format); public virtual RequestOptions EncodeQuality(int quality) => (RequestOptions)EncodeQuality_T(quality); - + public virtual RequestBuilder Error(Drawable drawable) => (RequestBuilder)Error_T(drawable); public virtual RequestOptions Error(int resourceId) => (RequestOptions)Error_T(resourceId); diff --git a/Android/Glide/source/Xamarin.Android.Glide/Xamarin.Android.Glide.csproj b/Android/Glide/source/Xamarin.Android.Glide/Xamarin.Android.Glide.csproj index 2dcd4cc750..12e65eeae5 100644 --- a/Android/Glide/source/Xamarin.Android.Glide/Xamarin.Android.Glide.csproj +++ b/Android/Glide/source/Xamarin.Android.Glide/Xamarin.Android.Glide.csproj @@ -6,7 +6,7 @@ Glide for Xamarin.Android Xamarin.Android bindings for Glide - 4.12.0.2 + 4.13.2.0 @@ -20,9 +20,9 @@ - - - + + + From 9e116f39b88a2a8ed892e914e3d56e9996f56b3d Mon Sep 17 00:00:00 2001 From: moljac Date: Wed, 3 Aug 2022 09:32:04 +0200 Subject: [PATCH 3/6] ambiguity resolved (ITransformation) --- .../Glide/source/Xamarin.Android.Glide/Additions/Additions.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Android/Glide/source/Xamarin.Android.Glide/Additions/Additions.cs b/Android/Glide/source/Xamarin.Android.Glide/Additions/Additions.cs index 20b6dcb2e9..f142e9c67e 100644 --- a/Android/Glide/source/Xamarin.Android.Glide/Additions/Additions.cs +++ b/Android/Glide/source/Xamarin.Android.Glide/Additions/Additions.cs @@ -7,7 +7,7 @@ using Android.Net; using Android.OS; using Android.Runtime; -using Android.Service.Autofill; +//using Android.Service.Autofill; using Bumptech.Glide.Load; using Bumptech.Glide.Load.Engine; using Bumptech.Glide.Load.Resource.Bitmap; From 01a063b10e3afe05342a0365c4100396f5da8914 Mon Sep 17 00:00:00 2001 From: moljac Date: Wed, 3 Aug 2022 09:32:18 +0200 Subject: [PATCH 4/6] Xamarin.Legacy.Sdk bump --- global.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/global.json b/global.json index 492bdd7681..82353ec0d1 100644 --- a/global.json +++ b/global.json @@ -4,6 +4,6 @@ "MSBuild.Sdk.Extras": "3.0.44", "Microsoft.Build.Traversal": "3.1.6", "Microsoft.Build.NoTargets": "3.4.0", - "Xamarin.Legacy.Sdk": "0.1.2-alpha6" + "Xamarin.Legacy.Sdk": "0.2.0-alpha1" } } \ No newline at end of file From 4ea496d3f1250104d09c6863839d36ba781f19c7 Mon Sep 17 00:00:00 2001 From: moljac Date: Wed, 3 Aug 2022 10:02:55 +0200 Subject: [PATCH 5/6] new CI settings --- azure-pipelines.yml | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 5537fc916f..04b76f57e7 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -20,21 +20,26 @@ resources: variables: DotNet6Version: 6.0.300 - XamarinAndroidVsix: https://aka.ms/xamarin-android-commercial-d17-1-windows + DotNet6Source: https://aka.ms/dotnet6/nuget/index.json + NuGetOrgSource: https://api.nuget.org/v3/index.json + XamarinDotNetWorkloadSource: workloads.json # or url (check for recent versions - redth) + # https://aka.ms/dotnet/maui/6.0.400.json + # matching builds # NOTE: there wasn't a public release of 16.11 for macOS - XamarinAndroidPkg: https://dl.internalx.com/vsts-devdiv/Xamarin.Android/public/5673868/d17-1/19b97b7614b275a84d9e38096bd1fe0e25a494d4/xamarin.android-12.2.0.4.pkg + LegacyXamarinAndroidPkg: https://dl.internalx.com/vsts-devdiv/Xamarin.Android/public/6454390/6.0.4xx/0b8d593a61bb49120fdf817e8dfdbc4b33937772/xamarin.android-12.3.99.117.pkg + LegacyXamarinAndroidVsix: https://dl.internalx.com/vsts-devdiv/Xamarin.Android/public/6454390/6.0.4xx/0b8d593a61bb49120fdf817e8dfdbc4b33937772/Xamarin.Android.Sdk-12.3.99.117.vsix jobs: - template: .ci/build.v1.yml@components parameters: timeoutInMinutes: 360 areaPath: 'DevDiv\Xamarin SDK\Android' - macosImage: 'macOS-11' # the name of the macOS VM image - # BigSur 20211120 + macosImage: 'macOS-12' # the name of the macOS VM image + # Monterey 20220728 windowsAgentPoolName: AzurePipelines-EO windowsImage: '' windowsImageOverride: AzurePipelinesWindows2019compliant - xcode: 13.2.1 + xcode: 13.3.1 buildType: 'manifest' linuxAgentPoolName: AzurePipelines-EO @@ -77,12 +82,14 @@ jobs: condition: eq(variables['System.JobName'], 'windows') displayName: install Xamarin.Android - pwsh: | - dotnet workload install android + dotnet workload update --verbosity diag --from-rollback-file $(XamarinDotNetWorkloadSource) --source $(Dotnet6Source) --source $(NuGetOrgSource) + dotnet workload install android --verbosity diag --skip-manifest-update --source $(Dotnet6Source) --source $(NuGetOrgSource) + dotnet workload install maui --verbosity diag --skip-manifest-update --source $(Dotnet6Source) --source $(NuGetOrgSource) displayName: install .NET 6 Android Workload condition: ne(variables['System.JobName'], 'linux') tools: - 'xamarin.androidbinderator.tool': '0.5.4' - - 'xamarin.androidx.migration.tool': '1.0.9' + - 'xamarin.androidx.migration.tool': '1.0.10' - ${{ if eq(variables['System.TeamProject'], 'devdiv') }}: - template: sign-artifacts/jobs/v2.yml@internal-templates parameters: @@ -96,4 +103,4 @@ jobs: packageName: Xamarin.Components # SBOM package name. TODO: Customize for specific component: Replace with the name of the nuget package such as Square.Moshi.Adapters packageVersionRegex: '' # SBOM package version. TODO: Customize for specific component: Regular expression used to glean the version number from the package name such as '(?i)^Square.Moshi.Adapters\.(?\d+\.\d+\.\d+).nupkg$' packageFilter: '*.nupkg' - condition: startsWith(variables['Build.SourceBranch'], 'refs/tags/') + condition: startsWith(variables['Build.SourceBranch'], 'refs/tags/') \ No newline at end of file From eaec26b07d38b9b2bc9ffad79a69adcbfadee0b7 Mon Sep 17 00:00:00 2001 From: moljac Date: Wed, 3 Aug 2022 15:31:27 +0200 Subject: [PATCH 6/6] comment removed --- .../Glide/source/Xamarin.Android.Glide/Additions/Additions.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/Android/Glide/source/Xamarin.Android.Glide/Additions/Additions.cs b/Android/Glide/source/Xamarin.Android.Glide/Additions/Additions.cs index f142e9c67e..52f30bdc60 100644 --- a/Android/Glide/source/Xamarin.Android.Glide/Additions/Additions.cs +++ b/Android/Glide/source/Xamarin.Android.Glide/Additions/Additions.cs @@ -7,7 +7,6 @@ using Android.Net; using Android.OS; using Android.Runtime; -//using Android.Service.Autofill; using Bumptech.Glide.Load; using Bumptech.Glide.Load.Engine; using Bumptech.Glide.Load.Resource.Bitmap;