Skip to content

Commit a8925ce

Browse files
committed
Fast Dev V2
1 parent a134aa7 commit a8925ce

File tree

5 files changed

+30
-8
lines changed

5 files changed

+30
-8
lines changed

.external

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
xamarin/monodroid:master@e795bcef375bc77da0bbe995fc9e57560ed5ddc0
1+
xamarin/monodroid:fastdevv2@805daf6a354bbd9c8350bd17c03a9d074b48aa90
22
mono/mono:2020-02@87ef5557017a8d822ae31587846a54fcd66daf1b
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Fast Deployment Updates.
2+
3+
As part of this update the fast deplyment system used for Debugging apps has
4+
been changed. The shared runtime is now no longer used or required.
5+
The Platform package has also been make obsolete.
6+
7+
The new system also no longer uses the `external` drive for the fast deployment
8+
files. All of the files and tooling are now stored in the applications' `internal`
9+
directory. This has an advantage in that when the application is uninstalled all
10+
if the files and the tooling will be removed as well.
11+
12+
The new system will not work on any devices older than API 21. This is because it
13+
relys on features that only work from API 21 onwards. Also API 21 is the lowest
14+
supported platform for the runtime, so running and debugging on older devices will
15+
be impossible.

build-tools/installers/create-installers.targets

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,10 @@
407407
<_MSBuildFiles Include="$(MSBuildSrcDir)\Xamarin.Installer.Common.dll" />
408408
<_MSBuildFiles Include="$(MSBuildSrcDir)\Xamarin.Installer.Common.pdb" />
409409
<_MSBuildFiles Include="$(MSBuildSrcDir)\Xamarin.Installer.Common.targets" />
410+
<_MSBuildFiles Include="$(MSBuildSrcDir)\K4os.Compression.LZ4.dll" />
411+
<_MSBuildFiles Include="@(AndroidSupportedTargetJitAbi->'$(MSBuildSrcDir)\lib\%(Identity)\xamarin.copy')" Condition=" '$(PackageId)' != 'Microsoft.Android.Sdk' " />
412+
<_MSBuildFiles Include="@(AndroidSupportedTargetJitAbi->'$(MSBuildSrcDir)\lib\%(Identity)\xamarin.find')" Condition=" '$(PackageId)' != 'Microsoft.Android.Sdk' " />
413+
<_MSBuildFiles Include="@(AndroidSupportedTargetJitAbi->'$(MSBuildSrcDir)\lib\%(Identity)\xamarin.stat')" Condition=" '$(PackageId)' != 'Microsoft.Android.Sdk' " />
410414
<LegacyTargetsFiles Include="$(RootBuildDir)\lib\xamarin.android\xbuild\Novell\Xamarin.Android.Bindings.targets" />
411415
<LegacyTargetsFiles Include="$(RootBuildDir)\lib\xamarin.android\xbuild\Novell\Xamarin.Android.VisualBasic.targets" />
412416
</ItemGroup>

tests/MSBuildDeviceIntegration/Tests/InstallTests.cs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ public void ReInstallIfUserUninstalled ([Values (false, true)] bool isRelease)
5656
Assert.IsTrue (builder.Output.AreTargetsAllBuilt ("_Upload"), "_Upload should have built completely.");
5757
Assert.AreEqual ($"package:{proj.PackageName}", RunAdbCommand ($"shell pm list packages {proj.PackageName}").Trim (),
5858
$"{proj.PackageName} is not installed on the device.");
59+
Assert.IsTrue (builder.Uninstall (proj), "unnstall should have succeeded.");
5960
}
6061
}
6162

@@ -68,7 +69,7 @@ public void InstallAndUnInstall ([Values (false, true)] bool isRelease)
6869
if (!HasDevices) {
6970
Assert.Ignore ("Test Skipped no devices or emulators found.");
7071
}
71-
72+
7273
var proj = new XamarinAndroidApplicationProject () {
7374
IsRelease = isRelease,
7475
};
@@ -136,6 +137,7 @@ public void ChangeKeystoreRedeploy ()
136137
proj.SetProperty ("AndroidSigningKeyAlias", "mykey");
137138

138139
Assert.IsTrue (builder.Install (proj), "second install should succeed.");
140+
Assert.IsTrue (builder.Uninstall (proj), "unnstall should have succeeded.");
139141
}
140142
}
141143

@@ -179,7 +181,7 @@ public void SwitchConfigurationsShouldRedeploy ()
179181
Assert.IsTrue (builder.Install (proj));
180182
Assert.AreEqual ($"package:{proj.PackageName}", RunAdbCommand ($"shell pm list packages {proj.PackageName}").Trim (),
181183
$"{proj.PackageName} is not installed on the device.");
182-
184+
183185
directorylist = string.Empty;
184186
foreach (var dir in overrideDirs) {
185187
var listing = RunAdbCommand ($"shell ls {dir}");
@@ -200,7 +202,7 @@ public void SwitchConfigurationsShouldRedeploy ()
200202
directorylist += listing;
201203
}
202204
StringAssert.Contains ($"{proj.AssemblyName}", directorylist, $"{proj.AssemblyName} not found in fastdev directory.");
203-
205+
204206
Assert.IsTrue (builder.Uninstall (proj));
205207
Assert.AreNotEqual ($"package:{proj.PackageName}", RunAdbCommand ($"shell pm list packages {proj.PackageName}").Trim (),
206208
$"{proj.PackageName} is installed on the device.");
@@ -262,7 +264,7 @@ public void InstallWithoutSharedRuntime ()
262264
StringAssert.Contains ($"{proj.ProjectName}.dll", directorylist, $"{proj.ProjectName}.dll should exist in the .__override__ directory.");
263265
StringAssert.Contains ($"System.dll", directorylist, $"System.dll should exist in the .__override__ directory.");
264266
StringAssert.Contains ($"Mono.Android.dll", directorylist, $"Mono.Android.dll should exist in the .__override__ directory.");
265-
267+
Assert.IsTrue (builder.Uninstall (proj), "unnstall should have succeeded.");
266268
}
267269
}
268270

@@ -345,6 +347,7 @@ public void ToggleFastDev ()
345347

346348
//Deploy one last time to verify install still works without the .__override__ directory existing
347349
Assert.IsTrue (builder.Install (proj), "Third install should have succeeded.");
350+
Assert.IsTrue (builder.Uninstall (proj), "unnstall should have succeeded.");
348351
}
349352
}
350353

tests/MSBuildDeviceIntegration/Tests/InstantRunTest.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public void InstantRunSimpleBuild ([Values ("dx", "d8")] string dexTool)
4848
File.Delete (dexFile);
4949
}
5050
}
51-
51+
5252
b.Dispose ();
5353
}
5454

@@ -306,9 +306,9 @@ public void InstantRunNativeLibrary ([Values ("dx", "d8")] string dexTool)
306306
Assert.Ignore ("Test needs a device attached.");
307307
return;
308308
}
309-
var nativeLib = new AndroidItem.AndroidNativeLibrary ("foo\\x86_64\\libtest.so") {
309+
var nativeLib = new AndroidItem.AndroidNativeLibrary ($"foo\\{DeviceAbi}\\libtest.so") {
310310
BinaryContent = () => new byte [10],
311-
MetadataValues = "Link=libs\\x86_64\\libtest.so",
311+
MetadataValues = $"Link=libs\\{DeviceAbi}\\libtest.so",
312312
};
313313
var proj = new XamarinAndroidApplicationProject () {
314314
AndroidFastDeploymentType = "Assemblies:Dexes",

0 commit comments

Comments
 (0)