Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove Enhanced Fast Deployment #8959

Merged
merged 8 commits into from
May 28, 2024
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
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
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
10 changes: 0 additions & 10 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
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 @@ -535,6 +535,11 @@ Copyright (C) 2011-2012 Xamarin. All rights reserved.
ResourceName="XA1035"
Condition=" '$(BundleAssemblies)' == 'true' "
/>
<AndroidWarning Code="XA1037"
ResourceName="XA1037"
FormatArguments="AndroidFastDeploymentType;9"
Condition=" '$(AndroidFastDeploymentType)' != '' "
/>
</Target>

<!--
Expand Down
51 changes: 2 additions & 49 deletions tests/MSBuildDeviceIntegration/Tests/DebuggingTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -137,37 +137,16 @@ public void ClassLibraryMainLauncherRuns ([Values (true, false)] bool preloadAss
static object [] DebuggerCustomAppTestCases = new object [] {
new object[] {
/* embedAssemblies */ true,
/* fastDevType */ "Assemblies",
/* activityStarts */ true,
/* packageFormat */ "apk",
},
new object[] {
/* embedAssemblies */ false,
/* fastDevType */ "Assemblies",
/* activityStarts */ true,
/* packageFormat */ "apk",
},
new object[] {
/* embedAssemblies */ true,
/* fastDevType */ "Assemblies:Dexes",
/* activityStarts */ true,
/* packageFormat */ "apk",
},
new object[] {
/* embedAssemblies */ false,
/* fastDevType */ "Assemblies:Dexes",
/* activityStarts */ false,
/* packageFormat */ "apk",
},
new object[] {
/* embedAssemblies */ true,
/* fastDevType */ "Assemblies",
/* activityStarts */ true,
/* packageFormat */ "aab",
},
new object[] {
/* embedAssemblies */ true,
/* fastDevType */ "Assemblies:Dexes",
/* activityStarts */ true,
/* packageFormat */ "aab",
},
Expand All @@ -177,7 +156,7 @@ public void ClassLibraryMainLauncherRuns ([Values (true, false)] bool preloadAss
[Test, Category ("Debugger")]
[TestCaseSource (nameof (DebuggerCustomAppTestCases))]
[Retry(5)]
public void CustomApplicationRunsWithDebuggerAndBreaks (bool embedAssemblies, string fastDevType, bool activityStarts, string packageFormat)
public void CustomApplicationRunsWithDebuggerAndBreaks (bool embedAssemblies, bool activityStarts, string packageFormat)
{
AssertCommercialBuild ();
SwitchUser ();
Expand All @@ -190,7 +169,6 @@ public void CustomApplicationRunsWithDebuggerAndBreaks (bool embedAssemblies, st

var proj = new XamarinAndroidApplicationProject () {
IsRelease = false,
AndroidFastDeploymentType = fastDevType,
};
proj.SetAndroidSupportedAbis (DeviceAbi);
proj.SetProperty ("EmbedAssembliesIntoApk", embedAssemblies.ToString ());
Expand Down Expand Up @@ -299,79 +277,55 @@ public override void OnCreate ()
static object [] DebuggerTestCases = new object [] {
new object[] {
/* embedAssemblies */ true,
/* fastDevType */ "Assemblies",
/* allowDeltaInstall */ false,
/* user */ null,
/* packageFormat */ "apk",
/* useLatestSdk */ true,
},
new object[] {
/* embedAssemblies */ true,
/* fastDevType */ "Assemblies",
/* allowDeltaInstall */ false,
/* user */ null,
/* packageFormat */ "apk",
/* useLatestSdk */ false,
},
new object[] {
/* embedAssemblies */ false,
/* fastDevType */ "Assemblies",
/* allowDeltaInstall */ false,
/* user */ null,
/* packageFormat */ "apk",
/* useLatestSdk */ true,
},
new object[] {
/* embedAssemblies */ false,
/* fastDevType */ "Assemblies",
/* allowDeltaInstall */ true,
/* user */ null,
/* packageFormat */ "apk",
/* useLatestSdk */ true,
},
new object[] {
/* embedAssemblies */ false,
/* fastDevType */ "Assemblies:Dexes",
/* allowDeltaInstall */ false,
/* user */ null,
/* packageFormat */ "apk",
/* useLatestSdk */ true,
},
new object[] {
/* embedAssemblies */ false,
/* fastDevType */ "Assemblies:Dexes",
/* allowDeltaInstall */ true,
/* user */ null,
/* packageFormat */ "apk",
/* useLatestSdk */ true,
},
new object[] {
/* embedAssemblies */ true,
/* fastDevType */ "Assemblies",
/* allowDeltaInstall */ false,
/* user */ DeviceTest.GuestUserName,
/* packageFormat */ "apk",
/* useLatestSdk */ true,
},
new object[] {
/* embedAssemblies */ false,
/* fastDevType */ "Assemblies",
/* allowDeltaInstall */ false,
/* user */ DeviceTest.GuestUserName,
/* packageFormat */ "apk",
/* useLatestSdk */ true,
},
new object[] {
/* embedAssemblies */ true,
/* fastDevType */ "Assemblies",
/* allowDeltaInstall */ false,
/* user */ null,
/* packageFormat */ "aab",
/* useLatestSdk */ true,
},
new object[] {
/* embedAssemblies */ true,
/* fastDevType */ "Assemblies",
/* allowDeltaInstall */ false,
/* user */ DeviceTest.GuestUserName,
/* packageFormat */ "aab",
Expand All @@ -383,7 +337,7 @@ public override void OnCreate ()
[Test, Category ("Debugger"), Category ("WearOS")]
[TestCaseSource (nameof(DebuggerTestCases))]
[Retry (5)]
public void ApplicationRunsWithDebuggerAndBreaks (bool embedAssemblies, string fastDevType, bool allowDeltaInstall, string username, string packageFormat, bool useLatestSdk)
public void ApplicationRunsWithDebuggerAndBreaks (bool embedAssemblies, bool allowDeltaInstall, string username, string packageFormat, bool useLatestSdk)
{
AssertCommercialBuild ();
SwitchUser ();
Expand Down Expand Up @@ -424,7 +378,6 @@ public Foo ()
ProjectName = "App",
IsRelease = false,
EmbedAssembliesIntoApk = embedAssemblies,
AndroidFastDeploymentType = fastDevType
};
if (!useLatestSdk) {
lib.TargetFramework = "net8.0-android";
Expand Down
Loading
Loading