Add support for HXCPP_ANDROID_PLATFORM define#1201
Add support for HXCPP_ANDROID_PLATFORM define#1201Simn merged 2 commits intoHaxeFoundation:masterfrom
Conversation
|
Actually, instead of hxcpp manually specifying which api version to use per ndk version, it should read the ndk's metadata to determine this, which avoids having to bump it every time and is closer to what it used to do with older ndks when it would read the |
This also deprecates the PLATFORM_NUMBER define. Also removes notes about frameworks setting minSdkVersion as this was outdated and confusing.
dcb6734 to
634c261
Compare
|
The default Later it may be a good idea if the branch for ndks older than 20 would be unified with this (in terms of the logic at least), because right now we use the maximum version there, but the minimum version for newer ndks. However, we need to use the minimum platform version that supports the given architecture. |
634c261 to
e5670cb
Compare
Instead of hardcoding default values per ndk version, it is better to read the ndk metadata to figure out the minimum version supported by the ndk.
e5670cb to
13b0afa
Compare
Originally, android min sdk version could be configured using
PLATFORM=android-xx. This was used because it was a sub directory of the android ndk: 9e716f1. Hxcpp used to extract the version from this define:hxcpp/tools/hxcpp/Setup.hx
Lines 547 to 552 in 75108a5
However, for modern ndks, PLATFORM is no longer used to resolve any directory and since #825 it is not parsed by hxcpp for ndk 20 or newer either.
This left people with no way to configure the min sdk version. To give a way of doing this again,
PLATFORM_NUMBERwas made configurable in #992. However, given that it does not have a very descriptive name this seems like it was an internal variable that should not have been exposed like this. It has also never been documented.This PR allows setting the minimum sdk version using
HXCPP_ANDROID_PLATFORM. This is a flag that was already used internally by hxcpp and has a much more descriptive name.I have therefore also deprecated the PLATFORM_NUMBER define with a warning.