Skip to content

Commit 6e375d5

Browse files
Context: https://github.com/google/bundletool/releases/tag/1.15.1 Changes: google/bundletool@1.8.1...1.15.1 We are seeing an error with API 34: XABBA7024: Xamarin.Tools.Zip.ZipIOException: The file 'obj\Release\android\bin\base.zip' is not a ZIP archive. We wonder if updating `bundletool` will help. It was last updated in 989dc07. * [tests] Update `ManifestTest.cs` Context: https://github.com/xamarin/xamarin-android/blob/f1d59181c8daaa8d2abcdfd151b592ece49155ca/src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/ManifestTest.cs#L650-L651 The `ModifyManifest` test actually writes "too much" to the `AndroidManifest.xml` file, removing the `<application>` element, causing the latest version of `bundletool` to error with: BT One element <application> was expected, but none were found. To solve this, let's update the test to not overwrite any existing XML content.
1 parent ad95b98 commit 6e375d5

File tree

3 files changed

+9
-10
lines changed

3 files changed

+9
-10
lines changed

Configuration.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@
148148
<XAPlatformToolsPackagePrefix Condition=" '$(HostOS)' == 'Darwin' "></XAPlatformToolsPackagePrefix>
149149
<XAPlatformToolsVersion>34.0.1</XAPlatformToolsVersion>
150150
<XAIncludeProprietaryBits Condition="'$(XAIncludeProprietaryBits)' == ''">False</XAIncludeProprietaryBits>
151-
<XABundleToolVersion Condition="'$(XABundleToolVersion)' == ''">1.8.1</XABundleToolVersion>
151+
<XABundleToolVersion Condition="'$(XABundleToolVersion)' == ''">1.15.1</XABundleToolVersion>
152152
<XAPackagesDir Condition=" '$(XAPackagesDir)' == '' And '$(NUGET_PACKAGES)' != ''">$(NUGET_PACKAGES)</XAPackagesDir>
153153
<XAPackagesDir Condition=" '$(XAPackagesDir)' == '' And '$(HostOS)' == 'Windows'">$(userprofile)\.nuget\packages</XAPackagesDir>
154154
<XAPackagesDir Condition=" '$(XAPackagesDir)' == '' And '$(HostOS)' != 'Windows'">$(HOME)/.nuget/packages</XAPackagesDir>

Documentation/release-notes/bundletool-1.8.1.md

Lines changed: 0 additions & 8 deletions
This file was deleted.

src/Xamarin.Android.Build.Tasks/Tests/Xamarin.Android.Build.Tests/ManifestTest.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -669,9 +669,16 @@ public void ModifyManifest ([Values (true, false)] bool isRelease)
669669
<_Permissions Include=""&lt;uses-permission android:name=&quot;android.permission.READ_CONTACTS&quot; /&gt;"" />
670670
</ItemGroup>
671671
<Target Name=""_Foo"">
672+
<XmlPeek Query=""/manifest/*"" XmlInputPath=""$(IntermediateOutputPath)android\AndroidManifest.xml"">
673+
<Output TaskParameter=""Result"" ItemName=""_XmlNodes"" />
674+
</XmlPeek>
675+
<PropertyGroup>
676+
<_ExistingXml>@(_XmlNodes, ' ')</_ExistingXml>
677+
<_NewXml>@(_Permissions, ' ')</_NewXml>
678+
</PropertyGroup>
672679
<XmlPoke
673680
XmlInputPath=""$(IntermediateOutputPath)android\AndroidManifest.xml""
674-
Value=""@(_Permissions)""
681+
Value=""$(_ExistingXml)$(_NewXml)""
675682
Query=""/manifest""
676683
Namespaces=""$(Namespace)""
677684
/>

0 commit comments

Comments
 (0)