rn-document-scanner-vision 1.0.1 → 1.0.3

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
@@ -16,13 +16,13 @@ A React Native library for scanning documents on iOS and Android. This library p
16
16
  ## Installation
17
17
 
18
18
  ```sh
19
- npm install react-native-document-scanner
19
+ npm install rn-document-scanner-vision
20
20
  ```
21
21
 
22
22
  or
23
23
 
24
24
  ```sh
25
- yarn add react-native-document-scanner
25
+ yarn add rn-document-scanner-vision
26
26
  ```
27
27
 
28
28
  ### iOS Setup
@@ -1,15 +1,39 @@
1
- plugins {
2
- id 'com.android.library'
1
+ buildscript {
2
+ repositories {
3
+ google()
4
+ mavenCentral()
5
+ }
6
+ dependencies {
7
+ classpath 'com.android.tools.build:gradle:8.4.2'
8
+ }
9
+ }
10
+
11
+ apply plugin: 'com.android.library'
12
+
13
+ def safeExtGet(prop, fallback) {
14
+ rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
15
+ }
16
+
17
+ repositories {
18
+ google()
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
+ }
3
27
  }
4
28
 
5
29
  android {
6
- compileSdk 34
30
+ compileSdk safeExtGet('compileSdkVersion', 34)
7
31
 
8
32
  namespace "com.rndocumentscanner"
9
33
 
10
34
  defaultConfig {
11
- minSdk 21
12
- targetSdk 34
35
+ minSdk safeExtGet('minSdkVersion', 21)
36
+ targetSdk safeExtGet('targetSdkVersion', 34)
13
37
  versionCode 1
14
38
  versionName "1.0"
15
39
  }
@@ -31,13 +55,11 @@ android {
31
55
  }
32
56
  }
33
57
 
34
- repositories {
35
- google()
36
- mavenCentral()
37
- }
38
-
39
58
  dependencies {
40
- implementation 'com.facebook.react:react-android'
59
+ // Use compileOnly for react-android to avoid bundling React Native
60
+ // The host app will provide the React Native runtime
61
+ compileOnly 'com.facebook.react:react-android'
62
+
41
63
  implementation "androidx.appcompat:appcompat:1.7.0"
42
64
  implementation "com.websitebeaver:documentscanner:1.3.4"
43
65
  }
@@ -0,0 +1,16 @@
1
+ pluginManagement {
2
+ repositories {
3
+ google()
4
+ mavenCentral()
5
+ gradlePluginPortal()
6
+ }
7
+ }
8
+
9
+ dependencyResolutionManagement {
10
+ repositories {
11
+ google()
12
+ mavenCentral()
13
+ }
14
+ }
15
+
16
+ rootProject.name = "rn-document-scanner-vision"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rn-document-scanner-vision",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
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",