-
Notifications
You must be signed in to change notification settings - Fork 525
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[One .NET] select defaults for App Bundles #6059
Comments
Could you make |
If we followed the same convention as .net 6 it would be |
@joj any thoughts on this from the IDE perspective? |
PR #6087 has this in progress. Changing over completely to So we are going to introduce a new property |
Fixes dotnet#6059 Users will probably want to target more than one App Store. Google is now requiring the `aab` format for Google Play Store uploads. Unfortunately this package format is not compatible with other stores. Users can build their app twice producing an `aab` for one build and `apk` for another, but we should try to make this a bit easier. `bundle-tool` has the ability to create a universal apk from the `aab` file. So lets make use of that to generate one along side the `aab`. We are introducing a new property `AndroidPackageFormats`. Under .net 6 this will have a value of `aab;apk` by default for Release builds, for Legacy it will be empty. If `AndroidPackageFormats` is specified and `AndroidPackageFormat` is empty we will use the values in `AndroidPackageFormats` to populate `AndroidPackageFormat`. If none of these values are provided the `AndroidPackageFormat` will still default to `apk` as it has always done. The following setting will produce both an `aab` and an `apk`. ``` <PropertyGroup> <AndroidPackageFormats>aab;apk</AndroidPackageFormats> </PropertyGroup> ``` This will produce just an `aab` ``` <PropertyGroup> <AndroidPackageFormats>aab</AndroidPackageFormats> </PropertyGroup> ``` and this will produce just an `apk` ``` <PropertyGroup> <AndroidPackageFormats>apk</AndroidPackageFormats> </PropertyGroup> ``` For .net 6 users this will be enabled by default for Release builds. For legacy users they will need to define the property manually.
Fixes dotnet#6059 Users will probably want to target more than one App Store. Google is now requiring the `aab` format for Google Play Store uploads. Unfortunately this package format is not compatible with other stores. Users can build their app twice producing an `aab` for one build and `apk` for another, but we should try to make this a bit easier. `bundle-tool` has the ability to create a universal apk from the `aab` file. So lets make use of that to generate one along side the `aab`. We are introducing a new property `AndroidPackageFormats`. Under .net 6 this will have a value of `aab;apk` by default for Release builds, for Legacy it will be empty. If `AndroidPackageFormats` is specified and `AndroidPackageFormat` is empty we will use the values in `AndroidPackageFormats` to populate `AndroidPackageFormat`. If none of these values are provided the `AndroidPackageFormat` will still default to `apk` as it has always done. The following setting will produce both an `aab` and an `apk`. ``` <PropertyGroup> <AndroidPackageFormats>aab;apk</AndroidPackageFormats> </PropertyGroup> ``` This will produce just an `aab` ``` <PropertyGroup> <AndroidPackageFormats>aab</AndroidPackageFormats> </PropertyGroup> ``` and this will produce just an `apk` ``` <PropertyGroup> <AndroidPackageFormats>apk</AndroidPackageFormats> </PropertyGroup> ``` For .net 6 users this will be enabled by default for Release builds. For legacy users they will need to define the property manually.
Fixes dotnet#6059 Users will probably want to target more than one App Store. Google is now requiring the `aab` format for Google Play Store uploads. Unfortunately this package format is not compatible with other stores. Users can build their app twice producing an `aab` for one build and `apk` for another, but we should try to make this a bit easier. `bundle-tool` has the ability to create a universal apk from the `aab` file. So lets make use of that to generate one along side the `aab`. We are introducing a new property `AndroidPackageFormats`. Under .net 6 this will have a value of `aab;apk` by default for Release builds, for Legacy it will be empty. If `AndroidPackageFormats` is specified and `AndroidPackageFormat` is empty we will use the values in `AndroidPackageFormats` to populate `AndroidPackageFormat`. If none of these values are provided the `AndroidPackageFormat` will still default to `apk` as it has always done. The following setting will produce both an `aab` and an `apk`. ``` <PropertyGroup> <AndroidPackageFormats>aab;apk</AndroidPackageFormats> </PropertyGroup> ``` This will produce just an `aab` ``` <PropertyGroup> <AndroidPackageFormats>aab</AndroidPackageFormats> </PropertyGroup> ``` and this will produce just an `apk` ``` <PropertyGroup> <AndroidPackageFormats>apk</AndroidPackageFormats> </PropertyGroup> ``` For .net 6 users this will be enabled by default for Release builds. For legacy users they will need to define the property manually.
Fixes dotnet#6059 Users will probably want to target more than one App Store. Google is now requiring the `aab` format for Google Play Store uploads. Unfortunately this package format is not compatible with other stores. Users can build their app twice producing an `aab` for one build and `apk` for another, but we should try to make this a bit easier. `bundle-tool` has the ability to create a universal apk from the `aab` file. So lets make use of that to generate one along side the `aab`. We are introducing a new property `AndroidPackageFormats`. Under .net 6 this will have a value of `aab;apk` by default for Release builds, for Legacy it will be empty. If `AndroidPackageFormats` is specified and `AndroidPackageFormat` is empty we will use the values in `AndroidPackageFormats` to populate `AndroidPackageFormat`. If none of these values are provided the `AndroidPackageFormat` will still default to `apk` as it has always done. The following setting will produce both an `aab` and an `apk`. ``` <PropertyGroup> <AndroidPackageFormats>aab;apk</AndroidPackageFormats> </PropertyGroup> ``` This will produce just an `aab` ``` <PropertyGroup> <AndroidPackageFormats>aab</AndroidPackageFormats> </PropertyGroup> ``` and this will produce just an `apk` ``` <PropertyGroup> <AndroidPackageFormats>apk</AndroidPackageFormats> </PropertyGroup> ``` For .net 6 users this will be enabled by default for Release builds. For legacy users they will need to define the property manually.
Fixes dotnet#6059 Users will probably want to target more than one App Store. Google is now requiring the `aab` format for Google Play Store uploads. Unfortunately this package format is not compatible with other stores. Users can build their app twice producing an `aab` for one build and `apk` for another, but we should try to make this a bit easier. `bundle-tool` has the ability to create a universal apk from the `aab` file. So lets make use of that to generate one along side the `aab`. We are introducing a new property `AndroidPackageFormats`. Under .net 6 this will have a value of `aab;apk` by default for Release builds, for Legacy it will be empty. If `AndroidPackageFormats` is specified and `AndroidPackageFormat` is empty we will use the values in `AndroidPackageFormats` to populate `AndroidPackageFormat`. If none of these values are provided the `AndroidPackageFormat` will still default to `apk` as it has always done. The following setting will produce both an `aab` and an `apk`. ``` <PropertyGroup> <AndroidPackageFormats>aab;apk</AndroidPackageFormats> </PropertyGroup> ``` This will produce just an `aab` ``` <PropertyGroup> <AndroidPackageFormats>aab</AndroidPackageFormats> </PropertyGroup> ``` and this will produce just an `apk` ``` <PropertyGroup> <AndroidPackageFormats>apk</AndroidPackageFormats> </PropertyGroup> ``` For .net 6 users this will be enabled by default for Release builds. For legacy users they will need to define the property manually.
Fixes dotnet#6059 Users will probably want to target more than one App Store. Google is now requiring the `aab` format for Google Play Store uploads. Unfortunately this package format is not compatible with other stores. Users can build their app twice producing an `aab` for one build and `apk` for another, but we should try to make this a bit easier. `bundle-tool` has the ability to create a universal apk from the `aab` file. So lets make use of that to generate one along side the `aab`. We are introducing a new property `AndroidPackageFormats`. Under .net 6 this will have a value of `aab;apk` by default for Release builds, for Legacy it will be empty. If `AndroidPackageFormats` is specified and `AndroidPackageFormat` is empty we will use the values in `AndroidPackageFormats` to populate `AndroidPackageFormat`. If none of these values are provided the `AndroidPackageFormat` will still default to `apk` as it has always done. The following setting will produce both an `aab` and an `apk`. ``` <PropertyGroup> <AndroidPackageFormats>aab;apk</AndroidPackageFormats> </PropertyGroup> ``` This will produce just an `aab` ``` <PropertyGroup> <AndroidPackageFormats>aab</AndroidPackageFormats> </PropertyGroup> ``` and this will produce just an `apk` ``` <PropertyGroup> <AndroidPackageFormats>apk</AndroidPackageFormats> </PropertyGroup> ``` For .net 6 users this will be enabled by default for Release builds. For legacy users they will need to define the property manually.
Fixes dotnet#6059 Users will probably want to target more than one App Store. Google is now requiring the `aab` format for Google Play Store uploads. Unfortunately this package format is not compatible with other stores. Users can build their app twice producing an `aab` for one build and `apk` for another, but we should try to make this a bit easier. `bundle-tool` has the ability to create a universal apk from the `aab` file. So lets make use of that to generate one along side the `aab`. We are introducing a new property `AndroidPackageFormats`. Under .net 6 this will have a value of `aab;apk` by default for Release builds, for Legacy it will be empty. If `AndroidPackageFormats` is specified and `AndroidPackageFormat` is empty we will use the values in `AndroidPackageFormats` to populate `AndroidPackageFormat`. If none of these values are provided the `AndroidPackageFormat` will still default to `apk` as it has always done. The following setting will produce both an `aab` and an `apk`. ``` <PropertyGroup> <AndroidPackageFormats>aab;apk</AndroidPackageFormats> </PropertyGroup> ``` This will produce just an `aab` ``` <PropertyGroup> <AndroidPackageFormats>aab</AndroidPackageFormats> </PropertyGroup> ``` and this will produce just an `apk` ``` <PropertyGroup> <AndroidPackageFormats>apk</AndroidPackageFormats> </PropertyGroup> ``` For .net 6 users this will be enabled by default for Release builds. For legacy users they will need to define the property manually.
Fixes dotnet#6059 Users will probably want to target more than one App Store. Google is now requiring the `aab` format for Google Play Store uploads. Unfortunately this package format is not compatible with other stores. Users can build their app twice producing an `aab` for one build and `apk` for another, but we should try to make this a bit easier. `bundle-tool` has the ability to create a universal apk from the `aab` file. So lets make use of that to generate one along side the `aab`. We are introducing a new property `AndroidPackageFormats`. Under .net 6 this will have a value of `aab;apk` by default for Release builds, for Legacy it will be empty. If `AndroidPackageFormats` is specified and `AndroidPackageFormat` is empty we will use the values in `AndroidPackageFormats` to populate `AndroidPackageFormat`. If none of these values are provided the `AndroidPackageFormat` will still default to `apk` as it has always done. The following setting will produce both an `aab` and an `apk`. ``` <PropertyGroup> <AndroidPackageFormats>aab;apk</AndroidPackageFormats> </PropertyGroup> ``` This will produce just an `aab` ``` <PropertyGroup> <AndroidPackageFormats>aab</AndroidPackageFormats> </PropertyGroup> ``` and this will produce just an `apk` ``` <PropertyGroup> <AndroidPackageFormats>apk</AndroidPackageFormats> </PropertyGroup> ``` For .net 6 users this will be enabled by default for Release builds. For legacy users they will need to define the property manually.
Fixes: #6059 Context: https://android-developers.googleblog.com/2020/11/new-android-app-bundle-and-target-api.html Context: https://blogs.windows.com/windowsexperience/2021/06/24/building-a-new-open-microsoft-store-on-windows-11/ Context: https://developer.amazon.com/blogs/appstore/post/50b1ca0f-bbec-48ec-9eea-3c395efb8f9f/amazon-appstore-to-support-android-app-bundle The Google Play Store requires Android App Bundles (`.aab` files) for all new apps as of August 2021, and for all apps in November 2021. Meanwhile, Microsoft has announced that Windows 11 will support running Android apps and installing them via the Amazon Appstore, which currently only supports `.apk` file uploads. While a Xamarin.Android user could build their app twice, changing the [`$(AndroidPackageFormat)`][0] between each build, we feel it would be "better" -- faster, more convenient -- if a single `SignAndroidPackage` target invocation could produce *both* `.aab` and `.apk` outputs. [`bundletool.jar`][1] has the ability to create a universal `.apk` from the `.aab` file. Introduce support for a new `$(AndroidPackageFormats)` (plural) MSBuild property, which is a `;`-delimited sequence of `$(AndroidPackageFormat)` values to produce as build outputs. For example, if `$(AndroidPackageFormats)`=`aab;apk`, then *both* `.aab` and `.apk` outputs will be produced. <PropertyGroup> <AndroidPackageFormats>aab;apk</AndroidPackageFormats> </PropertyGroup> The `.apk` output will be generated from the `.aab` file, ensuring consistency. In .NET 6 Debug configuration builds, `$(AndroidPackageFormats)` will default to `.apk`, as this behaves better with Fast Deployment and developer productivity. In .NET 6 Release configuration builds, `$(AndroidPackageFormats)` will default to `aab;apk`, i.e. both `.aab` and `.apk` files will be produced by default. In Legacy Xamarin.Android, `$(AndroidPackageFormats)` will not be set, and `$(AndroidPackageFormat)` will continue to default to `.apk`, meaning that only `.apk` files will be produced (this week…). [0]: https://docs.microsoft.com/en-us/xamarin/android/deploy-test/building-apps/build-properties#androidpackageformat [1]: https://developer.android.com/studio/command-line/bundletool
Fixes: #6059 Context: https://android-developers.googleblog.com/2020/11/new-android-app-bundle-and-target-api.html Context: https://blogs.windows.com/windowsexperience/2021/06/24/building-a-new-open-microsoft-store-on-windows-11/ Context: https://developer.amazon.com/blogs/appstore/post/50b1ca0f-bbec-48ec-9eea-3c395efb8f9f/amazon-appstore-to-support-android-app-bundle The Google Play Store requires Android App Bundles (`.aab` files) for all new apps as of August 2021, and for all apps in November 2021. Meanwhile, Microsoft has announced that Windows 11 will support running Android apps and installing them via the Amazon Appstore, which currently only supports `.apk` file uploads. While a Xamarin.Android user could build their app twice, changing the [`$(AndroidPackageFormat)`][0] between each build, we feel it would be "better" -- faster, more convenient -- if a single `SignAndroidPackage` target invocation could produce *both* `.aab` and `.apk` outputs. [`bundletool.jar`][1] has the ability to create a universal `.apk` from the `.aab` file. Introduce support for a new `$(AndroidPackageFormats)` (plural) MSBuild property, which is a `;`-delimited sequence of `$(AndroidPackageFormat)` values to produce as build outputs. For example, if `$(AndroidPackageFormats)`=`aab;apk`, then *both* `.aab` and `.apk` outputs will be produced. <PropertyGroup> <AndroidPackageFormats>aab;apk</AndroidPackageFormats> </PropertyGroup> The `.apk` output will be generated from the `.aab` file, ensuring consistency. In .NET 6 Debug configuration builds, `$(AndroidPackageFormats)` will default to `.apk`, as this behaves better with Fast Deployment and developer productivity. In .NET 6 Release configuration builds, `$(AndroidPackageFormats)` will default to `aab;apk`, i.e. both `.aab` and `.apk` files will be produced by default. In Legacy Xamarin.Android, `$(AndroidPackageFormats)` will not be set, and `$(AndroidPackageFormat)` will continue to default to `.apk`, meaning that only `.apk` files will be produced (this week…). [0]: https://docs.microsoft.com/en-us/xamarin/android/deploy-test/building-apps/build-properties#androidpackageformat [1]: https://developer.android.com/studio/command-line/bundletool
August 2021, Android App Bundles will be required for new apps on Google Play:
https://android-developers.googleblog.com/2020/11/new-android-app-bundle-and-target-api.html
In .NET 6, we should:
$(AndroidPackageFormat)
should default toaab
..apk
files in addition to.aab
. Enable this by default for release builds.For no. 2 to work, we should be able to generate the
.aab
as usual, then add a separate step for generating a "fat".apk
file for all architectures. This way apps could submit builds to other stores than Google Play, which might not support App Bundles yet.The text was updated successfully, but these errors were encountered: