Skip to content

Commit

Permalink
Merge pull request #718 from DataDog/marcosaia/RUM-5918/update-dd-sdks
Browse files Browse the repository at this point in the history
[RUM-5918] Update native Datadog SDKs
  • Loading branch information
marco-saia-datadog authored Oct 10, 2024
2 parents 180316b + 52622f4 commit 3f7d633
Show file tree
Hide file tree
Showing 50 changed files with 1,106 additions and 602 deletions.
3 changes: 0 additions & 3 deletions example-new-architecture/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ android {
dependencies {
// The version of react-native is set by the React Native Gradle Plugin
implementation("com.facebook.react:react-android")
implementation("com.facebook.react:flipper-integration")

if (hermesEnabled.toBoolean()) {
implementation("com.facebook.react:hermes-android")
Expand All @@ -113,5 +112,3 @@ dependencies {
}
}
}

apply from: file("../../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesAppBuildGradle(project)
4 changes: 2 additions & 2 deletions example-new-architecture/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
buildscript {
ext {
buildToolsVersion = "34.0.0"
minSdkVersion = 21
minSdkVersion = 23
compileSdkVersion = 34
targetSdkVersion = 34
ndkVersion = "25.1.8937393"
kotlinVersion = "1.8.0"
kotlinVersion = "1.8.21"
}
repositories {
google()
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-all.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
14 changes: 7 additions & 7 deletions example-new-architecture/android/gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -145,15 +145,15 @@ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC2039,SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC3045
# shellcheck disable=SC2039,SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
Expand Down Expand Up @@ -202,11 +202,11 @@ fi
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'

# Collect all arguments for the java command;
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
# shell script including quotes and variable substitutions, so put them in
# double quotes to make sure that they get re-expanded; and
# * put everything else in single quotes, so that it's not re-expanded.
# Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.

set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
Expand Down
20 changes: 10 additions & 10 deletions example-new-architecture/android/gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,11 @@ set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute

echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2

goto fail

Expand All @@ -57,11 +57,11 @@ set JAVA_EXE=%JAVA_HOME%/bin/java.exe

if exist "%JAVA_EXE%" goto execute

echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2

goto fail

Expand Down
1 change: 0 additions & 1 deletion example-new-architecture/android/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
rootProject.name = 'DdSdkReactNativeExample'
apply from: file("../node_modules/@react-native-community/cli-platform-android/native_modules.gradle"); applyNativeModulesSettingsGradle(settings)
include ':app'
includeBuild('../node_modules/@react-native/gradle-plugin')
54 changes: 27 additions & 27 deletions example-new-architecture/ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
PODS:
- boost (1.83.0)
- DatadogCore (2.14.2):
- DatadogInternal (= 2.14.2)
- DatadogCrashReporting (2.14.2):
- DatadogInternal (= 2.14.2)
- DatadogCore (2.16.0):
- DatadogInternal (= 2.16.0)
- DatadogCrashReporting (2.16.0):
- DatadogInternal (= 2.16.0)
- PLCrashReporter (~> 1.11.2)
- DatadogInternal (2.14.2)
- DatadogLogs (2.14.2):
- DatadogInternal (= 2.14.2)
- DatadogRUM (2.14.2):
- DatadogInternal (= 2.14.2)
- DatadogInternal (2.16.0)
- DatadogLogs (2.16.0):
- DatadogInternal (= 2.16.0)
- DatadogRUM (2.16.0):
- DatadogInternal (= 2.16.0)
- DatadogSDKReactNative (2.4.3):
- DatadogCore (~> 2.14.1)
- DatadogCrashReporting (~> 2.14.1)
- DatadogLogs (~> 2.14.1)
- DatadogRUM (~> 2.14.1)
- DatadogTrace (~> 2.14.1)
- DatadogWebViewTracking (~> 2.14.1)
- DatadogCore (~> 2.16.0)
- DatadogCrashReporting (~> 2.16.0)
- DatadogLogs (~> 2.16.0)
- DatadogRUM (~> 2.16.0)
- DatadogTrace (~> 2.16.0)
- DatadogWebViewTracking (~> 2.16.0)
- DoubleConversion
- glog
- hermes-engine
Expand All @@ -37,11 +37,11 @@ PODS:
- ReactCommon/turbomodule/bridging
- ReactCommon/turbomodule/core
- Yoga
- DatadogTrace (2.14.2):
- DatadogInternal (= 2.14.2)
- DatadogTrace (2.16.0):
- DatadogInternal (= 2.16.0)
- OpenTelemetrySwiftApi (= 1.6.0)
- DatadogWebViewTracking (2.14.2):
- DatadogInternal (= 2.14.2)
- DatadogWebViewTracking (2.16.0):
- DatadogInternal (= 2.16.0)
- DoubleConversion (1.1.6)
- FBLazyVector (0.74.3)
- fmt (9.1.0)
Expand Down Expand Up @@ -1398,14 +1398,14 @@ EXTERNAL SOURCES:

SPEC CHECKSUMS:
boost: d3f49c53809116a5d38da093a8aa78bf551aed09
DatadogCore: a3429f62b7da0e715e179833b3daa0203ba2a5ad
DatadogCrashReporting: 3b5e496c1f61971a93b9a1bff3312297be03f031
DatadogInternal: 11798eea970f195ad720168f9a51712e71affe33
DatadogLogs: 4192cc1979467ce0c2521d73ba92b6197e0c7f06
DatadogRUM: f732009eba7a848d6e2df9ef12944e30f0e94ba2
DatadogSDKReactNative: 91b9ecf292540bfec52c6c8bcfdc05cf475124a6
DatadogTrace: 5687191622d91152f10616e206500fe5acd8a342
DatadogWebViewTracking: cb818ee5943de63940b4f536320361c17af0f7b1
DatadogCore: 4cf2a1fe0e60ebcb12a459328f652da6268de140
DatadogCrashReporting: 380f559499c2d2171c40ddfbf9d4206f772fdca1
DatadogInternal: 67742f9aac1b123f5bda9d6e3bb22ab1773fda0b
DatadogLogs: 1278623e6235c5fff7e68d0d4914cee11d828f8d
DatadogRUM: 4bac99a16de3c1ebebd9a1c3e6361cf1b13da83c
DatadogSDKReactNative: 504a6a06c57a0a91b48c5e6e053859a189e0caf1
DatadogTrace: 7ac25fb96a022159f6cba44fa88c68569c984da8
DatadogWebViewTracking: a8cac9ca5d3aa3c2ace3fbe6072dfd77425deae8
DoubleConversion: 76ab83afb40bddeeee456813d9c04f67f78771b5
FBLazyVector: 7e977dd099937dc5458851233141583abba49ff2
fmt: 4c2741a687cc09f0634a2e2c72a838b99f1ff120
Expand Down
1 change: 1 addition & 0 deletions example-new-architecture/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"@babel/runtime": "^7.20.0",
"@react-native/babel-preset": "0.74.85",
"@react-native/eslint-config": "0.74.85",
"@react-native/gradle-plugin": "^0.74.1",
"@react-native/metro-config": "0.74.85",
"@react-native/typescript-config": "0.74.85",
"@types/react": "^18.2.6",
Expand Down
3 changes: 1 addition & 2 deletions example/android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ react {
// bundleAssetName = "MyApplication.android.bundle"
//
// The entry file for bundle generation. Default is 'index.android.js' or 'index.js'
// entryFile = file("../js/MyApplication.android.js")
entryFile = file("../../index.tsx")
//
// A list of extra flags to pass to the 'bundle' commands.
// See https://github.com/react-native-community/cli/blob/main/docs/commands.md#bundle
Expand Down Expand Up @@ -109,7 +109,6 @@ android {
dependencies {
// The version of react-native is set by the React Native Gradle Plugin
implementation("com.facebook.react:react-android")
implementation("com.facebook.react:flipper-integration")

if (hermesEnabled.toBoolean()) {
implementation("com.facebook.react:hermes-android")
Expand Down
4 changes: 2 additions & 2 deletions example/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
buildscript {
ext {
buildToolsVersion = "34.0.0"
minSdkVersion = 21
minSdkVersion = 23
compileSdkVersion = 34
targetSdkVersion = 34
ndkVersion = "25.1.8937393"
kotlinVersion = "1.8.0"
kotlinVersion = "1.8.21"
}
repositories {
google()
Expand Down
Binary file modified example/android/gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
78 changes: 39 additions & 39 deletions example/ios/Podfile.lock
Original file line number Diff line number Diff line change
@@ -1,47 +1,47 @@
PODS:
- boost (1.83.0)
- DatadogCore (2.14.2):
- DatadogInternal (= 2.14.2)
- DatadogCrashReporting (2.14.2):
- DatadogInternal (= 2.14.2)
- DatadogCore (2.18.0):
- DatadogInternal (= 2.18.0)
- DatadogCrashReporting (2.18.0):
- DatadogInternal (= 2.18.0)
- PLCrashReporter (~> 1.11.2)
- DatadogInternal (2.14.2)
- DatadogLogs (2.14.2):
- DatadogInternal (= 2.14.2)
- DatadogRUM (2.14.2):
- DatadogInternal (= 2.14.2)
- DatadogInternal (2.18.0)
- DatadogLogs (2.18.0):
- DatadogInternal (= 2.18.0)
- DatadogRUM (2.18.0):
- DatadogInternal (= 2.18.0)
- DatadogSDKReactNative (2.4.3):
- DatadogCore (~> 2.14.1)
- DatadogCrashReporting (~> 2.14.1)
- DatadogLogs (~> 2.14.1)
- DatadogRUM (~> 2.14.1)
- DatadogTrace (~> 2.14.1)
- DatadogWebViewTracking (~> 2.14.1)
- DatadogCore (~> 2.18.0)
- DatadogCrashReporting (~> 2.18.0)
- DatadogLogs (~> 2.18.0)
- DatadogRUM (~> 2.18.0)
- DatadogTrace (~> 2.18.0)
- DatadogWebViewTracking (~> 2.18.0)
- React-Core
- DatadogSDKReactNative/Tests (2.4.3):
- DatadogCore (~> 2.14.1)
- DatadogCrashReporting (~> 2.14.1)
- DatadogLogs (~> 2.14.1)
- DatadogRUM (~> 2.14.1)
- DatadogTrace (~> 2.14.1)
- DatadogWebViewTracking (~> 2.14.1)
- DatadogCore (~> 2.18.0)
- DatadogCrashReporting (~> 2.18.0)
- DatadogLogs (~> 2.18.0)
- DatadogRUM (~> 2.18.0)
- DatadogTrace (~> 2.18.0)
- DatadogWebViewTracking (~> 2.18.0)
- React-Core
- DatadogSDKReactNativeSessionReplay (2.4.3-alpha.0):
- DatadogSDKReactNative
- DatadogSessionReplay (~> 2.14.1)
- DatadogSessionReplay (~> 2.18.0)
- React-Core
- DatadogSDKReactNativeSessionReplay/Tests (2.4.3-alpha.0):
- DatadogSDKReactNative
- DatadogSessionReplay (~> 2.14.1)
- DatadogSessionReplay (~> 2.18.0)
- React-Core
- React-RCTText
- DatadogSessionReplay (2.14.2):
- DatadogInternal (= 2.14.2)
- DatadogTrace (2.14.2):
- DatadogInternal (= 2.14.2)
- DatadogSessionReplay (2.18.0):
- DatadogInternal (= 2.18.0)
- DatadogTrace (2.18.0):
- DatadogInternal (= 2.18.0)
- OpenTelemetrySwiftApi (= 1.6.0)
- DatadogWebViewTracking (2.14.2):
- DatadogInternal (= 2.14.2)
- DatadogWebViewTracking (2.18.0):
- DatadogInternal (= 2.18.0)
- DoubleConversion (1.1.6)
- FBLazyVector (0.74.3)
- fmt (9.1.0)
Expand Down Expand Up @@ -1471,16 +1471,16 @@ EXTERNAL SOURCES:

SPEC CHECKSUMS:
boost: d3f49c53809116a5d38da093a8aa78bf551aed09
DatadogCore: a3429f62b7da0e715e179833b3daa0203ba2a5ad
DatadogCrashReporting: 3b5e496c1f61971a93b9a1bff3312297be03f031
DatadogInternal: 11798eea970f195ad720168f9a51712e71affe33
DatadogLogs: 4192cc1979467ce0c2521d73ba92b6197e0c7f06
DatadogRUM: f732009eba7a848d6e2df9ef12944e30f0e94ba2
DatadogSDKReactNative: f418f95923dc78ad7b4dcd1710804f1672d8abfa
DatadogSDKReactNativeSessionReplay: 5120a9df176bc6cf49d33237e078d99c8b1c3b24
DatadogSessionReplay: a5df3975d9cd0acec876e98bbfc64dd85e21b888
DatadogTrace: 5687191622d91152f10616e206500fe5acd8a342
DatadogWebViewTracking: cb818ee5943de63940b4f536320361c17af0f7b1
DatadogCore: 24f3bf4daa04949ef98b706ec4d4cb3cfde5443c
DatadogCrashReporting: 1a16f982c569f0d7058779a4540d4506002c89c6
DatadogInternal: 4719225e5e3a5550a52196930cecdf2a589820b2
DatadogLogs: 0365989aebbf3d0c7cb7346cf2bbb932c0eacc01
DatadogRUM: 8461273acc87ddfe4a8bbc6e6672ae9542471f86
DatadogSDKReactNative: 18393899c440460e72428b7bb70ceb6ce7b26ae6
DatadogSDKReactNativeSessionReplay: be2fab2b7ae689cc9e4c3b0e7e6d11bce1bb99f3
DatadogSessionReplay: c08f0df752e916639b04251eb3bf06dcda80591a
DatadogTrace: cc8ae210c274aa40658da83c9cc15de85bde405a
DatadogWebViewTracking: eeb8ea3fa13983752d2cc4dc0994664bf8388e15
DoubleConversion: 76ab83afb40bddeeee456813d9c04f67f78771b5
FBLazyVector: 7e977dd099937dc5458851233141583abba49ff2
fmt: 4c2741a687cc09f0634a2e2c72a838b99f1ff120
Expand Down
9 changes: 6 additions & 3 deletions example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"scripts": {
"android": "react-native run-android",
"ios": "react-native run-ios",
"start": "react-native start"
"start": "react-native start",
"postinstall": "patch-package"
},
"dependencies": {
"@datadog/mobile-react-native": "workspace:packages/core",
Expand All @@ -22,7 +23,7 @@
"react-native": "0.74.3",
"react-native-crash-tester": "0.2.2",
"react-native-gesture-handler": "^1.10.1",
"react-native-navigation": "7.38.2",
"react-native-navigation": "7.40.1",
"react-native-safe-area-context": "4.10.8",
"react-native-screens": "3.29.0"
},
Expand All @@ -35,7 +36,9 @@
"@react-native/eslint-config": "0.74.85",
"@react-native/metro-config": "0.74.85",
"@react-native/typescript-config": "0.74.85",
"babel-plugin-module-resolver": "^4.0.0"
"@rnx-kit/metro-resolver-symlinks": "^0.1.36",
"babel-plugin-module-resolver": "^4.0.0",
"patch-package": "^8.0.0"
},
"engines": {
"node": ">=18"
Expand Down
19 changes: 19 additions & 0 deletions example/patches/react-native-navigation+7.40.1.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
diff --git a/node_modules/react-native-navigation/lib/android/app/src/main/java/com/reactnativenavigation/utils/ReactTypefaceUtils.java b/node_modules/react-native-navigation/lib/android/app/src/main/java/com/reactnativenavigation/utils/ReactTypefaceUtils.java
index 834d734..7d90437 100644
--- a/node_modules/react-native-navigation/lib/android/app/src/main/java/com/reactnativenavigation/utils/ReactTypefaceUtils.java
+++ b/node_modules/react-native-navigation/lib/android/app/src/main/java/com/reactnativenavigation/utils/ReactTypefaceUtils.java
@@ -96,12 +96,12 @@ public class ReactTypefaceUtils {

int want = 0;
if ((weight == Typeface.BOLD)
- || ((oldStyle & Typeface.BOLD) != 0 && weight == ReactTextShadowNode.UNSET)) {
+ || ((oldStyle & Typeface.BOLD) != 0)) {
want |= Typeface.BOLD;
}

if ((style == Typeface.ITALIC)
- || ((oldStyle & Typeface.ITALIC) != 0 && style == ReactTextShadowNode.UNSET)) {
+ || ((oldStyle & Typeface.ITALIC) != 0)) {
want |= Typeface.ITALIC;
}

Loading

0 comments on commit 3f7d633

Please sign in to comment.