Skip to content

Commit

Permalink
Merge branch 'main' into native-code-classic-cleanup
Browse files Browse the repository at this point in the history
* main:
  Replace K4os.Hash.xxHash with System.IO.Hashing (dotnet#7831)
  $(AndroidPackVersionSuffix)=preview.3; net8 is 34.0.0-preview.3 (dotnet#7839)
  [Xamarin.Android.Build.Tasks] Remove support for mkbundle (dotnet#7772)
  [Xamarin.Android.Build.Tasks] `unable to open file as zip archive`? (dotnet#7759)
  • Loading branch information
grendello committed Mar 1, 2023
2 parents c42b6c4 + 5d68699 commit c0e4b12
Show file tree
Hide file tree
Showing 37 changed files with 81 additions and 505 deletions.
2 changes: 1 addition & 1 deletion .external
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
xamarin/monodroid:main@50faac94c6a0c27864564829ac83f3988c82f8ef
xamarin/monodroid:main@602aca98245744882a129206b79b5a5e093dae44
mono/mono:2020-02@6dd9def57ce969ca04a0ecd9ef72c0a8f069112d
3 changes: 1 addition & 2 deletions Configuration.props
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,7 @@
<PathSeparator>$([System.IO.Path]::PathSeparator)</PathSeparator>
<_TestsAotName Condition=" '$(AotAssemblies)' == 'true' ">-Aot</_TestsAotName>
<_TestsProfiledAotName Condition=" '$(AndroidEnableProfiledAot)' == 'true' ">-Profiled</_TestsProfiledAotName>
<_TestsBundleName Condition=" '$(BundleAssemblies)' == 'true' ">-Bundle</_TestsBundleName>
<TestsFlavor>$(_TestsProfiledAotName)$(_TestsAotName)$(_TestsBundleName)</TestsFlavor>
<TestsFlavor>$(_TestsProfiledAotName)$(_TestsAotName)</TestsFlavor>
</PropertyGroup>
<PropertyGroup>
<MingwCommandPrefix32>i686-w64-mingw32</MingwCommandPrefix32>
Expand Down
4 changes: 2 additions & 2 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@
* Bump first digit of the patch version for feature releases (and reset the first two digits to 0)
-->
<AndroidPackVersion>34.0.0</AndroidPackVersion>
<AndroidPackVersionSuffix>preview.2</AndroidPackVersionSuffix>
<AndroidPackVersionSuffix>preview.3</AndroidPackVersionSuffix>
</PropertyGroup>

<!-- Common <PackageReference/> versions -->
<PropertyGroup>
<LibZipSharpVersion>2.0.7</LibZipSharpVersion>
<LibZipSharpVersion>2.1.0</LibZipSharpVersion>
<MicroBuildCoreVersion>1.0.0</MicroBuildCoreVersion>
<MonoCecilVersion>0.11.4</MonoCecilVersion>
<NewtonsoftJsonPackageVersion>13.0.1</NewtonsoftJsonPackageVersion>
Expand Down
1 change: 1 addition & 0 deletions Documentation/guides/messages/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ or 'Help->Report a Problem' in Visual Studio for Mac.
+ [XA1031](xa1031.md): The 'AndroidHttpClientHandlerType' has an invalid value.
+ [XA1032](xa1032.md):Failed to resolve '{0}' from '{1}'. Please check your `AndroidHttpClientHandlerType` setting.
+ [XA1033](xa1033.md): Could not resolve '{0}'. Please check your `AndroidHttpClientHandlerType` setting.
+ [XA1035](xa1035.md): The 'BundleAssemblies' property is deprecated and it has no effect on the application build. Equivalent functionality is implemented by the 'AndroidUseAssemblyStore' and 'AndroidEnableAssemblyCompression' properties.

## XA2xxx: Linker

Expand Down
19 changes: 19 additions & 0 deletions Documentation/guides/messages/xa1035.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
title: Xamarin.Android warning XA1035
description: XA1034 warning code
ms.date: 13/12/2022
---
# Xamarin.Android warning XA1035

## Example messages

```
The 'BundleAssemblies' property is deprecated and it has no effect on the application build. Equivalent functionality is implemented by the 'AndroidUseAssemblyStore' and 'AndroidEnableAssemblyCompression' properties.
```

## Solution

Edit your csproj directly and remove the 'BundleAssemblies' property.
`AndroidUseAssemblyStore` and `AndroidEnableAssemblyCompression` are
both enabled by default and, together, they implement behavior
equivalent to that of `BundleAssemblies`.
9 changes: 0 additions & 9 deletions Xamarin.Android-Tests.sln
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,6 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Xamarin.Android.FixJavaAbst
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Xamarin.Android.JcwGen-Tests", "tests\CodeGen-Binding\Xamarin.Android.JcwGen-Tests\Xamarin.Android.JcwGen-Tests.csproj", "{9479B71F-19FE-48F9-AB3F-AE764D76038A}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "CodeGen-MkBundle", "CodeGen-MkBundle", "{93CBCEB8-8B64-420C-950C-BCE9CC8C6032}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Xamarin.Android.MakeBundle-Tests", "tests\CodeGen-MkBundle\Xamarin.Android.MakeBundle-Tests\Xamarin.Android.MakeBundle-Tests.csproj", "{A0B2692E-9FBE-4157-9526-7145F07F2C5A}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "ResolveImports", "ResolveImports", "{E49089E4-4CE0-475E-BE9C-0AB4E4D56EE9}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Xamarin.Android.BindingResolveImportLib1", "tests\ResolveImports\Xamarin.Android.BindingResolveImportLib1\Xamarin.Android.BindingResolveImportLib1.csproj", "{2A0519DF-0DDA-45F7-AC3C-E2992748D364}"
Expand Down Expand Up @@ -151,10 +147,6 @@ Global
{9479B71F-19FE-48F9-AB3F-AE764D76038A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{9479B71F-19FE-48F9-AB3F-AE764D76038A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{9479B71F-19FE-48F9-AB3F-AE764D76038A}.Release|Any CPU.Build.0 = Release|Any CPU
{A0B2692E-9FBE-4157-9526-7145F07F2C5A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{A0B2692E-9FBE-4157-9526-7145F07F2C5A}.Debug|Any CPU.Build.0 = Debug|Any CPU
{A0B2692E-9FBE-4157-9526-7145F07F2C5A}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A0B2692E-9FBE-4157-9526-7145F07F2C5A}.Release|Any CPU.Build.0 = Release|Any CPU
{2A0519DF-0DDA-45F7-AC3C-E2992748D364}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2A0519DF-0DDA-45F7-AC3C-E2992748D364}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2A0519DF-0DDA-45F7-AC3C-E2992748D364}.Release|Any CPU.ActiveCfg = Release|Any CPU
Expand Down Expand Up @@ -269,7 +261,6 @@ Global
{7B9D9F32-973F-49CF-A8F8-05BDFC75556C} = {2EFFECF5-1CCA-4005-AE62-1D6F01C88DF4}
{B7476528-C166-40BF-931F-EAEB02247879} = {2EFFECF5-1CCA-4005-AE62-1D6F01C88DF4}
{9479B71F-19FE-48F9-AB3F-AE764D76038A} = {2EFFECF5-1CCA-4005-AE62-1D6F01C88DF4}
{A0B2692E-9FBE-4157-9526-7145F07F2C5A} = {93CBCEB8-8B64-420C-950C-BCE9CC8C6032}
{2A0519DF-0DDA-45F7-AC3C-E2992748D364} = {E49089E4-4CE0-475E-BE9C-0AB4E4D56EE9}
{DD4E2A49-730C-41FD-B6D4-AFB73F94271F} = {E49089E4-4CE0-475E-BE9C-0AB4E4D56EE9}
{9802CB35-0BC0-4EE1-9A81-BB40BD97945A} = {E49089E4-4CE0-475E-BE9C-0AB4E4D56EE9}
Expand Down
2 changes: 1 addition & 1 deletion build-tools/installers/create-installers.targets
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,7 @@
<_MSBuildFiles Include="$(MicrosoftAndroidSdkOutDir)System.CodeDom.dll" />
<_MSBuildFiles Include="$(MicrosoftAndroidSdkOutDir)System.Collections.Immutable.dll" />
<_MSBuildFiles Include="$(MicrosoftAndroidSdkOutDir)System.Buffers.dll" />
<_MSBuildFiles Include="$(MicrosoftAndroidSdkOutDir)System.IO.Hashing.dll" />
<_MSBuildFiles Include="$(MicrosoftAndroidSdkOutDir)Xamarin.Android.Aapt.targets" ExcludeFromAndroidNETSdk="true" />
<_MSBuildFiles Include="$(MicrosoftAndroidSdkOutDir)Xamarin.Android.Aapt2.targets" />
<_MSBuildFiles Include="$(MicrosoftAndroidSdkOutDir)Xamarin.Android.Analysis.targets" />
Expand Down Expand Up @@ -286,7 +287,6 @@
<_MSBuildFiles Include="$(MicrosoftAndroidSdkOutDir)Xamarin.Build.AsyncTask.dll" />
<_MSBuildFiles Include="$(MicrosoftAndroidSdkOutDir)Xamarin.Build.AsyncTask.pdb" />
<_MSBuildFiles Include="$(MicrosoftAndroidSdkOutDir)K4os.Compression.LZ4.dll" />
<_MSBuildFiles Include="$(MicrosoftAndroidSdkOutDir)K4os.Hash.xxHash.dll" />
<_MSBuildFiles Include="$(MicrosoftAndroidSdkOutDir)ELFSharp.dll" />
<_MSBuildFiles Include="$(MicrosoftAndroidSdkOutDir)ManifestOverlays\Timing.xml" />
</ItemGroup>
Expand Down
16 changes: 0 additions & 16 deletions build-tools/scripts/RunTests.targets
Original file line number Diff line number Diff line change
Expand Up @@ -159,22 +159,6 @@
Condition=" '$(_CrossCompilerAvailable)' == 'True' "
Properties="AndroidEnableProfiledAot=True;AotAssemblies=True"
/>
<ItemGroup Condition=" '$(USE_MSBUILD)' == '1' ">
<_ApkTestProjectBundle>
<_BinLog>$(_XABinLogPrefix)-$([System.DateTime]::Now.ToString ("yyyyMMddTHHmmss"))-%(Filename)-Bundle.binlog"</_BinLog>
</_ApkTestProjectBundle>
</ItemGroup>
<Exec
Command="$(_XABuild) %(_ApkTestProjectBundle.Identity) %(_ApkTestProjectBundle._BinLog) /t:SignAndroidPackage $(_XABuildProperties) /p:BundleAssemblies=True /p:EmbedAssembliesIntoApk=True"
Condition=" '$(_CrossCompilerAvailable)' == 'True' "
/>
<MSBuild
ContinueOnError="ErrorAndContinue"
Projects="$(_TopDir)\tests\RunApkTests.targets"
Targets="$(RunApkTestsTarget)"
Condition=" '$(_CrossCompilerAvailable)' == 'True' "
Properties="BundleAssemblies=True"
/>
</Target>
<Target Name="RunPerformanceTests">
<MSBuild Projects="$(MSBuildThisFileDirectory)..\timing\timing.csproj" Targets="MSBuildTiming" />
Expand Down
11 changes: 1 addition & 10 deletions build-tools/xaprepare/xaprepare/Steps/Step_PrepareLocal.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,7 @@ protected override async Task<bool> Execute(Context context)
var msbuild = new MSBuildRunner (context);
string xfTestPath = Path.Combine (BuildPaths.XamarinAndroidSourceRoot, "tests", "Xamarin.Forms-Performance-Integration", "Xamarin.Forms.Performance.Integration.csproj");

if (!await msbuild.Restore (projectPath: xfTestPath, logTag: "xfperf", binlogName: "prepare-local"))
return false;

// The Xamarin.Forms PackageReference version varies based on the value of $(BundleAssemblies)
return await msbuild.Restore (
projectPath: xfTestPath,
logTag: "xfperfbundle",
arguments: new List<string> { "-p:BundleAssemblies=true" },
binlogName: "prepare-local-bundle"
);
return await msbuild.Restore (projectPath: xfTestPath, logTag: "xfperf", binlogName: "prepare-local");
}
}
}
4 changes: 4 additions & 0 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
<Uri>https://github.com/dotnet/emsdk</Uri>
<Sha>d7ff0aa47c680be543905cc1410e2f62b54dfefe</Sha>
</Dependency>
<Dependency Name="System.IO.Hashing" Version="8.0.0-alpha.1.23080.2" CoherentParentDependency="Microsoft.Dotnet.Sdk.Internal">
<Uri>https://github.com/dotnet/runtime</Uri>
<Sha>9529803ae29c2804880c6bd8ca710b8c037cb498</Sha>
</Dependency>
</ProductDependencies>
<ToolsetDependencies>
<Dependency Name="Microsoft.DotNet.ApiCompat" Version="7.0.0-beta.22103.1">
Expand Down
1 change: 1 addition & 0 deletions eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<MicrosoftNETWorkloadEmscriptenCurrentManifest80100preview2Version>8.0.0-preview.2.23113.1</MicrosoftNETWorkloadEmscriptenCurrentManifest80100preview2Version>
<MicrosoftNETWorkloadEmscriptenPackageVersion>$(MicrosoftNETWorkloadEmscriptenCurrentManifest80100preview2Version)</MicrosoftNETWorkloadEmscriptenPackageVersion>
<MicrosoftTemplateEngineTasksPackageVersion>7.0.100-rc.1.22410.7</MicrosoftTemplateEngineTasksPackageVersion>
<SystemIOHashingPackageVersion>8.0.0-alpha.1.23080.2</SystemIOHashingPackageVersion>
</PropertyGroup>
<PropertyGroup>
<!-- Match the first three version numbers and append 00 -->
Expand Down
2 changes: 1 addition & 1 deletion external/xamarin-android-tools
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@ Copyright (C) 2016 Xamarin. All rights reserved.
Debug="$(AndroidIncludeDebugSymbols)"
AndroidSequencePointsMode="$(_SequencePointsMode)"
EnableSGenConcurrent="$(AndroidEnableSGenConcurrent)"
IsBundledApplication="$(BundleAssemblies)"
SupportedAbis="$(_BuildTargetAbis)"
AndroidPackageName="$(_AndroidPackage)"
EnablePreloadAssembliesDefault="$(_AndroidEnablePreloadAssembliesDefault)"
Expand Down
4 changes: 4 additions & 0 deletions src/Xamarin.Android.Build.Tasks/Properties/Resources.resx
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,10 @@ Please change the value to an assembly-qualifed type name which inherits from '{
<comment>The following are literal names and should not be translated: '_Microsoft.Android.Resource.Desinger', 'AndroidUseDesignerAssembly', 'true'
{0} - The name of the assembly</comment>
</data>
<data name="XA1035" xml:space="preserve">
<value>The 'BundleAssemblies' property is deprecated and it has no effect on the application build. Equivalent functionality is implemented by the 'AndroidUseAssemblyStore' and 'AndroidEnableAssemblyCompression' properties.</value>
<comment>The following are literal names and should not be translated: 'BundleAssemblies', 'AndroidUseAssemblyStore', 'AndroidEnableAssemblyCompression'</comment>
</data>
<data name="XA2000" xml:space="preserve">
<value>Use of AppDomain.CreateDomain() detected in assembly: {0}. .NET 6 and higher will only support a single AppDomain, so this API will no longer be available in Xamarin.Android once .NET 6 is released.</value>
<comment>The following are literal names and should not be translated: AppDomain.CreateDomain(), AppDomain
Expand Down
3 changes: 2 additions & 1 deletion src/Xamarin.Android.Build.Tasks/Tasks/BuildApk.cs
Original file line number Diff line number Diff line change
Expand Up @@ -183,9 +183,10 @@ void ExecuteWithAbi (string [] supportedAbis, string apkInputPath, string apkOut
string apkName = dex.GetMetadata ("ApkName");
string dexPath = string.IsNullOrWhiteSpace (apkName) ? Path.GetFileName (dex.ItemSpec) : apkName;
AddFileToArchiveIfNewer (apk, dex.ItemSpec, DalvikPath + dexPath, compressionMethod: dexCompressionMethod);
apk.Flush ();
}

if (EmbedAssemblies && !BundleAssemblies) {
if (EmbedAssemblies) {
AddAssemblies (apk, debug, compress, compressedAssembliesInfo, assemblyStoreApkName);
apk.Flush ();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,6 @@ public class GeneratePackageManagerJava : AndroidTask
[Required]
public string Manifest { get; set; }

[Required]
public bool IsBundledApplication { get; set; }

[Required]
public string [] SupportedAbis { get; set; }

Expand Down Expand Up @@ -375,7 +372,6 @@ void AddEnvironment ()
var appConfState = BuildEngine4.GetRegisteredTaskObjectAssemblyLocal<ApplicationConfigTaskState> (ProjectSpecificTaskObjectKey (ApplicationConfigTaskState.RegisterTaskObjectKey), RegisteredTaskObjectLifetime.Build);
var jniRemappingNativeCodeInfo = BuildEngine4.GetRegisteredTaskObjectAssemblyLocal<GenerateJniRemappingNativeCode.JniRemappingNativeCodeInfo> (ProjectSpecificTaskObjectKey (GenerateJniRemappingNativeCode.JniRemappingNativeCodeInfoKey), RegisteredTaskObjectLifetime.Build);
var appConfigAsmGen = new ApplicationConfigNativeAssemblyGenerator (environmentVariables, systemProperties, Log) {
IsBundledApp = IsBundledApplication,
UsesMonoAOT = usesMonoAOT,
UsesMonoLLVM = EnableLLVM,
UsesAssemblyPreload = environmentParser.UsesAssemblyPreload,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ public void InstallAndroidDependenciesTest ()
[TestCase ("AotAssemblies", false)]
[TestCase ("AndroidEnableProfiledAot", false)]
[TestCase ("EnableLLVM", true)]
[TestCase ("BundleAssemblies", true)]
public void GetDependencyNdkRequiredConditions (string property, bool ndkRequired)
{
var proj = new XamarinAndroidApplicationProject ();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,9 +144,7 @@ public void BuildAotApplicationWithNdkAndBundleAndÜmläüts (string supportedAb
AotAssemblies = true,
PackageName = "com.xamarin.buildaotappwithspecialchars",
};
if (!Builder.UseDotNet) {
proj.BundleAssemblies = true;
}

proj.SetProperty ("AndroidNdkDirectory", AndroidNdkPath);
proj.SetAndroidSupportedAbis (supportedAbis);
proj.SetProperty ("EnableLLVM", enableLLVM.ToString ());
Expand Down Expand Up @@ -194,12 +192,7 @@ public void BuildAotApplicationWithNdkAndBundleAndÜmläüts (string supportedAb
proj.OutputPath, $"{proj.PackageName}-Signed.apk");

var helper = new ArchiveAssemblyHelper (apk, usesAssemblyBlobs);
if (!Builder.UseDotNet) {
// BundleAssemblies=true
Assert.IsFalse (helper.Exists ("assemblies/UnnamedProject.dll"), $"UnnamedProject.dll should not be in the {proj.PackageName}-Signed.apk");
} else {
Assert.IsTrue (helper.Exists ("assemblies/UnnamedProject.dll"), $"UnnamedProject.dll should be in the {proj.PackageName}-Signed.apk");
}
Assert.IsTrue (helper.Exists ("assemblies/UnnamedProject.dll"), $"UnnamedProject.dll should be in the {proj.PackageName}-Signed.apk");
using (var zipFile = ZipHelper.OpenZip (apk)) {
Assert.IsNotNull (ZipHelper.ReadFileFromZip (zipFile,
string.Format ("lib/{0}/libaot-UnnamedProject.dll.so", abi)),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1101,63 +1101,6 @@ public void CSharp8Features ([Values (true, false)] bool bindingProject)
}
}

[Test]
[Category ("SmokeTests"), Category ("MkBundle")]
public void BuildMkBundleApplicationRelease ()
{
var proj = new XamarinAndroidApplicationProject () { IsRelease = true, BundleAssemblies = true };
proj.SetProperty ("AndroidNdkDirectory", AndroidNdkPath);
using (var b = CreateApkBuilder ("temp/BuildMkBundleApplicationRelease", false)) {
Assert.IsTrue (b.Build (proj), "Build should have succeeded.");
var assemblies = Path.Combine (Root, b.ProjectDirectory, proj.IntermediateOutputPath,
"bundles", "armeabi-v7a", "assemblies.o");
Assert.IsTrue (File.Exists (assemblies), "assemblies.o does not exist");
var libapp = Path.Combine (Root, b.ProjectDirectory, proj.IntermediateOutputPath,
"bundles", "armeabi-v7a", "libmonodroid_bundle_app.so");
Assert.IsTrue (File.Exists (libapp), "libmonodroid_bundle_app.so does not exist");
var apk = Path.Combine (Root, b.ProjectDirectory,
proj.OutputPath, $"{proj.PackageName}-Signed.apk");
using (var zipFile = ZipHelper.OpenZip (apk)) {
Assert.IsNotNull (ZipHelper.ReadFileFromZip (zipFile,
"lib/armeabi-v7a/libmonodroid_bundle_app.so"),
$"lib/armeabi-v7a/libmonodroid_bundle_app.so should be in the {proj.PackageName}-Signed.apk");
Assert.IsNull (ZipHelper.ReadFileFromZip (zipFile,
Path.Combine ("assemblies", "UnnamedProject.dll")),
$"UnnamedProject.dll should not be in the {proj.PackageName}-Signed.apk");
}
}
}

[Test]
[Category ("Minor"), Category ("MkBundle")]
public void BuildMkBundleApplicationReleaseAllAbi ()
{
var proj = new XamarinAndroidApplicationProject () { IsRelease = true, BundleAssemblies = true };
proj.SetProperty ("AndroidNdkDirectory", AndroidNdkPath);
proj.SetAndroidSupportedAbis ("armeabi-v7a", "x86");
using (var b = CreateApkBuilder ("temp/BuildMkBundleApplicationReleaseAllAbi", false)) {
Assert.IsTrue (b.Build (proj), "Build should have succeeded.");
foreach (var abi in new string [] { "armeabi-v7a", "x86" }) {
var assemblies = Path.Combine (Root, b.ProjectDirectory, proj.IntermediateOutputPath,
"bundles", abi, "assemblies.o");
Assert.IsTrue (File.Exists (assemblies), abi + " assemblies.o does not exist");
var libapp = Path.Combine (Root, b.ProjectDirectory, proj.IntermediateOutputPath,
"bundles", abi, "libmonodroid_bundle_app.so");
Assert.IsTrue (File.Exists (libapp), abi + " libmonodroid_bundle_app.so does not exist");
var apk = Path.Combine (Root, b.ProjectDirectory,
proj.OutputPath, $"{proj.PackageName}-Signed.apk");
using (var zipFile = ZipHelper.OpenZip (apk)) {
Assert.IsNotNull (ZipHelper.ReadFileFromZip (zipFile,
"lib/" + abi + "/libmonodroid_bundle_app.so"),
$"lib/{0}/libmonodroid_bundle_app.so should be in the {proj.PackageName}-Signed.apk", abi);
Assert.IsNull (ZipHelper.ReadFileFromZip (zipFile,
Path.Combine ("assemblies", "UnnamedProject.dll")),
$"UnnamedProject.dll should not be in the {proj.PackageName}-Signed.apk");
}
}
}
}

static readonly object [] BuildProguardEnabledProjectSource = new object [] {
new object [] {
/* isRelease */ false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1093,7 +1093,6 @@ public void BuildIncrementalAot (string supportedAbis, string androidAotMode, bo
var path = Path.Combine ("temp", $"BuildAotApplication_{supportedAbis}_{androidAotMode}_{aotAssemblies}_{expectedResult}");
var proj = new XamarinAndroidApplicationProject () {
IsRelease = true,
BundleAssemblies = false,
AotAssemblies = aotAssemblies,
};
if (aotAssemblies) {
Expand Down
Loading

0 comments on commit c0e4b12

Please sign in to comment.