Skip to content

Commit

Permalink
Merge branch 'main' into dev/grendel/perfetto-integration
Browse files Browse the repository at this point in the history
* main:
  [ci] Update .NET version installed for MAUI tests (#8995)
  [ci] Run "Push Internal" job on AzurePipelines-EO pool (#8991)
  [Xamarin.Android.Build.Tasks] LLVM Marshal Methods by Default, Take 2 (#8925)
  $(AndroidPackVersionSuffix)=preview.6; net9 is 34.99.0.preview.6 (#8989)
  [ci] Update path for generated `*.include.*` files (#8980)
  Bump to xamarin/xamarin-android-tools/main@da2c33e (#8984)
  Bump to xamarin/Java.Interop/main@f935001 (#8985)
  Bump to xamarin/monodroid@93ab95e18 (#8959)
  Force loc task pool image to windows (#8983)
  [git] Re-format `.gitmodules` (#8978)
  • Loading branch information
grendello committed Jun 3, 2024
2 parents 2934099 + 17f8b79 commit 3b25208
Show file tree
Hide file tree
Showing 23 changed files with 166 additions and 256 deletions.
2 changes: 1 addition & 1 deletion .external
Original file line number Diff line number Diff line change
@@ -1 +1 @@
xamarin/monodroid:main@9ca6d9f64fce11f04d668ece50ada36de1d7efce
xamarin/monodroid:main@93ab95e18077d56d9d55ce7b4069a534e2dea35e
1 change: 1 addition & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ updates:
- dependency-name: "external/constexpr-xxh3"
- dependency-name: "external/debugger-libs"
- dependency-name: "external/lz4"
- dependency-name: "external/perfetto"
- dependency-name: "external/robin-map"
- dependency-name: "external/xxHash"
27 changes: 15 additions & 12 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
path = external/android-api-docs
url = https://github.com/xamarin/android-api-docs
branch = main
[submodule "external/constexpr-xxh3"]
path = external/constexpr-xxh3
url = https://github.com/chys87/constexpr-xxh3.git
branch = main
[submodule "external/debugger-libs"]
path = external/debugger-libs
url = https://github.com/mono/debugger-libs
Expand All @@ -10,10 +14,18 @@
path = external/Java.Interop
url = https://github.com/xamarin/java.interop.git
branch = main
[submodule "external/libunwind"]
path = external/libunwind
url = https://github.com/libunwind/libunwind.git
branch = v1.8-stable
[submodule "external/lz4"]
path = external/lz4
url = https://github.com/xamarin/lz4
branch = release
[submodule "external/perfetto"]
path = external/perfetto
url = https://github.com/google/perfetto.git
branch = main
[submodule "external/robin-map"]
path = external/robin-map
url = https://github.com/xamarin/robin-map
Expand All @@ -23,15 +35,6 @@
url = https://github.com/xamarin/xamarin-android-tools
branch = main
[submodule "external/xxHash"]
path = external/xxHash
url = https://github.com/Cyan4973/xxHash.git
[submodule "external/constexpr-xxh3"]
path = external/constexpr-xxh3
url = https://github.com/chys87/constexpr-xxh3.git
[submodule "external/libunwind"]
path = external/libunwind
url = https://github.com/libunwind/libunwind.git
branch = master
[submodule "external/perfetto"]
path = external/perfetto
url = https://github.com/google/perfetto.git
path = external/xxHash
url = https://github.com/Cyan4973/xxHash.git
branch = release
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
* Bump first digit of the patch version for feature releases (and reset the first two digits to 0)
-->
<AndroidPackVersion>34.99.0</AndroidPackVersion>
<AndroidPackVersionSuffix>preview.5</AndroidPackVersionSuffix>
<AndroidPackVersionSuffix>preview.6</AndroidPackVersionSuffix>
</PropertyGroup>

<!-- Common <PackageReference/> versions -->
Expand Down
2 changes: 2 additions & 0 deletions Documentation/docs-mobile/building-apps/build-properties.md
Original file line number Diff line number Diff line change
Expand Up @@ -549,6 +549,8 @@ Support for Fast Deploying resources and assets via that system was
removed in commit [f0d565fe](https://github.com/xamarin/xamarin-android/commit/f0d565fe4833f16df31378c77bbb492ffd2904b9). This was becuase it required the use of
deprecated API's to work.

**Support for this feature was removed in .NET 9

**Experimental**.

## AndroidFragmentType
Expand Down
17 changes: 6 additions & 11 deletions build-tools/automation/azure-pipelines.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -220,16 +220,6 @@ extends:
artifactSource: bin/Test$(XA.Build.Configuration)/$(DotNetTargetFramework)-android/Xamarin.Android.JcwGen_Tests-Signed.apk
artifactFolder: $(DotNetTargetFramework)-Default

- template: /build-tools/automation/yaml-templates/apk-instrumentation.yaml@self
parameters:
configuration: $(XA.Build.Configuration)
testName: Xamarin.Android.JcwGen_Tests_FastDev
project: tests/CodeGen-Binding/Xamarin.Android.JcwGen-Tests/Xamarin.Android.JcwGen-Tests.csproj
testResultsFiles: TestResult-Xamarin.Android.JcwGen_Tests-$(XA.Build.Configuration).xml
artifactSource: bin/Test$(XA.Build.Configuration)/$(DotNetTargetFramework)-android/Xamarin.Android.JcwGen_Tests-Signed.apk
artifactFolder: $(DotNetTargetFramework)-FastDev_Assemblies_Dexes
extraBuildArgs: /p:AndroidFastDeploymentType=Assemblies:Dexes

- template: /build-tools/automation/yaml-templates/run-nunit-tests.yaml@self
parameters:
testRunTitle: Xamarin.Android.Tools.Aidl-Tests - macOS
Expand Down Expand Up @@ -352,6 +342,8 @@ extends:
parameters:
xaSourcePath: $(Build.SourcesDirectory)/xamarin-android
androidSdkPlatforms: $(DefaultTestSdkPlatforms)
dotnetVersion: 9.0
dotnetQuality: preview

- task: NuGetAuthenticate@1
displayName: authenticate with azure artifacts
Expand Down Expand Up @@ -531,7 +523,10 @@ extends:
- sign_net_linux
condition: and(eq(dependencies.nuget_convert.result, 'Succeeded'), eq(dependencies.sign_net_linux.result, 'Succeeded'))
timeoutInMinutes: 60
pool: $(VSEngMicroBuildPool)
pool:
name: AzurePipelines-EO
image: $(WindowsPoolImage1ESPT)
os: windows
workspace:
clean: all
variables:
Expand Down
5 changes: 4 additions & 1 deletion build-tools/automation/onelocbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ jobs:
- job: OneLocBuild
displayName: OneLocBuild
condition: and(eq(variables['System.TeamProject'], 'DevDiv'), eq(variables['Build.SourceBranch'], 'refs/heads/main'))
pool: VSEngSS-MicroBuild2022-1ES
pool:
name: AzurePipelines-EO
demands:
- ImageOverride -equals 1ESPT-Windows2022
timeoutInMinutes: 30
variables:
- group: Xamarin-Secrets
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,10 @@ parameters:
xaSourcePath: $(System.DefaultWorkingDirectory)
jdkTestFolder: $(JAVA_HOME_17_X64)
remove_dotnet: false
dotnetVersion: $(DotNetSdkVersion)
dotnetQuality: $(DotNetSdkQuality)
installTestSlicer: false
installApkDiff: true
installLegacyDotNet: false
installLegacyXamarinAndroid: false
updateMono: false
androidSdkPlatforms: $(DefaultTestSdkPlatforms)
Expand Down Expand Up @@ -33,16 +34,12 @@ steps:
displayName: set JI_JAVA_HOME to ${{ parameters.jdkTestFolder }}
condition: and(succeeded(), eq(variables['agent.os'], 'Windows_NT'))

# Install .NET 6 for legacy tests
- ${{ if eq(parameters.installLegacyDotNet, true) }}:
- template: /build-tools/automation/yaml-templates/use-dot-net.yaml
parameters:
version: 6.0
quality: GA
remove_dotnet: ${{ parameters.remove_dotnet }}

# Install latest .NET
- template: /build-tools/automation/yaml-templates/use-dot-net.yaml
parameters:
version: ${{ parameters.dotnetVersion }}
quality: ${{ parameters.dotnetQuality }}
remove_dotnet: ${{ parameters.remove_dotnet }}

- task: DotNetCoreCLI@2
displayName: shut down existing build daemons
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ void CopyExtraBuildFiles (string destinationRoot, Context context)
filesToCopyPreserveRelative.AddRange (Directory.GetFiles (javaInteropBuildConfigDir, "*.props"));
}

filesToCopyPreserveRelative.AddRange (Directory.GetFiles (Path.Combine (BuildPaths.XamarinAndroidSourceRoot, "src", "monodroid", "jni"), "*.include.*"));
filesToCopyPreserveRelative.AddRange (Directory.GetFiles (Path.Combine (BuildPaths.XamarinAndroidSourceRoot, "src", "native", "monodroid"), "*.include.*"));

var buildConfigDir = Path.Combine (BuildPaths.XamarinAndroidSourceRoot, "bin", $"Build{context.Configuration}");
if (Directory.Exists (buildConfigDir)) {
Expand Down
2 changes: 1 addition & 1 deletion external/Java.Interop
2 changes: 1 addition & 1 deletion external/xamarin-android-tools
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,30 @@ They run in a context of an inner build with a single $(RuntimeIdentifier).
SourceFiles="@(_ILStripUpdatedAssemblies)"
DestinationFiles="@(_ILStripUpdatedAssemblies->'%(UntrimmedAssemblyFilePath)')"
/>
<ItemGroup>
<_UpdateStamp Include="@(_ILStripUpdatedAssemblies)" Condition=" '$(AndroidStripILAfterAOT)' == 'true' and '%(_ILStripUpdatedAssemblies.ILStripped)' == 'true' " />
</ItemGroup>

<!-- We must update the stamp file used by `_GenerateJavaStubs`, but `$(_AndroidStampDirectory)` **here** is inside a per-RID parent
directory (e.g. `obj/Release/android-arm64/stamp`) and not the "top level" one (`obj/Release/stamp`). Since **both** are set
in the same place (in `Xamarin.Android.Common.targets`), we don't know where the "top level" one really is. Hence the hack.
If the locations or their relative paths change, then the `EnableAndroidStripILAfterAOTFalse` test will fail.
However, there should be a better way to do it... Ideally, when marshal methods are enabled **nothing** should modify any
assemblies after marshal method classifier and rewriter runs.
-->
<PropertyGroup>
<_StampDir>$(_AndroidStampDirectory)\..\..\stamp</_StampDir>
</PropertyGroup>
<MakeDir
Condition=" '$(AndroidStripILAfterAOT)' == 'true' and '@(_UpdateStamp->Count())' &gt; 0 "
Directories="$(_StampDir)"
/>
<Touch
Condition=" '$(AndroidStripILAfterAOT)' == 'true' and '@(_UpdateStamp->Count())' &gt; 0 "
Files="$(_StampDir)\_GenerateJavaStubs.stamp"
AlwaysCreate="True"
/>
<WriteLinesToFile
File="$(_AndroidStampDirectory)_AndroidAot.stamp"
Lines="@(_MonoAOTCompiledAssemblies->'%(LibraryFile)')"
Expand Down
2 changes: 1 addition & 1 deletion src/Xamarin.Android.Build.Tasks/Tasks/ProcessAssemblies.cs
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ static bool IsFromAKnownRuntimePack (ITaskItem assembly)
static ITaskItem? GetOrCreateSymbolItem (Dictionary<string, ITaskItem> symbols, ITaskItem assembly)
{
var symbolPath = Path.ChangeExtension (assembly.ItemSpec, ".pdb");
if (!symbols.TryGetValue (symbolPath, out var symbol)) {
if (!symbols.TryGetValue (symbolPath, out var symbol) || !string.IsNullOrEmpty (symbol.GetMetadata ("DestinationSubDirectory"))) {
// Sometimes .pdb files are not included in @(ResolvedFileToPublish), so add them if they exist
if (File.Exists (symbolPath)) {
symbols [symbolPath] = symbol = new TaskItem (symbolPath);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,26 @@ public void BuildHasNoWarnings (bool isRelease, bool xamarinForms, bool multidex
}
}

[Test]
[TestCase ("AndroidFastDeploymentType", "Assemblies", true, false)]
[TestCase ("AndroidFastDeploymentType", "Assemblies", false, false)]
[TestCase ("_AndroidUseJavaLegacyResolver", "true", false, true)]
[TestCase ("_AndroidUseJavaLegacyResolver", "true", true, true)]
[TestCase ("_AndroidEmitLegacyInterfaceInvokers", "true", false, true)]
[TestCase ("_AndroidEmitLegacyInterfaceInvokers", "true", true, true)]
public void XA1037PropertyDeprecatedWarning (string property, string value, bool isRelease, bool isBindingProject)
{
XamarinAndroidProject proj = isBindingProject ? new XamarinAndroidBindingProject () : new XamarinAndroidApplicationProject ();
proj.IsRelease = isRelease;
proj.SetProperty (property, value);

using (ProjectBuilder b = isBindingProject ? CreateDllBuilder (Path.Combine ("temp", TestName)) : CreateApkBuilder (Path.Combine ("temp", TestName))) {
Assert.IsTrue (b.Build (proj), "Build should have succeeded.");
Assert.IsTrue (StringAssertEx.ContainsText (b.LastBuildOutput, $"The '{property}' MSBuild property is deprecated and will be removed"),
$"Should not get a warning about the {property} property");
}
}

[Test]
public void ClassLibraryHasNoWarnings ()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,7 @@ public void LibraryProjectsShouldSkipGetPrimaryCpuAbi ()
var proj = new XamarinAndroidLibraryProject ();
using (var b = CreateDllBuilder (Path.Combine ("temp", TestName))) {
Assert.IsTrue (b.Build (proj), "Build should have succeeded.");
Assert.IsTrue (b.Output.IsTargetSkipped (target), $"`{target}` should be skipped!");
Assert.IsTrue (b.Output.IsTargetSkipped (target, defaultIfNotUsed: true), $"`{target}` should be skipped!");
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ public static class KnownProperties
public const string OutputPath = "OutputPath";
public const string IntermediateOutputPath = "IntermediateOutputPath";
public const string OutputType = "OutputType";
public const string AndroidFastDeploymentType = "AndroidFastDeploymentType";
public const string AndroidClassParser = "AndroidClassParser";
public const string _AndroidAllowDeltaInstall = "_AndroidAllowDeltaInstall";
public const string Nullable = "Nullable";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,6 @@ public string LinkTool {
set { SetProperty (KnownProperties.AndroidLinkTool, value); }
}

public string AndroidFastDeploymentType {
get { return GetProperty (KnownProperties.AndroidFastDeploymentType); }
set { SetProperty (KnownProperties.AndroidFastDeploymentType, value); }
}

public bool UseJackAndJill {
get { return string.Equals (GetProperty (KnownProperties.UseJackAndJill), "True", StringComparison.OrdinalIgnoreCase); }
set { SetProperty (KnownProperties.UseJackAndJill, value.ToString ()); }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,28 +5,28 @@
"Size": 3036
},
"classes.dex": {
"Size": 377764
"Size": 19476
},
"lib/arm64-v8a/lib__Microsoft.Android.Resource.Designer.dll.so": {
"Size": 1027
},
"lib/arm64-v8a/lib_Java.Interop.dll.so": {
"Size": 64231
"Size": 64655
},
"lib/arm64-v8a/lib_Mono.Android.dll.so": {
"Size": 91590
"Size": 92217
},
"lib/arm64-v8a/lib_Mono.Android.Runtime.dll.so": {
"Size": 5315
"Size": 5320
},
"lib/arm64-v8a/lib_System.Console.dll.so": {
"Size": 6539
"Size": 6541
},
"lib/arm64-v8a/lib_System.Linq.dll.so": {
"Size": 8525
"Size": 8524
},
"lib/arm64-v8a/lib_System.Private.CoreLib.dll.so": {
"Size": 570166
"Size": 571267
},
"lib/arm64-v8a/lib_System.Runtime.dll.so": {
"Size": 2544
Expand All @@ -35,7 +35,7 @@
"Size": 4020
},
"lib/arm64-v8a/lib_UnnamedProject.dll.so": {
"Size": 2933
"Size": 2931
},
"lib/arm64-v8a/libarc.bin.so": {
"Size": 1586
Expand All @@ -44,10 +44,10 @@
"Size": 87352
},
"lib/arm64-v8a/libmonodroid.so": {
"Size": 476432
"Size": 492104
},
"lib/arm64-v8a/libmonosgen-2.0.so": {
"Size": 3138768
"Size": 3154304
},
"lib/arm64-v8a/libSystem.Globalization.Native.so": {
"Size": 67248
Expand All @@ -56,16 +56,16 @@
"Size": 723560
},
"lib/arm64-v8a/libSystem.Native.so": {
"Size": 94720
"Size": 95296
},
"lib/arm64-v8a/libSystem.Security.Cryptography.Native.Android.so": {
"Size": 155568
},
"lib/arm64-v8a/libxamarin-app.so": {
"Size": 12696
"Size": 17952
},
"META-INF/BNDLTOOL.RSA": {
"Size": 1221
"Size": 1223
},
"META-INF/BNDLTOOL.SF": {
"Size": 3266
Expand Down Expand Up @@ -98,5 +98,5 @@
"Size": 1904
}
},
"PackageSize": 2742805
"PackageSize": 2681365
}
Loading

0 comments on commit 3b25208

Please sign in to comment.