Skip to content

Commit c291663

Browse files
In order for this to build, I had to bring in some other changes from: #5544
1 parent 3864496 commit c291663

File tree

4 files changed

+27
-11
lines changed

4 files changed

+27
-11
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@ad19471b8478f9f8028c9a3517ad3ca7bca5fb4a
1+
xamarin/monodroid:fastdeploy-targetpath@86a51cf8b3915eecad6d8a0b22202121c0db6fa9
22
mono/mono:2020-02@5e9cb6d1c1de430965312927d5aed7fcb27bfa73

Configuration.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@
128128
<LibZipSharpVersion>1.0.20</LibZipSharpVersion>
129129
<MonoCecilVersion>0.11.2</MonoCecilVersion>
130130
<NuGetApiPackageVersion>5.4.0</NuGetApiPackageVersion>
131+
<LZ4PackageVersion>1.1.11</LZ4PackageVersion>
131132
</PropertyGroup>
132133
<PropertyGroup>
133134
<MingwCommandPrefix32>i686-w64-mingw32</MingwCommandPrefix32>

src/Xamarin.Android.Build.Tasks/Xamarin.Android.Build.Tasks.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
<PackageReference Include="System.Runtime" Version="4.3.1" />
5656
<PackageReference Include="System.Runtime.InteropServices" Version="4.3.0" />
5757
<PackageReference Include="XliffTasks" Version="1.0.0-beta.20420.1" PrivateAssets="all" />
58-
<PackageReference Include="K4os.Compression.LZ4" Version="1.1.11" />
58+
<PackageReference Include="K4os.Compression.LZ4" Version="$(LZ4PackageVersion)" />
5959
</ItemGroup>
6060

6161
<ItemGroup>

tests/MSBuildDeviceIntegration/Tests/InstallTests.cs

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -440,7 +440,20 @@ public void LocalizedAssemblies_ShouldBeFastDeployed ()
440440
AssertCommercialBuild ();
441441
AssertHasDevices ();
442442

443-
var proj = new XamarinAndroidApplicationProject {
443+
var path = Path.Combine ("temp", TestName);
444+
var lib = new XamarinAndroidLibraryProject {
445+
ProjectName = "Localization",
446+
OtherBuildItems = {
447+
new BuildItem ("EmbeddedResource", "Bar.resx") {
448+
TextContent = () => InlineData.ResxWithContents ("<data name=\"CancelButton\"><value>Cancel</value></data>")
449+
},
450+
new BuildItem ("EmbeddedResource", "Bar.es.resx") {
451+
TextContent = () => InlineData.ResxWithContents ("<data name=\"CancelButton\"><value>Cancelar</value></data>")
452+
}
453+
}
454+
};
455+
456+
var app = new XamarinAndroidApplicationProject {
444457
EmbedAssembliesIntoApk = false,
445458
OtherBuildItems = {
446459
new BuildItem ("EmbeddedResource", "Foo.resx") {
@@ -451,24 +464,26 @@ public void LocalizedAssemblies_ShouldBeFastDeployed ()
451464
}
452465
}
453466
};
467+
app.References.Add (new BuildItem.ProjectReference ($"..\\{lib.ProjectName}\\{lib.ProjectName}.csproj", lib.ProjectName, lib.ProjectGuid));
454468

455-
using (var builder = CreateApkBuilder ()) {
456-
Assert.IsTrue (builder.Install (proj), "Install should have succeeded.");
457-
var projectOutputPath = Path.Combine (Root, builder.ProjectDirectory, proj.OutputPath);
469+
using (var libBuilder = CreateDllBuilder (Path.Combine (path, lib.ProjectName)))
470+
using (var appBuilder = CreateApkBuilder (Path.Combine (path, app.ProjectName))) {
471+
Assert.IsTrue (libBuilder.Build (lib), "Library Build should have succeeded.");
472+
Assert.IsTrue (appBuilder.Install (app), "App Install should have succeeded.");
473+
var projectOutputPath = Path.Combine (Root, appBuilder.ProjectDirectory, app.OutputPath);
458474
var resourceFilesFromDisk = Directory.EnumerateFiles (projectOutputPath, "*.resources.dll", SearchOption.AllDirectories)
459475
.Select (r => r = r.Replace (projectOutputPath, string.Empty).Replace ("\\", "/"));
460476

461477
var overrideContents = string.Empty;
462-
foreach (var dir in GetOverrideDirectoryPaths (proj.PackageName)) {
463-
overrideContents += RunAdbCommand ($"shell run-as {proj.PackageName} find {dir}");
478+
foreach (var dir in GetOverrideDirectoryPaths (app.PackageName)) {
479+
overrideContents += RunAdbCommand ($"shell run-as {app.PackageName} find {dir}");
464480
}
465-
builder.BuildLogFile = "uninstall.log";
466-
builder.Uninstall (proj);
467481
Assert.IsTrue (resourceFilesFromDisk.Any (), $"Unable to find any localized assemblies in {resourceFilesFromDisk}");
468482
foreach (var res in resourceFilesFromDisk) {
469483
StringAssert.Contains (res, overrideContents, $"{res} did not exist in the .__override__ directory.\nFound:{overrideContents}");
470484
}
471-
485+
appBuilder.BuildLogFile = "uninstall.log";
486+
appBuilder.Uninstall (app);
472487
}
473488
}
474489

0 commit comments

Comments
 (0)