diff --git a/.external b/.external index f0a5b855d3f..39511b205a8 100644 --- a/.external +++ b/.external @@ -1 +1 @@ -xamarin/monodroid:main@9ca6d9f64fce11f04d668ece50ada36de1d7efce +xamarin/monodroid:main@93ab95e18077d56d9d55ce7b4069a534e2dea35e diff --git a/Documentation/docs-mobile/building-apps/build-properties.md b/Documentation/docs-mobile/building-apps/build-properties.md index 9964444fd6c..0c28c3efd43 100644 --- a/Documentation/docs-mobile/building-apps/build-properties.md +++ b/Documentation/docs-mobile/building-apps/build-properties.md @@ -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 diff --git a/build-tools/automation/azure-pipelines.yaml b/build-tools/automation/azure-pipelines.yaml index dd8ea80b0d7..b70e0fdc0b7 100644 --- a/build-tools/automation/azure-pipelines.yaml +++ b/build-tools/automation/azure-pipelines.yaml @@ -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 diff --git a/src/Xamarin.Android.Build.Tasks/Tasks/ProcessAssemblies.cs b/src/Xamarin.Android.Build.Tasks/Tasks/ProcessAssemblies.cs index 98065ecf653..02ce62f6b87 100644 --- a/src/Xamarin.Android.Build.Tasks/Tasks/ProcessAssemblies.cs +++ b/src/Xamarin.Android.Build.Tasks/Tasks/ProcessAssemblies.cs @@ -142,7 +142,7 @@ static bool IsFromAKnownRuntimePack (ITaskItem assembly) static ITaskItem? GetOrCreateSymbolItem (Dictionary 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); diff --git a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/BuildTest2.cs b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/BuildTest2.cs index 6cf5a5a88a0..c37c20efbd0 100644 --- a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/BuildTest2.cs +++ b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/BuildTest2.cs @@ -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 () { diff --git a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/BuildWithLibraryTests.cs b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/BuildWithLibraryTests.cs index 33f75fccbea..0e8a721998f 100644 --- a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/BuildWithLibraryTests.cs +++ b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/BuildWithLibraryTests.cs @@ -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!"); } } diff --git a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Android/KnownProperties.cs b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Android/KnownProperties.cs index fa20a560acd..2ce6a3f142e 100644 --- a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Android/KnownProperties.cs +++ b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Android/KnownProperties.cs @@ -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"; diff --git a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Android/XamarinAndroidApplicationProject.cs b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Android/XamarinAndroidApplicationProject.cs index 5b54d4b2201..68416ad4831 100644 --- a/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Android/XamarinAndroidApplicationProject.cs +++ b/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.ProjectTools/Android/XamarinAndroidApplicationProject.cs @@ -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 ()); } diff --git a/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets b/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets index 5d81e3f7545..772f3b7078a 100644 --- a/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets +++ b/src/Xamarin.Android.Build.Tasks/Xamarin.Android.Common.targets @@ -535,6 +535,11 @@ Copyright (C) 2011-2012 Xamarin. All rights reserved. ResourceName="XA1035" Condition=" '$(BundleAssemblies)' == 'true' " /> +