From c10e990267e33c3c59b967d5a838e01a21158ae3 Mon Sep 17 00:00:00 2001 From: Jonathan Pobst Date: Mon, 21 Oct 2024 13:16:41 -1000 Subject: [PATCH 1/2] Updates needed to build on `net9.0-android` RTM. --- source/AndroidXProject.cshtml | 3 ++- source/_PackageLevelCustomizations.cshtml | 9 +++++++ .../paging-common-jvm/Transforms/Metadata.xml | 8 ++++++ .../work-runtime/Transforms/Metadata.xml | 1 + .../protobuf-lite/Transforms/Metadata.xml | 8 ++++++ .../kotlin-stdlib/Transforms/Metadata.xml | 25 ++++++++++++++++++- 6 files changed, 52 insertions(+), 2 deletions(-) diff --git a/source/AndroidXProject.cshtml b/source/AndroidXProject.cshtml index dc5b9e974..10ec5b39c 100644 --- a/source/AndroidXProject.cshtml +++ b/source/AndroidXProject.cshtml @@ -22,8 +22,9 @@ - CS0809: Obsolete member 'member' overrides non-obsolete member 'member' - CS1572: XML comment has a param tag for '', but there is no parameter by that name - XAOBS001: While this member is 'public', Google considers it internal API and reserves the right to modify or delete it in the future. Use at your own risk. + - NU1605: Detected package downgrade --> - 0618;0109;0114;0628;0108;0809;1572;XAOBS001 + 0618;0109;0114;0628;0108;0809;1572;XAOBS001;NU1605 @if (Model.AllowPrereleaseDependencies) { diff --git a/source/_PackageLevelCustomizations.cshtml b/source/_PackageLevelCustomizations.cshtml index 4f48b1bc7..f63328583 100644 --- a/source/_PackageLevelCustomizations.cshtml +++ b/source/_PackageLevelCustomizations.cshtml @@ -55,3 +55,12 @@ } + +@* .NET 9 changes some binding internals that breaks some of our hand bound code. This property reverts + to the old behavior. Once we are .NET 9+ we should redo our hand bound code and remove this. *@ +@if (@Model.NuGetPackageId == "Xamarin.AndroidX.Media3.ExoPlayer") +{ + + <_AndroidEmitLegacyInterfaceInvokers>true + +} diff --git a/source/androidx.paging/paging-common-jvm/Transforms/Metadata.xml b/source/androidx.paging/paging-common-jvm/Transforms/Metadata.xml index 877384035..6ecbb00d2 100644 --- a/source/androidx.paging/paging-common-jvm/Transforms/Metadata.xml +++ b/source/androidx.paging/paging-common-jvm/Transforms/Metadata.xml @@ -109,4 +109,12 @@ public + + + java/util/SequencedCollection.reversed()Ljava/util/SequencedCollection; + + \ No newline at end of file diff --git a/source/androidx.work/work-runtime/Transforms/Metadata.xml b/source/androidx.work/work-runtime/Transforms/Metadata.xml index 5aa1c0894..80c8c0dd4 100644 --- a/source/androidx.work/work-runtime/Transforms/Metadata.xml +++ b/source/androidx.work/work-runtime/Transforms/Metadata.xml @@ -11,6 +11,7 @@ AndroidX.Work.WorkRequest.Builder AndroidX.Work.WorkRequest.Builder AndroidX.Work.WorkRequest.Builder + AndroidX.Work.WorkRequest.Builder + + + java/util/SequencedCollection.reversed()Ljava/util/SequencedCollection; + + diff --git a/source/org.jetbrains.kotlin/kotlin-stdlib/Transforms/Metadata.xml b/source/org.jetbrains.kotlin/kotlin-stdlib/Transforms/Metadata.xml index d5a31dfb7..76c2db212 100644 --- a/source/org.jetbrains.kotlin/kotlin-stdlib/Transforms/Metadata.xml +++ b/source/org.jetbrains.kotlin/kotlin-stdlib/Transforms/Metadata.xml @@ -152,6 +152,7 @@ + java.lang.CharSequence java.lang.CharSequence @@ -444,4 +445,26 @@ - + + + java/util/SequencedCollection.reversed()Ljava/util/SequencedCollection; + + + + java/util/SequencedCollection.reversed()Ljava/util/SequencedCollection; + + + + + java/util/SequencedCollection.reversed()Ljava/util/SequencedCollection; + + From 8f500a94251d7a5eadcf38dacd3fc058f271dfa3 Mon Sep 17 00:00:00 2001 From: Jonathan Pobst Date: Thu, 14 Nov 2024 11:17:06 -0800 Subject: [PATCH 2/2] Fix unit test stages to use .NET next. --- azure-pipelines.yml | 2 ++ build/ci/build.yml | 5 +++-- build/ci/job-extended-tests.yml | 3 +++ build/ci/stage-extended-tests.yml | 4 +++- build/ci/stage-standard-tests.yml | 2 ++ tests/common/NuGet.config | 2 ++ 6 files changed, 15 insertions(+), 3 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 21784f101..96c8b75f7 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -89,6 +89,7 @@ extends: name: $(windowsAgentPoolName) image: $(windowsImage) os: windows + runDotnetNextTest: ${{ parameters.RunDotnetNextTest }} - template: build/ci/stage-extended-tests.yml@self parameters: @@ -97,5 +98,6 @@ extends: name: $(windowsAgentPoolName) image: $(windowsImage) os: windows + runDotnetNextTest: ${{ parameters.RunDotnetNextTest }} - template: build/ci/stage-sign-artifacts.yml@self diff --git a/build/ci/build.yml b/build/ci/build.yml index e81c05989..5d93fe357 100644 --- a/build/ci/build.yml +++ b/build/ci/build.yml @@ -9,7 +9,6 @@ parameters: runDotnetNextTest: false tools: # Additional .NET global tools to install - - 'xamarin.androidbinderator.tool': '0.5.7' - 'Cake.Tool': '4.0.0' - 'private-api-tools': '1.0.3' @@ -22,7 +21,9 @@ jobs: displayName: ${{ parameters.name }} timeoutInMinutes: ${{ parameters.timeoutInMinutes }} pool: ${{ parameters.buildPool }} - + workspace: + clean: all + templateContext: sdl: spotBugs: diff --git a/build/ci/job-extended-tests.yml b/build/ci/job-extended-tests.yml index f5188cc68..21a918593 100644 --- a/build/ci/job-extended-tests.yml +++ b/build/ci/job-extended-tests.yml @@ -7,9 +7,11 @@ parameters: testFilter: # Test category filter testProject: # The test .csproj to build testAssembly: # The test .dll to execute + runDotnetNextTest: false tools: # Additional .NET global tools to install - 'dotnet-test-slicer' : '0.1.0-alpha7' + - 'Cake.Tool': '4.0.0' jobs: - job: ${{ parameters.jobName }}_package_tests @@ -23,6 +25,7 @@ jobs: - template: setup-environment.yml parameters: dotnetTools: ${{ parameters.tools }} + runDotnetNextTest: ${{ parameters.runDotnetNextTest }} - task: DownloadPipelineArtifact@2 inputs: diff --git a/build/ci/stage-extended-tests.yml b/build/ci/stage-extended-tests.yml index 0d2ad5d4a..fbf21d318 100644 --- a/build/ci/stage-extended-tests.yml +++ b/build/ci/stage-extended-tests.yml @@ -3,6 +3,7 @@ parameters: stageCondition: # When to run this stage buildPool: # VM pool information + runDotnetNextTest: false stages: - stage: extended_tests @@ -20,7 +21,8 @@ stages: testProject: $(extendedTestProject) testAssembly: $(extendedTestAssembly) buildPool: ${{ parameters.buildPool }} - + runDotnetNextTest: ${{ parameters.runDotnetNextTest }} + # Disabled because of too many failures until MAUI updates its AndroidX packages # - template: job-extended-tests.yml # parameters: diff --git a/build/ci/stage-standard-tests.yml b/build/ci/stage-standard-tests.yml index c147a9432..8798316fc 100644 --- a/build/ci/stage-standard-tests.yml +++ b/build/ci/stage-standard-tests.yml @@ -3,6 +3,7 @@ parameters: buildPool: # VM pool information stageCondition: and(succeeded(), ne('$(skipUnitTests)', 'true')) # When to run this stage + runDotnetNextTest: false stages: - stage: standard_tests @@ -20,3 +21,4 @@ stages: testProject: $(standardTestProject) testAssembly: $(standardTestAssembly) buildPool: ${{ parameters.buildPool }} + runDotnetNextTest: ${{ parameters.runDotnetNextTest }} \ No newline at end of file diff --git a/tests/common/NuGet.config b/tests/common/NuGet.config index 48b8a2941..4021ec78f 100644 --- a/tests/common/NuGet.config +++ b/tests/common/NuGet.config @@ -26,11 +26,13 @@ + +