Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/libraries/tests.proj
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,6 @@

<ItemGroup Condition="'$(TargetOS)' == 'android' and '$(RuntimeFlavor)' == 'CoreCLR' and '$(RunDisablediOSTests)' != 'true'">
<!-- https://github.com/dotnet/runtime/issues/114951 -->
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Runtime\tests\System.Globalization.Tests\Invariant\Invariant.Tests.csproj" />
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Net.Http\tests\FunctionalTests\System.Net.Http.Functional.Tests.csproj" />
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Diagnostics.DiagnosticSource\tests\TestWithConfigSwitches\System.Diagnostics.DiagnosticSource.Switches.Tests.csproj" />
<ProjectExclusions Include="$(MSBuildThisFileDirectory)System.Reflection.MetadataLoadContext\tests\System.Reflection.MetadataLoadContext.Tests.csproj" />
Expand Down
1 change: 1 addition & 0 deletions src/mono/msbuild/android/build/AndroidBuild.targets
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@
ForceAOT="$(RunAOTCompilation)"
ForceFullAOT="$(ForceFullAOT)"
ForceInterpreter="$(MonoForceInterpreter)"
InvariantGlobalization="$(InvariantGlobalization)"
IsLibraryMode="$(_IsLibraryMode)"
MainLibraryFileName="$(MainLibraryFileName)"
RuntimeHeaders="@(RuntimeHeaders)"
Expand Down
6 changes: 6 additions & 0 deletions src/tasks/AndroidAppBuilder/AndroidAppBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,11 @@ public class AndroidAppBuilderTask : Task

public bool ForceInterpreter { get; set; }

/// <summary>
/// Indicates whether we want to use invariant globalization mode.
/// </summary>
public bool InvariantGlobalization { get; set; }

[Output]
public string ApkBundlePath { get; set; } = ""!;

Expand Down Expand Up @@ -141,6 +146,7 @@ public override bool Execute()
apkBuilder.NativeDependencies = NativeDependencies;
apkBuilder.ExtraLinkerArguments = ExtraLinkerArguments;
apkBuilder.RuntimeFlavor = RuntimeFlavor;
apkBuilder.InvariantGlobalization = InvariantGlobalization;
(ApkBundlePath, ApkPackageId) = apkBuilder.BuildApk(RuntimeIdentifier, MainLibraryFileName, RuntimeHeaders);

return true;
Expand Down
5 changes: 5 additions & 0 deletions src/tasks/AndroidAppBuilder/ApkBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,11 @@ public ApkBuilder(TaskLoggingHelper logger)
envVariables += $"\t\tsetEnv(\"{name}\", \"{value}\");\n";
}

if (InvariantGlobalization)
{
envVariables += $"\t\tsetEnv(\"DOTNET_SYSTEM_GLOBALIZATION_INVARIANT\", \"true\");\n";
}

string jniLibraryName = (IsLibraryMode) ? ProjectName! :
(StaticLinkedRuntime && IsCoreCLR) ? "monodroid" : "System.Security.Cryptography.Native.Android";
string monoRunner = Utils.GetEmbeddedResource("MonoRunner.java")
Expand Down
1 change: 1 addition & 0 deletions src/tests/build.proj
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,7 @@
AppDir="$(BuildDir)"
DiagnosticPorts="$(DiagnosticPorts)"
ForceInterpreter="$(MonoInterp)"
InvariantGlobalization="$(InvariantGlobalization)"
RuntimeHeaders="$(MicrosoftNetCoreAppRuntimePackDir)/native/include/mono-2.0"
OutputDir="$(AppDir)"
ProjectName="$(Category)"
Expand Down
Loading