Skip to content
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

RUMM-1680: Fix missing datadog-native-lib in the NDK artifact by downgrading CMake version #716

Merged
merged 1 commit into from
Sep 30, 2021

Conversation

0xnm
Copy link
Member

@0xnm 0xnm commented Sep 29, 2021

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 is 3.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 for debug builds, release builds are fine, because there is is direct dependency and not transitive through datadog-native-lib-test as in debug).

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 version 4.2 (and this API is available in the CMake newer than 3.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)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Make sure you discussed the feature or bugfix with the maintaining team in an Issue
  • Make sure each commit and the PR mention the Issue number (cf the CONTRIBUTING doc)

@0xnm 0xnm requested a review from a team as a code owner September 29, 2021 12:02
@codecov-commenter
Copy link

Codecov Report

Merging #716 (2663242) into master (330a8b9) will increase coverage by 0.04%.
The diff coverage is n/a.

@@             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     
Impacted Files Coverage Δ
...droid/rum/tracking/ActivityViewTrackingStrategy.kt 86.54% <0.00%> (-1.92%) ⬇️
...droid/rum/internal/domain/scope/RumSessionScope.kt 97.78% <0.00%> (-1.11%) ⬇️
...g/android/rum/internal/domain/scope/RumEventExt.kt 81.98% <0.00%> (-0.90%) ⬇️
...m/internal/domain/scope/ExternalResourceTimings.kt 67.65% <0.00%> (ø)
...g/internal/domain/event/DdSpanToSpanEventMapper.kt 91.84% <0.00%> (ø)
...l/net/info/BroadcastReceiverNetworkInfoProvider.kt 79.17% <0.00%> (ø)
...atadog/android/core/configuration/Configuration.kt 96.27% <0.00%> (+0.37%) ⬆️
...roid/rum/internal/domain/scope/RumResourceScope.kt 94.00% <0.00%> (+0.67%) ⬆️
...id/rum/internal/domain/event/RumEventSerializer.kt 92.22% <0.00%> (+1.11%) ⬆️
...oid/src/main/kotlin/com/datadog/android/Datadog.kt 78.41% <0.00%> (+1.14%) ⬆️
... and 1 more

@0xnm 0xnm merged commit 1443fe2 into master Sep 30, 2021
@0xnm 0xnm deleted the nogorodnikov/rumm-1680/downgrade_cmake_to_3.10 branch September 30, 2021 08:17
@xgouchet xgouchet added this to the 1.11.0 milestone Sep 30, 2021
@0xnm 0xnm mentioned this pull request Sep 2, 2022
3 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants