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:
  [Xamarin.Android.Build.Tasks] use %(TrimmerRootAssembly.RootMode) All (xamarin#7651)
  Bump to dotnet/installer@47a747f 8.0.100-alpha.1.22616.7 (xamarin#7647)
  Bump to dotnet/installer@167a4ed 8.0.100-alpha.1.22611.1 (xamarin#7630)
  Bump to xamarin/java.interop@f8d77fa (xamarin#7638)
  [ci] Fix Designer test paths (xamarin#7635)
  [Xamarin.Android.Build.Tasks] perf improvements for LlvmIrGenerator (xamarin#7626)
  [Xamarin.Android.Build.Tasks] AutoImport `*.webp` files (xamarin#7601)
  Localized file check-in by OneLocBuild Task (xamarin#7632)
  Bump $(ProductVersion) to 13.2.99
  Bump to xamarin/monodroid@c0c933b7 (xamarin#7633)
  [Xamarin.Android.Build.Tasks] Fix aapt_rules.txt corruption (xamarin#7587)
  [Xamarin.Android.Build.Tasks] Add XA1031 error (xamarin#7448)
  Bump to xamarin/java.interop@149d70f (xamarin#7625)
  [CODEOWNERS] More updates to CODEOWNERS (xamarin#7628)
  [Xamarin.Android.Build.Tasks] avoid `File.Exists()` check (xamarin#7621)
  • Loading branch information
grendello committed Jan 3, 2023
2 parents a62ef71 + ec712da commit 4ea0641
Show file tree
Hide file tree
Showing 49 changed files with 1,161 additions and 612 deletions.
2 changes: 1 addition & 1 deletion .external
@@ -1,2 +1,2 @@
xamarin/monodroid:main@8c54ea6df5dfdbe4a0db61445e5b7f2faf9810dd
xamarin/monodroid:main@c0c933b7a5286c0babecb165c0676c32f5e44092
mono/mono:2020-02@6dd9def57ce969ca04a0ecd9ef72c0a8f069112d
12 changes: 12 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Expand Up @@ -32,6 +32,18 @@
/src/r8 @jonathanpeppers @jonpryor
/src/Xamarin.Android.Build.Tasks @dellis1972 @jonathanpeppers
/src/Xamarin.Android.Build.Tasks/Linker @jonpryor
/src/Xamarin.Android.Build.Tasks/Utilities/LlvmIrGenerator @grendello
/src/Xamarin.Android.Build.Tasks/Utilities/TypeMap* @grendello
/src/Xamarin.Android.Build.Tasks/Utilities/MarshalMethods* @grendello
/src/Xamarin.Android.Build.Tasks/Utilities/ApplicationConfig* @grendello
/src/Xamarin.Android.Build.Tasks/Utilities/*AssemblyStore* @grendello
/src/Xamarin.Android.Build.Tasks/Utilities/AssemblyCompression* @grendello
/src/Xamarin.Android.Build.Tasks/Utilities/CompressedAssembl* @grendello
/src/Xamarin.Android.Build.Tasks/Utilities/ELFHelper* @grendello
/src/Xamarin.Android.Build.Tasks/Utilities/EnvironmentFilesParser* @grendello
/src/Xamarin.Android.Build.Tasks/Utilities/JniRemappingAssemblyGenerator* @grendello
/src/Xamarin.Android.Build.Tasks/Utilities/NativeTypeMappingData* @grendello
/src/Xamarin.Android.Build.Tasks/Utilities/NdkTools @grendello
/src/Xamarin.Android.NamingCustomAttributes @jonpryor
/src/Xamarin.Android.Tools.Aidl @jonpryor
/src/monodroid/ @jonpryor @grendello
Expand Down
2 changes: 1 addition & 1 deletion Directory.Build.props
Expand Up @@ -28,7 +28,7 @@
</PropertyGroup>

<PropertyGroup>
<ProductVersion>13.1.99</ProductVersion>
<ProductVersion>13.2.99</ProductVersion>
<!-- NuGet package version numbers. See Documentation/guides/OneDotNet.md.
Rules:
* Major/Minor match Android stable API level, such as 30.0 for API 30.
Expand Down
3 changes: 3 additions & 0 deletions Documentation/guides/messages/README.md
Expand Up @@ -130,6 +130,9 @@ or 'Help->Report a Problem' in Visual Studio for Mac.
+ [XA1027](xa1027.md): The 'EnableProguard' MSBuild property is set to 'true' and the 'AndroidLinkTool' MSBuild property is empty, so 'AndroidLinkTool' will default to 'proguard'.
+ [XA1028](xa1028.md): The 'AndroidEnableProguard' MSBuild property is set to 'true' and the 'AndroidLinkTool' MSBuild property is empty, so 'AndroidLinkTool' will default to 'proguard'.
+ [XA1029](xa1029.md): The 'AotAssemblies' MSBuild property is deprecated. Edit the project file in a text editor to remove this property, and use the 'RunAOTCompilation' MSBuild property instead.
+ [XA1031](xa1031.md): The 'AndroidHttpClientHandlerType' has an invalid value.
+ [XA1032](xa1032.md):Failed to resolve '{0}' from '{1}'. Please check your `AndroidHttpClientHandlerType` setting.
+ [XA1033](xa1033.md): Could not resolve '{0}'. Please check your `AndroidHttpClientHandlerType` setting.

## XA2xxx: Linker

Expand Down
20 changes: 20 additions & 0 deletions Documentation/guides/messages/xa1031.md
@@ -0,0 +1,20 @@
---
title: Xamarin.Android error XA1031
description: XA1031 error code
ms.date: 10/10/2022
---
# Xamarin.Android error XA1031

## Example messages

```
The 'AndroidHttpClientHandlerType' property value 'Foo.Bar.HttpHander, MyApp' must derive from 'System.Net.Http.HttpMessageHandler'.
Please change the value to an assembly-qualifed type name which inherits from '{1}' or remove the property completely.
```

## Solution

Edit your csproj directly and change the 'AndroidHttpClientHandlerType' to
a valid value.

Valid values can be found at `~/android/deploy-test/building-apps/build-properties.md#AndroidHttpClientHandlerType`.
19 changes: 19 additions & 0 deletions Documentation/guides/messages/xa1032.md
@@ -0,0 +1,19 @@
---
title: Xamarin.Android error XA1032
description: XA1032 error code
ms.date: 10/10/2022
---
# Xamarin.Android error XA1032

## Example messages

```
Failed to resolve '{0}' from '{1}'. Please check your `AndroidHttpClientHandlerType` setting.
```

## Solution

Edit your csproj directly and change the 'AndroidHttpClientHandlerType' to
a valid value.

Valid values can be found at `~/android/deploy-test/building-apps/build-properties.md#AndroidHttpClientHandlerType`.
19 changes: 19 additions & 0 deletions Documentation/guides/messages/xa1033.md
@@ -0,0 +1,19 @@
---
title: Xamarin.Android error XA1033
description: XA1033 error code
ms.date: 10/10/2022
---
# Xamarin.Android error XA1033

## Example messages

```
Could not resolve '{0}'. Please check your `AndroidHttpClientHandlerType` setting.
```

## Solution

Edit your csproj directly and change the 'AndroidHttpClientHandlerType' to
a valid value.

Valid values can be found at `~/android/deploy-test/building-apps/build-properties.md#AndroidHttpClientHandlerType`.
16 changes: 8 additions & 8 deletions build-tools/automation/azure-pipelines.yaml
Expand Up @@ -1232,7 +1232,7 @@ stages:
displayName: provision designer dependencies
inputs:
github_token: $(GitHub.Token)
provisioning_script: $(System.DefaultWorkingDirectory)/UITools/Designer/bot-provisioning/dependencies.csx
provisioning_script: $(System.DefaultWorkingDirectory)/UITools/src/bot-provisioning/dependencies.csx
provisioning_extra_args: -remove Xamarin.Android -vv DEVDIV_PKGS_NUGET_TOKEN=$(DevDiv.NuGet.Token) SECTOOLS_PKGS_NUGET_TOKEN=$(SecTools.NuGet.Token)
env:
PROVISIONATOR_CHANNEL: ${{ parameters.provisionatorChannel }}
Expand All @@ -1245,17 +1245,17 @@ stages:

- template: designer/android-designer-build-mac.yaml@yaml-templates
parameters:
designerSourcePath: $(System.DefaultWorkingDirectory)/UITools/Designer
designerSourcePath: $(System.DefaultWorkingDirectory)/UITools/src

- template: designer/android-designer-tests.yaml@yaml-templates
parameters:
designerSourcePath: $(System.DefaultWorkingDirectory)/UITools/Designer
designerSourcePath: $(System.DefaultWorkingDirectory)/UITools/src
runAddinTests: false

- task: CopyFiles@2
displayName: 'Copy binlogs'
inputs:
sourceFolder: $(System.DefaultWorkingDirectory)/UITools/Designer/Xamarin.Designer.Android
sourceFolder: $(System.DefaultWorkingDirectory)/UITools/src/Xamarin.Designer.Android
contents: '**/*.binlog'
targetFolder: $(Build.ArtifactStagingDirectory)/designer-binlogs
overWrite: true
Expand Down Expand Up @@ -1313,7 +1313,7 @@ stages:
displayName: provision designer dependencies
inputs:
github_token: $(GitHub.Token)
provisioning_script: $(System.DefaultWorkingDirectory)\UITools\Designer\bot-provisioning\dependencies.csx
provisioning_script: $(System.DefaultWorkingDirectory)\UITools\src\bot-provisioning\dependencies.csx
provisioning_extra_args: -vv DEVDIV_PKGS_NUGET_TOKEN=$(DevDiv.NuGet.Token) SECTOOLS_PKGS_NUGET_TOKEN=$(SecTools.NuGet.Token)
env:
PROVISIONATOR_CHANNEL: ${{ parameters.provisionatorChannel }}
Expand All @@ -1327,7 +1327,7 @@ stages:
- task: VSBuild@1
displayName: Restore Xamarin.AndroidDesigner
inputs:
solution: $(System.DefaultWorkingDirectory)\UITools\Designer\Xamarin.Designer.Android\Xamarin.AndroidDesigner.sln
solution: $(System.DefaultWorkingDirectory)\UITools\src\Xamarin.Designer.Android\Xamarin.AndroidDesigner.sln
vsVersion: 17.0
msbuildArgs: >-
/t:Restore /p:RestoreDisableParallel=true
Expand All @@ -1339,15 +1339,15 @@ stages:
- task: VSBuild@1
displayName: Build Xamarin.AndroidDesigner
inputs:
solution: $(System.DefaultWorkingDirectory)\UITools\Designer\Xamarin.Designer.Android\Xamarin.AndroidDesigner.sln
solution: $(System.DefaultWorkingDirectory)\UITools\src\Xamarin.Designer.Android\Xamarin.AndroidDesigner.sln
vsVersion: 17.0
msbuildArgs: /t:Build
platform: Any CPU
configuration: DebugWin32

- template: yaml-templates/run-designer-tests.yml
parameters:
designerSourcePath: $(System.DefaultWorkingDirectory)\UITools\Designer
designerSourcePath: $(System.DefaultWorkingDirectory)\UITools\src

- stage: bcl_tests
displayName: BCL Emulator Tests
Expand Down
16 changes: 8 additions & 8 deletions eng/Version.Details.xml
@@ -1,20 +1,20 @@
<Dependencies>
<ProductDependencies>
<Dependency Name="Microsoft.Dotnet.Sdk.Internal" Version="8.0.100-alpha.1.22602.5">
<Dependency Name="Microsoft.Dotnet.Sdk.Internal" Version="8.0.100-alpha.1.22616.7">
<Uri>https://github.com/dotnet/installer</Uri>
<Sha>243326d8d19c03876ba6a037fcddfb7ebe8b0b4d</Sha>
<Sha>47a747f2265086a0b154d476df6fd633595ece7d</Sha>
</Dependency>
<Dependency Name="Microsoft.NET.ILLink.Tasks" Version="7.0.100-1.22564.1" CoherentParentDependency="Microsoft.Dotnet.Sdk.Internal">
<Dependency Name="Microsoft.NET.ILLink.Tasks" Version="8.0.100-1.22612.2" CoherentParentDependency="Microsoft.Dotnet.Sdk.Internal">
<Uri>https://github.com/dotnet/linker</Uri>
<Sha>13b8d6d68a07a47e52e13705313bc32d5540edf5</Sha>
<Sha>2db841fc5f6bc7592b66ffe3bd0e1c888d022f93</Sha>
</Dependency>
<Dependency Name="Microsoft.NETCore.App.Ref" Version="8.0.0-alpha.1.22559.2" CoherentParentDependency="Microsoft.Dotnet.Sdk.Internal">
<Dependency Name="Microsoft.NETCore.App.Ref" Version="8.0.0-alpha.1.22605.1" CoherentParentDependency="Microsoft.Dotnet.Sdk.Internal">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>dd7fdb723d91c2c6cb7efc3d95f9d95ee86d48c8</Sha>
<Sha>1a37caf773a3b857ccff49a31be3333d4fdc491f</Sha>
</Dependency>
<Dependency Name="Microsoft.NET.Workload.Emscripten.net7.Manifest-8.0.100" Version="8.0.0-alpha.1.22554.1" CoherentParentDependency="Microsoft.NETCore.App.Ref">
<Dependency Name="Microsoft.NET.Workload.Emscripten.net7.Manifest-8.0.100" Version="8.0.0-alpha.1.22558.2" CoherentParentDependency="Microsoft.NETCore.App.Ref">
<Uri>https://github.com/dotnet/emsdk</Uri>
<Sha>b6656f5b78cd25f984355f973e65da3d844ac6d1</Sha>
<Sha>96351a7e97093d88eb097b4a489f949ebf8a901b</Sha>
</Dependency>
</ProductDependencies>
<ToolsetDependencies>
Expand Down
8 changes: 4 additions & 4 deletions eng/Versions.props
@@ -1,12 +1,12 @@
<Project>
<!--Package versions-->
<PropertyGroup>
<MicrosoftDotnetSdkInternalPackageVersion>8.0.100-alpha.1.22602.5</MicrosoftDotnetSdkInternalPackageVersion>
<MicrosoftNETILLinkTasksPackageVersion>7.0.100-1.22564.1</MicrosoftNETILLinkTasksPackageVersion>
<MicrosoftNETCoreAppRefPackageVersion>8.0.0-alpha.1.22559.2</MicrosoftNETCoreAppRefPackageVersion>
<MicrosoftDotnetSdkInternalPackageVersion>8.0.100-alpha.1.22616.7</MicrosoftDotnetSdkInternalPackageVersion>
<MicrosoftNETILLinkTasksPackageVersion>8.0.100-1.22612.2</MicrosoftNETILLinkTasksPackageVersion>
<MicrosoftNETCoreAppRefPackageVersion>8.0.0-alpha.1.22605.1</MicrosoftNETCoreAppRefPackageVersion>
<MicrosoftDotNetApiCompatPackageVersion>7.0.0-beta.22103.1</MicrosoftDotNetApiCompatPackageVersion>
<MicrosoftDotNetBuildTasksFeedPackageVersion>7.0.0-beta.22103.1</MicrosoftDotNetBuildTasksFeedPackageVersion>
<MicrosoftNETWorkloadEmscriptennet7Manifest80100Version>8.0.0-alpha.1.22554.1</MicrosoftNETWorkloadEmscriptennet7Manifest80100Version>
<MicrosoftNETWorkloadEmscriptennet7Manifest80100Version>8.0.0-alpha.1.22558.2</MicrosoftNETWorkloadEmscriptennet7Manifest80100Version>
<MicrosoftNETWorkloadEmscriptenPackageVersion>$(MicrosoftNETWorkloadEmscriptennet7Manifest80100Version)</MicrosoftNETWorkloadEmscriptenPackageVersion>
<MicrosoftTemplateEngineTasksPackageVersion>7.0.100-rc.1.22410.7</MicrosoftTemplateEngineTasksPackageVersion>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion external/Java.Interop
Submodule Java.Interop updated 20 files
+1 −0 Directory.Build.targets
+5 −5 src/Java.Interop.Tools.Cecil/Java.Interop.Tools.Cecil/DirectoryAssemblyResolver.cs
+2 −0 src/Java.Interop.Tools.Generator/Enumification/ConstantEntry.cs
+113 −28 ....Interop.Tools.JavaCallableWrappers/Java.Interop.Tools.JavaCallableWrappers/JavaCallableWrapperGenerator.cs
+32 −10 src/Java.Interop.Tools.TypeNameMappings/Java.Interop.Tools.TypeNameMappings/JavaNativeTypeManager.cs
+44 −0 src/Xamarin.SourceWriter/Models/EnumMemberWriter.cs
+74 −0 src/Xamarin.SourceWriter/Models/EnumWriter.cs
+1 −4 tests/Java.Interop.Dynamic-Tests/Java.Interop.Dynamic-Tests.csproj
+163 −4 tests/generator-Tests/Unit-Tests/CodeGeneratorTests.cs
+83 −13 tests/generator-Tests/Unit-Tests/EnumGeneratorTests.cs
+7 −7 tests/generator-Tests/Unit-Tests/EnumMappingsTests.cs
+27 −0 tests/generator-Tests/Unit-Tests/XmlApiImporterTests.cs
+51 −20 tools/generator/Java.Interop.Tools.Generator.CodeGeneration/EnumGenerator.cs
+12 −0 tools/generator/Java.Interop.Tools.Generator.Importers/XmlApiImporter.cs
+27 −0 tools/generator/Java.Interop.Tools.Generator.ObjectModel/Property.cs
+2 −6 tools/generator/Java.Interop.Tools.Generator.Transformation/EnumMappings.cs
+13 −0 tools/generator/SourceWriters/Attributes/FlagsAttr.cs
+23 −0 tools/generator/SourceWriters/Attributes/IntDefinitionAttr.cs
+12 −5 tools/generator/SourceWriters/BoundProperty.cs
+5 −3 tools/generator/SourceWriters/Extensions/SourceWriterExtensions.cs
1 change: 1 addition & 0 deletions samples/HelloWorld/HelloWorld/HelloWorld.csproj
Expand Up @@ -67,6 +67,7 @@
<AndroidResource Include="Resources\layout\Main.axml" />
<AndroidResource Include="Resources\values\Strings.xml" />
<AndroidResource Include="Resources\values\Attr.xml" />
<AndroidResource Include="Resources\drawable\MyImage.webp" />
<AndroidResource Include="Resources\mipmap-hdpi\Icon.png" />
<AndroidResource Include="Resources\mipmap-mdpi\Icon.png" />
<AndroidResource Include="Resources\mipmap-xhdpi\Icon.png" />
Expand Down
Binary file not shown.
6 changes: 6 additions & 0 deletions samples/HelloWorld/HelloWorld/Resources/layout/Main.axml
Expand Up @@ -7,4 +7,10 @@
android:layout_height="wrap_content"
android:src="@drawable/Case_Check"
/>
<ImageView
android:id="@+id/webp_image_view"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/MyImage"
/>
</LinearLayout>
Expand Up @@ -244,6 +244,7 @@ Copyright (C) 2011-2012 Xamarin. All rights reserved.
<ItemGroup Condition=" '$(_Aapt2ProguardRules)' != '' And Exists('$(_Aapt2ProguardRules)') ">
<ProguardConfiguration Include="$(_Aapt2ProguardRules)" />
<FileWrites Include="$(_Aapt2ProguardRules)" />
<FileWrites Include="$(IntermediateOutputPath)android\*\aapt_rules.txt" />
</ItemGroup>
</Target>
</Project>
Expand Up @@ -30,6 +30,7 @@ https://github.com/dotnet/designs/blob/4703666296f5e59964961464c25807c727282cae/
<AndroidResource Include="$(MonoAndroidResourcePrefix)\*\*.png" />
<AndroidResource Include="$(MonoAndroidResourcePrefix)\*\*.jpg" />
<AndroidResource Include="$(MonoAndroidResourcePrefix)\*\*.gif" />
<AndroidResource Include="$(MonoAndroidResourcePrefix)\*\*.webp" />
<AndroidResource Include="$(MonoAndroidResourcePrefix)\font\*.ttf" />
<AndroidResource Include="$(MonoAndroidResourcePrefix)\font\*.otf" />
<AndroidResource Include="$(MonoAndroidResourcePrefix)\font\*.ttc" />
Expand Down
Expand Up @@ -135,10 +135,11 @@ projects, these properties are set in Xamarin.Android.Legacy.targets.
_IncludeLayoutBindingSources;
AddLibraryJarsToBind;
$(CompileDependsOn);
_CheckAndroidHttpClientHandlerType;
</CompileDependsOn>
<CoreCompileDependsOn>
UpdateGeneratedFiles;
$(CoreCompileDependsOn)
$(CoreCompileDependsOn);
</CoreCompileDependsOn>
<DeferredBuildDependsOn>
$(DeferredBuildDependsOn);
Expand Down
Expand Up @@ -95,6 +95,7 @@
<HttpActivityPropagationSupport Condition="'$(HttpActivityPropagationSupport)' == ''">false</HttpActivityPropagationSupport>
<InvariantGlobalization Condition="'$(InvariantGlobalization)' == ''">false</InvariantGlobalization>
<StartupHookSupport Condition="'$(StartupHookSupport)' == ''">false</StartupHookSupport>
<UseNativeHttpHandler Condition=" $(AndroidHttpClientHandlerType.Contains ('System.Net.Http.SocketsHttpHandler')) And '$(UseNativeHttpHandler)' == '' ">false</UseNativeHttpHandler>
<UseNativeHttpHandler Condition="'$(UseNativeHttpHandler)' == ''">true</UseNativeHttpHandler>
<_AggressiveAttributeTrimming Condition="'$(_AggressiveAttributeTrimming)' == ''">true</_AggressiveAttributeTrimming>
<NullabilityInfoContextSupport Condition="'$(NullabilityInfoContextSupport)' == ''">false</NullabilityInfoContextSupport>
Expand Down
Expand Up @@ -97,6 +97,12 @@ This file contains the .NET 5-specific targets to customize ILLink
</ItemGroup>
</Target>

<Target Name="_FixRootAssembly" AfterTargets="PrepareForILLink">
<ItemGroup>
<TrimmerRootAssembly Update="@(TrimmerRootAssembly)" Condition=" '%(RootMode)' == 'EntryPoint' " RootMode="All" />
</ItemGroup>
</Target>

<Target Name="_LinkAssemblies"
DependsOnTargets="_ResolveAssemblies;_CreatePackageWorkspace;$(_BeforeLinkAssemblies);_GenerateJniMarshalMethods;_LinkAssembliesNoShrink"
/>
Expand Down
@@ -0,0 +1,15 @@
// Some enums we import from Mono.Android, like Android.Content.PM.LaunchMode, contain this
// attribute which does not exist in netstandard2.0, thus we'll include our own private copy
// that gets removed at compile time via [Conditional ("NEVER")].

#if !NET
namespace System.Runtime.Versioning
{
[System.Diagnostics.Conditional ("NEVER")]
[AttributeUsage (AttributeTargets.Assembly | AttributeTargets.Class | AttributeTargets.Constructor | AttributeTargets.Enum | AttributeTargets.Event | AttributeTargets.Field | AttributeTargets.Interface | AttributeTargets.Method | AttributeTargets.Module | AttributeTargets.Property | AttributeTargets.Struct, AllowMultiple = true, Inherited = false)]
sealed class SupportedOSPlatformAttribute : Attribute
{
public SupportedOSPlatformAttribute (string platformName) { }
}
}
#endif

0 comments on commit 4ea0641

Please sign in to comment.