@dynatrace/react-native-plugin 2.285.1 → 2.285.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -29,7 +29,7 @@ If you want to start using this plugin and are not a Dynatrace customer yet, hea
29
29
  ## Agent Versions
30
30
  This agent versions are configured in this plugin:
31
31
 
32
- * Android Agent: 8.285.1.1006
32
+ * Android Agent: 8.287.1.1006
33
33
  * iOS Agent: 8.285.1.1004
34
34
 
35
35
  ## Quick Setup
@@ -1296,9 +1296,10 @@ If you are struggling with a problem, submit a support ticket to Dynatrace (supp
1296
1296
  <br/><br/>
1297
1297
  ## Changelog
1298
1298
 
1299
- 2.285.1
1299
+ 2.285.2
1300
+ * Fixed bridge module issue for older React Native versions (< 0.65.0)
1300
1301
  * Introduced support for @react-native/metro-babel-transformer
1301
- * Update Android (8.285.1.1006) & iOS Agent (8.285.1.1004)
1302
+ * Update Android (8.287.1.1006) & iOS Agent (8.285.1.1004)
1302
1303
 
1303
1304
  2.283.3
1304
1305
  * Added Auto-Instrumentation for React Native Switch
@@ -70,7 +70,7 @@ repositories {
70
70
  }
71
71
 
72
72
  dependencies {
73
- implementation 'com.dynatrace.agent:agent-android:8.285.1.1006'
73
+ implementation 'com.dynatrace.agent:agent-android:8.287.1.1006'
74
74
  implementation "com.facebook.react:react-native:${safeExtGet('reactNative', '+')}"
75
75
  }
76
76
 
@@ -1,34 +1,57 @@
1
1
  package com.dynatrace.android.agent;
2
2
 
3
3
  import androidx.annotation.Nullable;
4
+ import android.util.Log;
5
+
6
+ import com.facebook.react.ReactPackage;
4
7
  import com.facebook.react.TurboReactPackage;
5
8
  import com.facebook.react.bridge.NativeModule;
6
9
  import com.facebook.react.bridge.ReactApplicationContext;
7
10
  import com.facebook.react.module.model.ReactModuleInfo;
8
11
  import com.facebook.react.module.model.ReactModuleInfoProvider;
12
+ import com.facebook.react.uimanager.ViewManager;
9
13
 
10
14
  import java.util.HashMap;
11
15
  import java.util.Map;
12
16
 
13
- public class DynatraceReactPackage extends TurboReactPackage {
17
+ import java.util.Arrays;
18
+ import java.util.Collections;
19
+ import java.util.List;
20
+
21
+ public class DynatraceReactPackage extends TurboReactPackage implements ReactPackage {
22
+
23
+ @Override
24
+ public List<ViewManager> createViewManagers(ReactApplicationContext reactContext) {
25
+ return Collections.emptyList();
26
+ }
27
+
28
+ @Override
29
+ public List<NativeModule> createNativeModules(ReactApplicationContext reactContext) {
30
+ PrivateDTBridge bridge = new PrivateDTBridge(reactContext);
31
+ return Arrays.<NativeModule>asList(new DynatraceRNBridge(reactContext, bridge), bridge);
32
+ }
14
33
 
15
34
  @Override
16
35
  public ReactModuleInfoProvider getReactModuleInfoProvider() {
17
- return () -> {
18
- final Map<String, ReactModuleInfo> moduleInfos = new HashMap<>();
19
- boolean isTurboModule = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED;
20
- moduleInfos.put(
21
- DynatraceRNBridgeImpl.NAME,
22
- new ReactModuleInfo(
23
- DynatraceRNBridgeImpl.NAME,
24
- DynatraceRNBridgeImpl.NAME,
25
- false, // canOverrideExistingModule
26
- false, // needsEagerInit
27
- true, // hasConstants
28
- false, // isCxxModule
29
- isTurboModule // isTurboModule
30
- ));
31
- return moduleInfos;
36
+ final Map<String, ReactModuleInfo> moduleInfos = new HashMap<>();
37
+ boolean isTurboModule = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED;
38
+ moduleInfos.put(
39
+ DynatraceRNBridgeImpl.NAME,
40
+ new ReactModuleInfo(
41
+ DynatraceRNBridgeImpl.NAME,
42
+ DynatraceRNBridgeImpl.NAME,
43
+ false, // canOverrideExistingModule
44
+ false, // needsEagerInit
45
+ true, // hasConstants
46
+ false, // isCxxModule
47
+ isTurboModule // isTurboModule
48
+ ));
49
+
50
+ return new ReactModuleInfoProvider() {
51
+ @Override
52
+ public Map<String, ReactModuleInfo> getReactModuleInfos() {
53
+ return moduleInfos;
54
+ }
32
55
  };
33
56
  }
34
57
 
@@ -41,5 +64,4 @@ public class DynatraceReactPackage extends TurboReactPackage {
41
64
  return null;
42
65
  }
43
66
  }
44
-
45
67
  }
@@ -1,3 +1,3 @@
1
1
  dependencies {
2
- classpath 'com.dynatrace.tools.android:gradle-plugin:8.285.1.1006'
2
+ classpath 'com.dynatrace.tools.android:gradle-plugin:8.287.1.1006'
3
3
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynatrace/react-native-plugin",
3
- "version": "2.285.1",
3
+ "version": "2.285.2",
4
4
  "description": "This plugin gives you the ability to use the Dynatrace Mobile agent in your react native application.",
5
5
  "main": "index.js",
6
6
  "types": "typings/react-native-dynatrace.d.ts",