Commit d794534
authored
[Xamarin.Android.Build.Tasks] Add Support for AndroidManifest.xml overlays (#5325)
Fixes #5312
The manifest merger tool supports providing additional AndroidManifest.xml
files which will `overlay` on top of the final file. This commit adds a
new Build Action `AndroidManifestOverlay` which can be used to provide
these files to the manifest merger.
Users can now use these overlay files to alter the manifest during
build time. This can be for adding new permissions or even removing
ones that are not needed. It will also allow for different manifest
files to be generated for debug/release configurations. This can be
done by conditionally including `overlay` files depending on the
`$(Configuration)`.
```
<ItemGroup>
<AndroidManifestOverlay Include="DebugPermissions.xml" Condition=" '$(Configuration)' == 'Debug' " />
</ItemGroup>
```1 parent a3d4d19 commit d794534
File tree
3 files changed
+59
-0
lines changed- Documentation/guides/building-apps
- src/Xamarin.Android.Build.Tasks
- Tests/Xamarin.Android.Build.Tests
3 files changed
+59
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
89 | 119 | | |
90 | 120 | | |
91 | 121 | | |
| |||
Lines changed: 27 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
153 | 180 | | |
154 | 181 | | |
155 | 182 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
| 174 | + | |
174 | 175 | | |
175 | 176 | | |
176 | 177 | | |
| |||
1442 | 1443 | | |
1443 | 1444 | | |
1444 | 1445 | | |
| 1446 | + | |
1445 | 1447 | | |
1446 | 1448 | | |
1447 | 1449 | | |
| |||
0 commit comments