Skip to content
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
9 changes: 6 additions & 3 deletions Documentation/guides/building-apps/build-properties.md
Original file line number Diff line number Diff line change
Expand Up @@ -987,9 +987,12 @@ merging *AndroidManifest.xml* files. This is an enum-style property
where `legacy` selects the original C# implementation
and `manifestmerger.jar` selects Google's Java implementation.

The default value is currently `legacy`. This will change to
`manifestmerger.jar` in a future release to align behavior with
Android Studio.
The default value is currently `manifestmerger.jar`. If you want to
use the old version add the following to your csproj

```xml
<AndroidManifestMerger>legacy</AndroidManifestMerger>
```

Google's merger enables support for `xmlns:tools="http://schemas.android.com/tools"`
as described in the [Android documentation][manifest-merger].
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -670,6 +670,8 @@ public void AllResourcesInClassLibrary ([Values (true, false)] bool useAapt2, [V
if (Builder.UseDotNet) {
lib.RemoveProperty ("OutputType");
}
lib.AndroidManifest = lib.AndroidManifest.
Replace ("application android:label=\"${PROJECT_NAME}\"", "application android:label=\"com.test.foo\" ");

// Create an "app" that is basically empty and references the library
var app = new XamarinAndroidLibraryProject {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -755,6 +755,7 @@ public void MergeLibraryManifest ()
KnownPackages.SupportV7AppCompat_27_0_2_1,
},
};
proj.SetProperty ("AndroidManifestMerger", "legacy");
proj.Sources.Add (new BuildItem.Source ("TestActivity1.cs") {
TextContent = () => @"using System;
using System.Collections.Generic;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ Copyright (C) 2011-2012 Xamarin. All rights reserved.
<AndroidCreatePackagePerAbi Condition=" '$(AndroidCreatePackagePerAbi)' == 'aab' ">False</AndroidCreatePackagePerAbi>
<AndroidApkSigningAlgorithm Condition=" '$(AndroidApkSigningAlgorithm)' == '' ">SHA256withRSA</AndroidApkSigningAlgorithm>
<AndroidApkDigestAlgorithm Condition=" '$(AndroidApkDigestAlgorithm)' == '' ">SHA-256</AndroidApkDigestAlgorithm>
<AndroidManifestMerger Condition=" '$(AndroidManifestMerger)' == '' ">legacy</AndroidManifestMerger>
<AndroidManifestMerger Condition=" '$(AndroidManifestMerger)' == '' ">manifestmerger.jar</AndroidManifestMerger>

<!-- Default Java heap size to 1GB (-Xmx1G) if not specified-->
<JavaMaximumHeapSize Condition=" '$(JavaMaximumHeapSize)' == '' ">1G</JavaMaximumHeapSize>
Expand Down