rn-document-scanner-vision 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.
@@ -10,19 +10,30 @@ buildscript {
10
10
 
11
11
  apply plugin: 'com.android.library'
12
12
 
13
+ def safeExtGet(prop, fallback) {
14
+ rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
15
+ }
16
+
13
17
  repositories {
14
18
  google()
15
19
  mavenCentral()
20
+
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 }
26
+ }
16
27
  }
17
28
 
18
29
  android {
19
- compileSdk 34
30
+ compileSdk safeExtGet('compileSdkVersion', 34)
20
31
 
21
32
  namespace "com.rndocumentscanner"
22
33
 
23
34
  defaultConfig {
24
- minSdk 21
25
- targetSdk 34
35
+ minSdk safeExtGet('minSdkVersion', 21)
36
+ targetSdk safeExtGet('targetSdkVersion', 34)
26
37
  versionCode 1
27
38
  versionName "1.0"
28
39
  }
@@ -47,7 +58,8 @@ android {
47
58
  dependencies {
48
59
  // Use compileOnly for react-android to avoid bundling React Native
49
60
  // The host app will provide the React Native runtime
50
- compileOnly 'com.facebook.react:react-android'
61
+ // compileOnly 'com.facebook.react:react-android'
62
+ implementation("com.facebook.react:react-android:+")
51
63
 
52
64
  implementation "androidx.appcompat:appcompat:1.7.0"
53
65
  implementation "com.websitebeaver:documentscanner:1.3.4"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rn-document-scanner-vision",
3
- "version": "1.0.2",
3
+ "version": "1.0.4",
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",