Skip to content

Commit

Permalink
Doc rework
Browse files Browse the repository at this point in the history
  • Loading branch information
dellis1972 committed Jul 16, 2021
1 parent 3c6cf6b commit 66bb43b
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 21 deletions.
14 changes: 0 additions & 14 deletions Documentation/guides/app-bundles.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,20 +156,6 @@ device-specific APK set to be deployed. It would make sense, in a
given Xamarin.Android `.csproj` file to use `apk` for `Debug` builds
and `aab` for `Release` builds.

If you are targeting other stores in addition to the Google Play Store
you can make use of the `AndroidAdditionalPackageFormats` property to
generate a universal `apk` along side the `aab` file. This will allow
you do publish the same build on multiple stores.

```
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<AndroidPackageFormat>aab</AndroidPackageFormat>
<AndroidAdditionalPackageFormats>apk</AndroidAdditionalPackageFormats>
</PropertyGroup>
```

`AndroidAdditionalPackageFormats` is set to `apk` by default for .net 6.

## aapt2

The first requirement is that App Bundles require a special protobuf
Expand Down
27 changes: 20 additions & 7 deletions Documentation/guides/building-apps/build-properties.md
Original file line number Diff line number Diff line change
Expand Up @@ -908,16 +908,29 @@ properties are set, which are required for Android App Bundles:
[apk]: https://en.wikipedia.org/wiki/Android_application_package
[bundle]: https://developer.android.com/platform/technology/app-bundle

## AndroidAdditionalPackageFormats
This property will be deprecated for .net 6. Users should switch over to
the newer [`AndroidPackageFormats`](~/android/deploy-test/building-apps/build-properties.md#androidpackageformats).

An enum-style property with valid values of `apk`.
When targeting `aab` `AndroidPackageFormat` you might want to
also generate an `apk` for distribution to other stores.
## AndroidPackageFormats

when `AndroidAdditionalPackageFormats` is set to `apk` a universal
`apk` will be generated along side the `aab` file.
An semi-colon delimited property with valid values of `apk` and `aab`.
This indicates if you want to package the Android application as
an [APK file][apk] or [Android App Bundle][bundle]. App Bundles
are a new format for `Release` builds that are intended for
submission on Google Play.

This is enabled by default for .net 6.
When building a Release build you might want to generate both
and `aab` and an `apk` for distribution to various stores.

Setting `AndroidPackageFormats` to `aab;apk` will result in both
being generated. Setting `AndroidPackageFormats` to either `aab`
or `apk` will generate only one file.

For .net 6 `AndroidPackageFormats` will be set to `aab;apk` for
`Release` builds only. It is recommended that you continue to use
just `apk` for debugging.

For Legacy Xamarin.Android this value currently defaults to `apk`.

Added in Xamarin.Android 11.5.

Expand Down

0 comments on commit 66bb43b

Please sign in to comment.