RUMM-1680: Fix missing datadog-native-lib in the NDK artifact by downgrading CMake version #716
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this PR do?
CMake has a bug in the File API, which is fixed in the version
3.20.4
. But, unfortunately, we cannot use this version, because latest version available in the Android SDK Manager is3.18.1
currently.Bug leads to the wrong path of the
datadog-native-lib
target, so it is not packed in the final AAR (this happens only fordebug
builds,release
builds are fine, because there is is direct dependency and not transitive throughdatadog-native-lib-test
as indebug
).This change downgrades CMake to version
3.10.2
, which has no File API, so AGP is using another way to figure out the target path. AGP is using CMake File API starting from the version4.2
(and this API is available in the CMake newer than3.14.0
, see here).Another solution is to use custom CMake distribution, not via Android SDK Manager, but then we would need to install CMake + Ninja manually in the build environment.
Review checklist (to be filled by reviewers)