-
Notifications
You must be signed in to change notification settings - Fork 565
[build] Use API-21 for all native builds #4584
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
Conversation
ffbd77a to
182f2c2
Compare
|
Questions (based on previous similar change in Xamarin.Android 9.3) Will the changes in this PR also automatically update the warning message for XA4216? It looks like an equivalent question is: Will the changes automatically update the Draft release note Here's a candidate release note for this change based on the release note for a previous update of the minimum compatible API level. Feel free to suggest changes or even a whole new wording. |
The warning message will be updated automatically, yes - it uses a file generated by |
182f2c2 to
345738e
Compare
345738e to
b3fb3b3
Compare
brendanzagaeski
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried out the .vsix from this PR. It looks like the XA4216 build warning does not yet appear for android:minSdkVersion below 21 with that .vsix.
Maybe it would be OK to change the way NDKMinimumApiAvailable is defined to match the values from NdkMinimumAPI? At the moment, NDKMinimumApiAvailable is still 16:
ildasm /ITEM=Xamarin.Android.Tools.XABuildConfig::NDKMinimumApiAvailable Xamarin.Android.Build.Tasks.dll
shows:
.field public static literal int32 NDKMinimumApiAvailable = int32(0x00000010)
b3fb3b3 to
8799bf8
Compare
8799bf8 to
43c8541
Compare
| new AndroidPlatformComponent ("platform-R_r02", apiLevel: "R", pkgRevision: "2"), | ||
| new AndroidPlatformComponent ("platform-28_r06", apiLevel: "28", pkgRevision: "6"), | ||
| new AndroidPlatformComponent ("platform-29_r04", apiLevel: "29", pkgRevision: "4"), | ||
| new AndroidPlatformComponent ("platform-R_r03", apiLevel: "R", pkgRevision: "3"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's not update API-R to Developer Preview 3, please. This should be done separately, as there's no guarantee that it's API compatible with DP2.
ab1aa68 to
166604c
Compare
312d272 to
9187019
Compare
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
d84a7b0 to
97b5183
Compare
168e467 to
e3ce249
Compare
brendanzagaeski
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved for both the release note and the updated behavior of the XA4216 warning. Thanks!
I checked the latest .vsix from this PR and verified that NDKMinimumApiAvailable is now 21 and that the XA4216 warning now appears as expected when android:minSdkVersion is less than 21. Looks good.
Up until this commit, we have been building the 64-bit targets (`x86-64` and `armv8-a` against NDK API 21 while the 32-bit targets (`x86` and `armv7-a`) against NDK API 16. This commit changes it so that all targets build against API 21. This gives us the ability to speed up Debug builds on 32-bit platforms via use of POSIX APIs for directory traversal that are available starting from API 21 onwards (`openat` and `fstatat`). The switch to API 21 was initially planned for .NET5 but there's no harm in making the change now. In addition, this commit updates versions of several components: * Bump emulator version to 30.0.5 * Bump NDK version to 21b (21.1.6352462) * Bump x86 system image revision to 7 Also, `XABuildConfig.NDKMinimumApiAvailable` is now set to the minimum supported NDK API level instead of the minimum API level *installed* by the NDK.
e3ce249 to
e3e2d6c
Compare
Previously, we built the 64-bit targets (`x86-64` and `arm64-v8a`) against NDK API-21 and the32-bit targets (`x86` and `armeabi-v7a`) against NDK API-16. Update so that all targets build against API-21. This gives us the ability to speed up on-device app startup of Debug- configuration builds on 32-bit platforms by using POSIX APIs for directory traversal that are available starting from API-21 onwards ([**openat**(2)][0] and [**fstatat**(2)][1]). The switch to API-21 was initially planned for .NET5 but there's no significant harm in making the change now. In addition, this commit updates versions of several components: * Bump emulator version to 30.0.5 * Bump NDK version to 21b (21.1.6352462) * Bump x86 system image revision to 7 Also, `XABuildConfig.NDKMinimumApiAvailable` is now set to the minimum supported NDK API level instead of the minimum API level *installed* by the NDK. TODO: This commit knowingly breaks some unit tests, e.g. `Xamarin.Android.Build.Tests.BuildTest.BuildMultiDexApplication()`. These will be fixed in a later commit. [0]: https://linux.die.net/man/2/openat [1]: https://linux.die.net/man/2/fstatat
This reverts commit f852c60.
This reverts commit a648981.
Context: https://docs.microsoft.com/en-us/xamarin/get-started/supported-platforms?tabs=windows Context: https://github.com/dotnet/maui#xamarinforms-vs-net-maui This reverts commit a648981. Xamarin.Forms advertises a supported minimum API level of API-19, which commit a648981 removed support for. This change complicates the life of the Xamarin.Forms team. We will eventually drop support for API-19 -- certainly as part of .NET 5/6 -- but for now preserve API-19 compatibility.
Context: https://docs.microsoft.com/en-us/xamarin/get-started/supported-platforms?tabs=windows Context: https://github.com/dotnet/maui#xamarinforms-vs-net-maui This reverts commit a648981. Xamarin.Forms advertises a supported minimum API level of API-19, which commit a648981 removed support for. This change complicates the life of the Xamarin.Forms team. We will eventually drop support for API-19 -- certainly as part of .NET 5/6 -- but for now preserve API-19 compatibility.
Context: https://docs.microsoft.com/en-us/xamarin/get-started/supported-platforms?tabs=windows Context: https://github.com/dotnet/maui#xamarinforms-vs-net-maui This reverts commit a648981. Xamarin.Forms advertises a supported minimum API level of API-19, which commit a648981 removed support for. This change complicates the life of the Xamarin.Forms team. We will eventually drop support for API-19 -- certainly as part of .NET 5/6 -- but for now preserve API-19 compatibility.
Up until this commit, we have been building the 64-bit targets (
x86-64and
armv8-aagainst NDK API 21 while the 32-bit targets (x86andarmv7-a) against NDK API 16. This commit changes it so that alltargets build against API 21. This gives us the ability to speed up
Debug builds on 32-bit platforms via use of POSIX APIs for directory
traversal that are available starting from API 21 onwards (
openatandfstatat). The switch to API 21 was initially planned for .NET5 butthere's no harm in making the change now.
In addition, this commit updates versions of several components:
Also,
XABuildConfig.NDKMinimumApiAvailableis now set to the minimumsupported NDK API level instead of the minimum API level installed by
the NDK.