Skip to content

Commit

Permalink
Merge branch 'main' into native-profiling-and-debugging
Browse files Browse the repository at this point in the history
* main:
  Bump to xamarin/xamarin-android-tools/main@fa3711b (dotnet#7501)
  • Loading branch information
grendello committed Nov 18, 2022
2 parents 6923ffa + 4221c07 commit 38ba04f
Show file tree
Hide file tree
Showing 17 changed files with 79 additions and 80 deletions.
2 changes: 1 addition & 1 deletion Configuration.props
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@
<!-- Unit Test Properties -->
<PropertyGroup>
<!-- When changing the version below, please also update the 'build-tools/scripts/nunit3-console*' scripts -->
<NUnitConsoleVersion Condition=" '$(NUnitConsoleVersion)' == '' ">3.11.1</NUnitConsoleVersion>
<NUnitConsoleVersion Condition=" '$(NUnitConsoleVersion)' == '' ">3.12.0</NUnitConsoleVersion>
<_Runtime Condition=" '$(HostOS)' != 'Windows' ">$(ManagedRuntime) $(ManagedRuntimeArgs)</_Runtime>
<_NUnit>$(_Runtime) $(XAPackagesDir)\nunit.consolerunner\$(NUnitConsoleVersion)\tools\nunit3-console.exe</_NUnit>
</PropertyGroup>
Expand Down
10 changes: 10 additions & 0 deletions Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<Project>

<!-- NuGet Package Versions -->
<ItemGroup>
<PackageReference Update="Microsoft.Win32.Registry" Version="5.0.0" />
<PackageReference Update="System.CodeDom" Version="6.0.0" />
<PackageReference Update="Irony" Version="1.1.0" />
</ItemGroup>

</Project>
8 changes: 4 additions & 4 deletions build-tools/scripts/NUnitReferences.projitems
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<Project>
<!-- This file assumes Configuration.props has been imported -->
<ItemGroup>
<PackageReference Include="NUnit" Version="3.12.0" />
<PackageReference Include="NUnit" Version="3.13.2" />
<PackageReference Include="NUnit.ConsoleRunner" Version="$(NUnitConsoleVersion)" />
<PackageReference Include="NUnit3TestAdapter" Version="3.16.1" />
<PackageReference Include="NUnit3TestAdapter" Version="4.0.0" />
</ItemGroup>
<!-- Required packages for .NET Core -->
<ItemGroup Condition=" '$(TargetFramework)' != 'net472' and '$(TargetFramework)' != 'netstandard2.0' ">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.6.1" />
<PackageReference Include="System.Configuration.ConfigurationManager" Version="4.7.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0-preview-20221003-04" />
<PackageReference Include="System.Configuration.ConfigurationManager" Version="6.0.1" />
</ItemGroup>
</Project>
2 changes: 1 addition & 1 deletion external/xamarin-android-tools
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-99.9.9.9" newVersion="5.0.0.0" />
<bindingRedirect oldVersion="0.0.0.0-99.9.9.9" newVersion="6.0.0.0" />
</dependentAssembly>
</assemblyBinding>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-99.9.9.9" newVersion="5.0.0.0" />
<bindingRedirect oldVersion="0.0.0.0-99.9.9.9" newVersion="6.0.0.0" />
</dependentAssembly>
</assemblyBinding>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
using System.Collections.Generic;
using System.IO;
using Microsoft.Build.Construction;
using SixLabors.ImageSharp;
using SixLabors.ImageSharp.Formats;
using SixLabors.ImageSharp.Processing;

namespace Xamarin.ProjectTools
{
Expand All @@ -20,28 +17,27 @@ public abstract class XamarinAndroidCommonProject : XamarinAndroidProject

BuildItem.Source resourceDesigner;

static byte [] ScaleIcon (Image image, IImageFormat format, int width, int height)
static XamarinAndroidCommonProject ()
{
float scale = Math.Min (width / image.Width, height / image.Height);
using (var ms = new MemoryStream ()) {
var clone = image.Clone (i => i.Resize (width, height));
clone.Save (ms, format);
return ms.ToArray ();
}
icon_binary_mdpi = GetResourceContents ("mipmap-mdpi/appicon.png");
icon_binary_hdpi = GetResourceContents ("mipmap-hdpi/appicon.png");
icon_binary_xhdpi = GetResourceContents ("mipmap-xhdpi/appicon.png");
icon_binary_xxhdpi = GetResourceContents ("mipmap-xxhdpi/appicon.png");
icon_binary_xxxhdpi = GetResourceContents ("mipmap-xxxhdpi/appicon.png");
}

static XamarinAndroidCommonProject ()
static byte[] GetResourceContents (string resourceName)
{
var stream = typeof(XamarinAndroidCommonProject).Assembly.GetManifestResourceStream ("Xamarin.ProjectTools.Resources.Base.Icon.png");
icon_binary_mdpi = new byte [stream.Length];
stream.Read (icon_binary_mdpi, 0, (int) stream.Length);

stream.Position = 0;
using (var icon = Image.Load (stream, out var format)) {
icon_binary_hdpi = ScaleIcon (icon, format, 72, 72);
icon_binary_xhdpi = ScaleIcon (icon, format, 96, 96);
icon_binary_xxhdpi = ScaleIcon (icon, format, 144, 144);
icon_binary_xxxhdpi = ScaleIcon (icon, format, 192, 192);
var assembly = typeof (XamarinAndroidCommonProject).Assembly;
var stream = assembly.GetManifestResourceStream (resourceName) ??
assembly.GetManifestResourceStream (resourceName.Replace ('/', Path.DirectorySeparatorChar));
if (stream == null) {
return Array.Empty<byte>();
}
using (stream) {
var contents = new byte [stream.Length];
stream.Read (contents, 0, (int) stream.Length);
return contents;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
"Size": 2604
},
"assemblies/Java.Interop.dll": {
"Size": 69028
"Size": 68913
},
"assemblies/Mono.Android.dll": {
"Size": 264788
"Size": 265169
},
"assemblies/mscorlib.dll": {
"Size": 769017
"Size": 769018
},
"assemblies/System.Core.dll": {
"Size": 28199
Expand All @@ -20,10 +20,10 @@
"Size": 9180
},
"assemblies/UnnamedProject.dll": {
"Size": 2881
"Size": 2882
},
"classes.dex": {
"Size": 370480
"Size": 370828
},
"lib/arm64-v8a/libmono-btls-shared.so": {
"Size": 1613872
Expand All @@ -32,16 +32,16 @@
"Size": 750976
},
"lib/arm64-v8a/libmonodroid.so": {
"Size": 332880
"Size": 332936
},
"lib/arm64-v8a/libmonosgen-2.0.so": {
"Size": 4051864
"Size": 4039176
},
"lib/arm64-v8a/libxa-internal-api.so": {
"Size": 66184
},
"lib/arm64-v8a/libxamarin-app.so": {
"Size": 21112
"Size": 21256
},
"META-INF/ANDROIDD.RSA": {
"Size": 1213
Expand All @@ -53,19 +53,19 @@
"Size": 2098
},
"res/drawable-hdpi-v4/icon.png": {
"Size": 4762
"Size": 2178
},
"res/drawable-mdpi-v4/icon.png": {
"Size": 2200
"Size": 1490
},
"res/drawable-xhdpi-v4/icon.png": {
"Size": 7462
"Size": 3098
},
"res/drawable-xxhdpi-v4/icon.png": {
"Size": 13092
"Size": 4674
},
"res/drawable-xxxhdpi-v4/icon.png": {
"Size": 20118
"Size": 6832
},
"res/layout/main.xml": {
"Size": 544
Expand All @@ -74,5 +74,5 @@
"Size": 1724
}
},
"PackageSize": 4036308
"PackageSize": 4003540
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@
"Size": 7215
},
"assemblies/Java.Interop.dll": {
"Size": 70056
"Size": 69956
},
"assemblies/Mono.Android.dll": {
"Size": 571897
"Size": 572709
},
"assemblies/Mono.Security.dll": {
"Size": 68433
"Size": 68432
},
"assemblies/mscorlib.dll": {
"Size": 915406
"Size": 915408
},
"assemblies/System.Core.dll": {
"Size": 164047
"Size": 164046
},
"assemblies/System.dll": {
"Size": 388864
Expand All @@ -38,13 +38,13 @@
"Size": 186660
},
"assemblies/System.ServiceModel.Internals.dll": {
"Size": 26593
"Size": 26594
},
"assemblies/System.Xml.dll": {
"Size": 395656
},
"assemblies/UnnamedProject.dll": {
"Size": 116897
"Size": 116899
},
"assemblies/Xamarin.AndroidX.Activity.dll": {
"Size": 7697
Expand All @@ -65,7 +65,7 @@
"Size": 131930
},
"assemblies/Xamarin.AndroidX.DrawerLayout.dll": {
"Size": 15425
"Size": 15426
},
"assemblies/Xamarin.AndroidX.Fragment.dll": {
"Size": 43135
Expand All @@ -77,7 +77,7 @@
"Size": 7062
},
"assemblies/Xamarin.AndroidX.Lifecycle.LiveData.Core.dll": {
"Size": 7194
"Size": 7193
},
"assemblies/Xamarin.AndroidX.Lifecycle.ViewModel.dll": {
"Size": 4873
Expand All @@ -92,7 +92,7 @@
"Size": 6268
},
"assemblies/Xamarin.AndroidX.SwipeRefreshLayout.dll": {
"Size": 11272
"Size": 11271
},
"assemblies/Xamarin.AndroidX.ViewPager.dll": {
"Size": 19424
Expand All @@ -113,7 +113,7 @@
"Size": 43497
},
"classes.dex": {
"Size": 3482568
"Size": 3482812
},
"lib/arm64-v8a/libmono-btls-shared.so": {
"Size": 1613872
Expand All @@ -122,16 +122,16 @@
"Size": 750976
},
"lib/arm64-v8a/libmonodroid.so": {
"Size": 332880
"Size": 332936
},
"lib/arm64-v8a/libmonosgen-2.0.so": {
"Size": 4051864
"Size": 4039176
},
"lib/arm64-v8a/libxa-internal-api.so": {
"Size": 66184
},
"lib/arm64-v8a/libxamarin-app.so": {
"Size": 106160
"Size": 107024
},
"META-INF/android.support.design_material.version": {
"Size": 12
Expand Down Expand Up @@ -698,7 +698,7 @@
"Size": 470
},
"res/drawable-hdpi-v4/icon.png": {
"Size": 4762
"Size": 2178
},
"res/drawable-hdpi-v4/notification_bg_low_normal.9.png": {
"Size": 212
Expand Down Expand Up @@ -908,7 +908,7 @@
"Size": 309
},
"res/drawable-mdpi-v4/icon.png": {
"Size": 2200
"Size": 1490
},
"res/drawable-mdpi-v4/notification_bg_low_normal.9.png": {
"Size": 215
Expand Down Expand Up @@ -1136,7 +1136,7 @@
"Size": 593
},
"res/drawable-xhdpi-v4/icon.png": {
"Size": 7462
"Size": 3098
},
"res/drawable-xhdpi-v4/notification_bg_low_normal.9.png": {
"Size": 221
Expand Down Expand Up @@ -1301,7 +1301,7 @@
"Size": 868
},
"res/drawable-xxhdpi-v4/icon.png": {
"Size": 13092
"Size": 4674
},
"res/drawable-xxxhdpi-v4/abc_btn_check_to_on_mtrl_000.png": {
"Size": 275
Expand Down Expand Up @@ -1388,7 +1388,7 @@
"Size": 1155
},
"res/drawable-xxxhdpi-v4/icon.png": {
"Size": 20118
"Size": 6832
},
"res/drawable/abc_btn_borderless_material.xml": {
"Size": 588
Expand Down Expand Up @@ -1883,5 +1883,5 @@
"Size": 341040
}
},
"PackageSize": 9549982
"PackageSize": 9521310
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
<Compile Remove="Resources\**\*.cs" />
<Compile Include="..\..\..\..\bin\Build$(Configuration)\XABuildConfig.cs" />
<EmbeddedResource Include="Resources\**\*" />
<EmbeddedResource Include="..\..\..\Microsoft.Android.Templates\android\Resources\**\appicon.png">
<LogicalName>%(RecursiveDir)appicon.png</LogicalName>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<Content Include="..\..\..\..\.nuget\NuGet.exe">
Expand All @@ -25,8 +28,7 @@
</Content>
</ItemGroup>
<ItemGroup>
<PackageReference Include="SixLabors.ImageSharp" Version="1.0.0" />
<PackageReference Include="Microsoft.Win32.Registry" Version="4.7.0" />
<PackageReference Include="Microsoft.Win32.Registry" />
<ProjectReference Include="..\..\..\..\external\xamarin-android-tools\src\Xamarin.Android.Tools.AndroidSdk\Xamarin.Android.Tools.AndroidSdk.csproj">
<Project>{E34BCFA0-CAA4-412C-AA1C-75DB8D67D157}</Project>
<Name>Xamarin.Android.Tools.AndroidSdk</Name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

<ItemGroup>
<PackageReference Include="ILRepack" Version="2.0.18" />
<PackageReference Include="Irony" Version="1.1.0" />
<PackageReference Include="Irony" />
<PackageReference Include="Newtonsoft.Json" Version="$(NewtonsoftJsonPackageVersion)" />
<PackageReference Include="NuGet.Common" Version="$(NuGetApiPackageVersion)" />
<PackageReference Include="NuGet.Configuration" Version="$(NuGetApiPackageVersion)" />
Expand All @@ -51,8 +51,8 @@
<PackageReference Include="NuGet.ProjectModel" Version="$(NuGetApiPackageVersion)" />
<PackageReference Include="NuGet.Protocol" Version="$(NuGetApiPackageVersion)" />
<PackageReference Include="NuGet.Versioning" Version="$(NuGetApiPackageVersion)" />
<PackageReference Include="System.CodeDom" Version="4.7.0" />
<PackageReference Include="System.Reflection.Metadata" Version="1.8.0" />
<PackageReference Include="System.CodeDom" />
<PackageReference Include="System.Reflection.Metadata" Version="6.0.1" />
<PackageReference Include="System.Runtime" Version="4.3.1" />
<PackageReference Include="System.Runtime.InteropServices" Version="4.3.0" />
<PackageReference Include="K4os.Hash.xxHash" Version="1.0.6" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<Reference Include="Xamarin.Android.Cecil">
<HintPath>$(MicrosoftAndroidSdkOutDir)Xamarin.Android.Cecil.dll</HintPath>
</Reference>
<PackageReference Include="Irony" Version="1.1.0" />
<PackageReference Include="System.CodeDom" Version="4.7.0" />
<PackageReference Include="Irony" />
<PackageReference Include="System.CodeDom" />
</ItemGroup>
</Project>
Loading

0 comments on commit 38ba04f

Please sign in to comment.