RUMM-1680: Fix missing datadog-native-lib in the NDK artifact by downgrading CMake version#716
Merged
Conversation
…grading CMake version
mariusc83
approved these changes
Sep 29, 2021
xgouchet
approved these changes
Sep 30, 2021
Codecov Report
@@ Coverage Diff @@
## master #716 +/- ##
============================================
+ Coverage 88.68% 88.72% +0.04%
- Complexity 1717 1720 +3
============================================
Files 188 188
Lines 5655 5655
Branches 700 700
============================================
+ Hits 5015 5017 +2
Misses 395 395
+ Partials 245 243 -2
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.1currently.Bug leads to the wrong path of the
datadog-native-libtarget, so it is not packed in the final AAR (this happens only fordebugbuilds,releasebuilds are fine, because there is is direct dependency and not transitive throughdatadog-native-lib-testas 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)