react-native-edgee 1.0.2 → 1.0.4

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.
@@ -1,4 +1,6 @@
1
1
  buildscript {
2
+ def kotlin_version = rootProject.ext.has("kotlinVersion") ? rootProject.ext.get("kotlinVersion") : project.properties["ReactNativeEdgee_kotlinVersion"]
3
+
2
4
  repositories {
3
5
  google()
4
6
  mavenCentral()
@@ -6,10 +8,12 @@ buildscript {
6
8
 
7
9
  dependencies {
8
10
  classpath "com.android.tools.build:gradle:7.2.1"
11
+ classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
9
12
  }
10
13
  }
11
14
 
12
15
  apply plugin: "com.android.library"
16
+ apply plugin: "kotlin-android"
13
17
 
14
18
  def getExtOrDefault(name) {
15
19
  return rootProject.ext.has(name) ? rootProject.ext.get(name) : project.properties["ReactNativeEdgee_" + name]
@@ -40,8 +44,21 @@ android {
40
44
  }
41
45
 
42
46
  compileOptions {
43
- sourceCompatibility JavaVersion.VERSION_1_8
44
- targetCompatibility JavaVersion.VERSION_1_8
47
+ def javaVersion = rootProject.ext.has("jvmTarget")
48
+ ? JavaVersion.toVersion(rootProject.ext.get("jvmTarget"))
49
+ : JavaVersion.VERSION_17
50
+ sourceCompatibility javaVersion
51
+ targetCompatibility javaVersion
52
+ }
53
+
54
+ kotlinOptions {
55
+ jvmTarget = rootProject.ext.has("jvmTarget")
56
+ ? rootProject.ext.get("jvmTarget")
57
+ : "17"
58
+ }
59
+
60
+ kotlinOptions {
61
+ jvmTarget = "1.8"
45
62
  }
46
63
  }
47
64
 
@@ -115,6 +132,9 @@ repositories {
115
132
  }
116
133
  }
117
134
 
135
+ def kotlin_version = getExtOrDefault("kotlinVersion")
136
+
118
137
  dependencies {
119
138
  implementation "com.facebook.react:react-native:+"
139
+ implementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
120
140
  }
@@ -0,0 +1,5 @@
1
+ ReactNativeEdgee_kotlinVersion=1.7.0
2
+ ReactNativeEdgee_minSdkVersion=21
3
+ ReactNativeEdgee_targetSdkVersion=31
4
+ ReactNativeEdgee_compileSdkVersion=31
5
+
@@ -7,8 +7,9 @@ const native_context_1 = require("../native-context");
7
7
  * Get comprehensive context including native device information
8
8
  */
9
9
  const getContext = async (collectDeviceId = false) => {
10
- var _a;
11
- const url = (_a = (await react_native_1.Linking.getInitialURL())) !== null && _a !== void 0 ? _a : undefined;
10
+ const initialUrl = await react_native_1.Linking.getInitialURL();
11
+ const nativeContext = await (0, native_context_1.getNativeContext)();
12
+ const url = initialUrl || `${(nativeContext === null || nativeContext === void 0 ? void 0 : nativeContext.bundleId) || "app"}://`;
12
13
  let clientContext;
13
14
  if ((0, native_context_1.isNativeModuleAvailable)()) {
14
15
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-edgee",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
4
4
  "description": "Lightweight Edgee data collection client for React Native with native context collection.",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",