rn-document-scanner-vision 1.0.5 → 1.0.7

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.
@@ -14,16 +14,38 @@ def safeExtGet(prop, fallback) {
14
14
  rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
15
15
  }
16
16
 
17
+ def resolveReactNativeDirectory() {
18
+ // Try multiple possible locations for react-native
19
+ def locations = [
20
+ // When used as a dependency in another project
21
+ "${rootProject.projectDir}/../node_modules/react-native/android",
22
+ // Fallback for monorepos
23
+ "${rootProject.projectDir}/../../node_modules/react-native/android",
24
+ // Direct parent node_modules
25
+ new File(projectDir, "../../../node_modules/react-native/android").canonicalPath
26
+ ]
27
+
28
+ for (location in locations) {
29
+ def dir = file(location)
30
+ if (dir.exists()) {
31
+ return dir
32
+ }
33
+ }
34
+ return null
35
+ }
36
+
17
37
  repositories {
18
38
  google()
19
39
  mavenCentral()
20
40
 
21
- // Add React Native's maven repository to resolve react-android
22
- // This is critical for the library to work as a dependency
23
- def reactNativeAndroidDir = file("${rootProject.projectDir}/../node_modules/react-native/android")
24
- if (reactNativeAndroidDir.exists()) {
25
- maven { url reactNativeAndroidDir }
41
+ // React Native's maven repository
42
+ def reactNativeDir = resolveReactNativeDirectory()
43
+ if (reactNativeDir != null) {
44
+ maven { url reactNativeDir }
26
45
  }
46
+
47
+ // Maven Central hosts react-android for newer RN versions
48
+ maven { url "https://repo1.maven.org/maven2/" }
27
49
  }
28
50
 
29
51
  android {
@@ -46,8 +68,8 @@ android {
46
68
  }
47
69
 
48
70
  compileOptions {
49
- sourceCompatibility JavaVersion.VERSION_11
50
- targetCompatibility JavaVersion.VERSION_11
71
+ sourceCompatibility JavaVersion.VERSION_17
72
+ targetCompatibility JavaVersion.VERSION_17
51
73
  }
52
74
 
53
75
  lint {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rn-document-scanner-vision",
3
- "version": "1.0.5",
3
+ "version": "1.0.7",
4
4
  "description": "A React Native library for scanning documents on iOS and Android",
5
5
  "main": "lib/commonjs/index.js",
6
6
  "module": "lib/module/index.js",