Skip to content

Commit

Permalink
Merge branch 'main' into bump-ndk
Browse files Browse the repository at this point in the history
* main:
  Bump to dotnet/installer@f8bab721ae 8.0.100-rc.1.23373.1 (dotnet#8202)
  [Mono.Android] Fix Context.RegisterReceiver() enumification (dotnet#7735)
  • Loading branch information
grendello committed Jul 25, 2023
2 parents e7b6e65 + e3dc2fe commit f658aed
Show file tree
Hide file tree
Showing 10 changed files with 46 additions and 19 deletions.
10 changes: 6 additions & 4 deletions build-tools/automation/yaml-templates/run-dotnet-preview.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,13 @@ parameters:
steps:
- powershell: |
if ([Environment]::OSVersion.Platform -eq "Unix") {
$env:DOTNET_ROOT = "${{ parameters.xaSourcePath }}/bin/${{ parameters.configuration }}/dotnet"
$dotnetPath = "$env:DOTNET_ROOT/dotnet"
$DOTNET_ROOT = "${{ parameters.xaSourcePath }}/bin/${{ parameters.configuration }}/dotnet"
$env:PATH = "${DOTNET_ROOT}:$env:PATH"
$dotnetPath = "${DOTNET_ROOT}/dotnet"
} else {
$env:DOTNET_ROOT = "${{ parameters.xaSourcePath }}\bin\${{ parameters.configuration }}\dotnet"
$dotnetPath = "$env:DOTNET_ROOT\dotnet.exe"
$DOTNET_ROOT = "${{ parameters.xaSourcePath }}\bin\${{ parameters.configuration }}\dotnet"
$env:PATH = "${DOTNET_ROOT};$env:PATH"
$dotnetPath = "${DOTNET_ROOT}\dotnet.exe"
}
& $dotnetPath ${{ parameters.command }} ${{ parameters.project }} ${{ parameters.arguments }}
if ([System.Convert]::ToBoolean("${{ parameters.useExitCodeForErrors }}") -and $LASTEXITCODE -ne 0) {
Expand Down
2 changes: 1 addition & 1 deletion build-tools/scripts/msbuild.mk
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ endef

# $(call DOTNET_BINLOG,name,build=$(DOTNET_VERB),dotnet=$(DOTNET_TOOL))
define DOTNET_BINLOG
$(if $(3),,DOTNET_ROOT='$(DOTNET_ROOT)') $(if $(3),$(3),$(DOTNET_TOOL)) $(if $(2),$(2),$(DOTNET_VERB)) -c $(CONFIGURATION) -v:n $(MSBUILD_ARGS) \
$(if $(3),,PATH="$(DOTNET_ROOT):$(PATH)") $(if $(3),$(3),$(DOTNET_TOOL)) $(if $(2),$(2),$(DOTNET_VERB)) -c $(CONFIGURATION) -v:n $(MSBUILD_ARGS) \
-bl:"$(dir $(realpath $(firstword $(MAKEFILE_LIST))))/bin/Build$(CONFIGURATION)/msbuild-`date +%Y%m%dT%H%M%S`-$(1).binlog"
endef

Expand Down
16 changes: 8 additions & 8 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
<Dependencies>
<ProductDependencies>
<Dependency Name="Microsoft.Dotnet.Sdk.Internal" Version="8.0.100-preview.7.23364.32">
<Dependency Name="Microsoft.Dotnet.Sdk.Internal" Version="8.0.100-rc.1.23373.1">
<Uri>https://github.com/dotnet/installer</Uri>
<Sha>ca467d68c8f678a671984a46996d3fc37fe7f3de</Sha>
<Sha>f8bab721aec4cce610504674cd08d68048250f19</Sha>
</Dependency>
<Dependency Name="Microsoft.NET.ILLink.Tasks" Version="8.0.0-preview.7.23364.3" CoherentParentDependency="Microsoft.Dotnet.Sdk.Internal">
<Dependency Name="Microsoft.NET.ILLink.Tasks" Version="8.0.0-rc.1.23371.3" CoherentParentDependency="Microsoft.Dotnet.Sdk.Internal">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>ae99bb2e7a0a5db7c2bff129322965fd3c6e820d</Sha>
<Sha>f016dc4b7cfc306d2d5e29c49e5ccd2d2916d466</Sha>
</Dependency>
<Dependency Name="Microsoft.NETCore.App.Ref" Version="8.0.0-preview.7.23364.3" CoherentParentDependency="Microsoft.Dotnet.Sdk.Internal">
<Dependency Name="Microsoft.NETCore.App.Ref" Version="8.0.0-rc.1.23371.3" CoherentParentDependency="Microsoft.Dotnet.Sdk.Internal">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>ae99bb2e7a0a5db7c2bff129322965fd3c6e820d</Sha>
<Sha>f016dc4b7cfc306d2d5e29c49e5ccd2d2916d466</Sha>
</Dependency>
<Dependency Name="Microsoft.NET.Workload.Emscripten.Current.Manifest-8.0.100.Transport" Version="8.0.0-preview.7.23361.2" CoherentParentDependency="Microsoft.NETCore.App.Ref">
<Dependency Name="Microsoft.NET.Workload.Emscripten.Current.Manifest-8.0.100.Transport" Version="8.0.0-rc.1.23368.3" CoherentParentDependency="Microsoft.NETCore.App.Ref">
<Uri>https://github.com/dotnet/emsdk</Uri>
<Sha>afbff08914374ed6790324635b9346d1256680fc</Sha>
<Sha>1f68fcee45ca75a2cb780edaff1e695af4d4f787</Sha>
</Dependency>
<Dependency Name="Microsoft.DotNet.Cecil" Version="0.11.4-alpha.23360.2" CoherentParentDependency="Microsoft.NET.ILLink.Tasks">
<Uri>https://github.com/dotnet/cecil</Uri>
Expand Down
8 changes: 4 additions & 4 deletions eng/Versions.props
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<Project>
<!--Package versions-->
<PropertyGroup>
<MicrosoftDotnetSdkInternalPackageVersion>8.0.100-preview.7.23364.32</MicrosoftDotnetSdkInternalPackageVersion>
<MicrosoftNETILLinkTasksPackageVersion>8.0.0-preview.7.23364.3</MicrosoftNETILLinkTasksPackageVersion>
<MicrosoftNETCoreAppRefPackageVersion>8.0.0-preview.7.23364.3</MicrosoftNETCoreAppRefPackageVersion>
<MicrosoftDotnetSdkInternalPackageVersion>8.0.100-rc.1.23373.1</MicrosoftDotnetSdkInternalPackageVersion>
<MicrosoftNETILLinkTasksPackageVersion>8.0.0-rc.1.23371.3</MicrosoftNETILLinkTasksPackageVersion>
<MicrosoftNETCoreAppRefPackageVersion>8.0.0-rc.1.23371.3</MicrosoftNETCoreAppRefPackageVersion>
<MicrosoftDotNetApiCompatPackageVersion>7.0.0-beta.22103.1</MicrosoftDotNetApiCompatPackageVersion>
<MicrosoftDotNetBuildTasksFeedPackageVersion>7.0.0-beta.22103.1</MicrosoftDotNetBuildTasksFeedPackageVersion>
<MicrosoftNETWorkloadEmscriptenCurrentManifest80100TransportVersion>8.0.0-preview.7.23361.2</MicrosoftNETWorkloadEmscriptenCurrentManifest80100TransportVersion>
<MicrosoftNETWorkloadEmscriptenCurrentManifest80100TransportVersion>8.0.0-rc.1.23368.3</MicrosoftNETWorkloadEmscriptenCurrentManifest80100TransportVersion>
<MicrosoftNETWorkloadEmscriptenPackageVersion>$(MicrosoftNETWorkloadEmscriptenCurrentManifest80100TransportVersion)</MicrosoftNETWorkloadEmscriptenPackageVersion>
<MicrosoftTemplateEngineTasksPackageVersion>7.0.100-rc.1.22410.7</MicrosoftTemplateEngineTasksPackageVersion>
<MicrosoftDotNetCecilPackageVersion>0.11.4-alpha.23360.2</MicrosoftDotNetCecilPackageVersion>
Expand Down
10 changes: 10 additions & 0 deletions src/Mono.Android/Android.Content/Context.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System;
using Android.OS;
using Android.Runtime;

namespace Android.Content {
Expand All @@ -16,5 +17,14 @@ public void StartActivity (Type type)
[Obsolete ("This constant will be removed in the future version. Use Android.Content.ReceiverFlags enum directly instead of this field.")]
public const int ReceiverVisibleToInstantApps = 1;
#endif

#if ANDROID_34
// Add correctly enumified overloads
public Intent? RegisterReceiver (BroadcastReceiver? receiver, IntentFilter? filter, ReceiverFlags flags)
=> RegisterReceiver (receiver, filter, (ActivityFlags)flags);

public Intent? RegisterReceiver (BroadcastReceiver? receiver, IntentFilter? filter, string? broadcastPermission, Handler? scheduler, ReceiverFlags flags)
=> RegisterReceiver (receiver, filter, broadcastPermission, scheduler, (ActivityFlags)flags);
#endif
}
}
5 changes: 5 additions & 0 deletions src/Mono.Android/Mono.Android.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,12 @@
<PropertyGroup>
<DefineConstants Condition=" '$(AndroidApiLevel)' &gt; '$(AndroidLatestStableApiLevel)' ">$(DefineConstants);ANDROID_UNSTABLE</DefineConstants>
<OutputPath>$(_MonoAndroidNETDefaultOutDir)</OutputPath>

<!-- Allow PublicApiAnalyzers to be turned off -->
<RunAnalyzers Condition=" '$(DisableApiCompatibilityCheck)' == 'True' ">false</RunAnalyzers>

<!-- PublicApiAnalyzers warnings should be errors, but building in VS throws incorrect extra warnings -->
<WarningsAsErrors Condition=" '$(BuildingInsideVisualStudio)' != 'True' ">$(WarningsAsErrors);RS0016,RS0017</WarningsAsErrors>
</PropertyGroup>

<PropertyGroup Condition=" '$(IncludeAndroidJavadoc)' == 'True' ">
Expand Down
2 changes: 2 additions & 0 deletions src/Mono.Android/PublicAPI/API-34/PublicAPI.Unshipped.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8448,6 +8448,8 @@ Android.Content.Context.ObtainStyledAttributes(Android.Util.IAttributeSet? set,
Android.Content.Context.ObtainStyledAttributes(Android.Util.IAttributeSet? set, int[]! attrs, int defStyleAttr, int defStyleRes) -> Android.Content.Res.TypedArray!
Android.Content.Context.ObtainStyledAttributes(int resid, int[]! attrs) -> Android.Content.Res.TypedArray!
Android.Content.Context.ObtainStyledAttributes(int[]! attrs) -> Android.Content.Res.TypedArray!
Android.Content.Context.RegisterReceiver(Android.Content.BroadcastReceiver? receiver, Android.Content.IntentFilter? filter, Android.Content.ReceiverFlags flags) -> Android.Content.Intent?
Android.Content.Context.RegisterReceiver(Android.Content.BroadcastReceiver? receiver, Android.Content.IntentFilter? filter, string? broadcastPermission, Android.OS.Handler? scheduler, Android.Content.ReceiverFlags flags) -> Android.Content.Intent?
Android.Content.Context.StartActivity(System.Type! type) -> void
Android.Content.ContextParams
Android.Content.ContextParams.AttributionTag.get -> string?
Expand Down
8 changes: 8 additions & 0 deletions src/Mono.Android/metadata
Original file line number Diff line number Diff line change
Expand Up @@ -1809,6 +1809,14 @@

<!-- 2 conflicting copies of ErrorEventArgs -->
<attr api-since="34" path="/api/package[@name='android.speech']/interface[@name='ModelDownloadListener']/method[@name='onError' and count(parameter)=1 and parameter[1][@type='int']]" name="argsType">ModelDownloadErrorEventArgs</attr>

<!-- Fix some incorrectly enumified methods -->
<attr api-since="34" path="/api/package[@name='android.content']/class[@name='Context']/method[@name='registerReceiver' and count(parameter)=3 and parameter[1][@type='android.content.BroadcastReceiver'] and parameter[2][@type='android.content.IntentFilter'] and parameter[3][@type='int']]" name="deprecated">This method has an incorrect enumeration type. Use the overload that takes ReceiverFlags instead.</attr>
<attr api-since="34" path="/api/package[@name='android.content']/class[@name='Context']/method[@name='registerReceiver' and count(parameter)=5 and parameter[1][@type='android.content.BroadcastReceiver'] and parameter[2][@type='android.content.IntentFilter'] and parameter[3][@type='java.lang.String'] and parameter[4][@type='android.os.Handler'] and parameter[5][@type='int']]" name="deprecated">This method has an incorrect enumeration type. Use the overload that takes ReceiverFlags instead.</attr>
<attr api-since="34" path="/api/package[@name='android.content']/class[@name='ContextWrapper']/method[@name='registerReceiver' and count(parameter)=3 and parameter[1][@type='android.content.BroadcastReceiver'] and parameter[2][@type='android.content.IntentFilter'] and parameter[3][@type='int']]" name="deprecated">This method has an incorrect enumeration type. Use the overload that takes ReceiverFlags instead.</attr>
<attr api-since="34" path="/api/package[@name='android.content']/class[@name='ContextWrapper']/method[@name='registerReceiver' and count(parameter)=5 and parameter[1][@type='android.content.BroadcastReceiver'] and parameter[2][@type='android.content.IntentFilter'] and parameter[3][@type='java.lang.String'] and parameter[4][@type='android.os.Handler'] and parameter[5][@type='int']]" name="deprecated">This method has an incorrect enumeration type. Use the overload that takes ReceiverFlags instead.</attr>
<attr api-since="34" path="/api/package[@name='android.test.mock']/class[@name='MockContext']/method[@name='registerReceiver' and count(parameter)=3 and parameter[1][@type='android.content.BroadcastReceiver'] and parameter[2][@type='android.content.IntentFilter'] and parameter[3][@type='int']]" name="deprecated">This method has an incorrect enumeration type. Use the overload that takes ReceiverFlags instead.</attr>
<attr api-since="34" path="/api/package[@name='android.test.mock']/class[@name='MockContext']/method[@name='registerReceiver' and count(parameter)=5 and parameter[1][@type='android.content.BroadcastReceiver'] and parameter[2][@type='android.content.IntentFilter'] and parameter[3][@type='java.lang.String'] and parameter[4][@type='android.os.Handler'] and parameter[5][@type='int']]" name="deprecated">This method has an incorrect enumeration type. Use the overload that takes ReceiverFlags instead.</attr>

<!--
***********************************************************************
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ protected bool BuildInternal (string projectOrSolution, string target, string []
}
if (Builder.UseDotNet) {
psi.SetEnvironmentVariable ("DOTNET_MULTILEVEL_LOOKUP", "0");
psi.SetEnvironmentVariable ("DOTNET_ROOT", TestEnvironment.DotNetPreviewDirectory);
psi.SetEnvironmentVariable ("PATH", TestEnvironment.DotNetPreviewDirectory + Path.PathSeparator + Environment.GetEnvironmentVariable ("PATH"));
}

psi.Arguments = args.ToString ();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ protected bool Execute (params string [] args)
p.StartInfo.RedirectStandardOutput = true;
p.StartInfo.RedirectStandardError = true;
p.StartInfo.SetEnvironmentVariable ("DOTNET_MULTILEVEL_LOOKUP", "0");
p.StartInfo.SetEnvironmentVariable ("DOTNET_ROOT", TestEnvironment.DotNetPreviewDirectory);
p.StartInfo.SetEnvironmentVariable ("PATH", TestEnvironment.DotNetPreviewDirectory + Path.PathSeparator + Environment.GetEnvironmentVariable ("PATH"));
if (TestEnvironment.UseLocalBuildOutput) {
p.StartInfo.SetEnvironmentVariable ("DOTNETSDK_WORKLOAD_MANIFEST_ROOTS", TestEnvironment.WorkloadManifestOverridePath);
p.StartInfo.SetEnvironmentVariable ("DOTNETSDK_WORKLOAD_PACK_ROOTS", TestEnvironment.WorkloadPackOverridePath);
Expand Down

0 comments on commit f658aed

Please sign in to comment.