scandit-capacitor-datacapture-barcode 8.1.1 → 8.2.0
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/ScanditCapacitorDatacaptureBarcode.podspec +1 -1
- package/android/build.gradle +71 -23
- package/android/src/main/java/com/scandit/capacitor/datacapture/barcode/ScanditBarcodeNative.java +593 -0
- package/android/src/main/java/com/scandit/capacitor/datacapture/barcode/ar/BarcodeArViewHandler.java +146 -0
- package/android/src/main/java/com/scandit/capacitor/datacapture/barcode/count/BarcodeCountViewHandler.java +143 -0
- package/android/src/main/java/com/scandit/capacitor/datacapture/barcode/find/BarcodeFindViewHandler.java +181 -0
- package/android/src/main/java/com/scandit/capacitor/datacapture/barcode/pick/BarcodePickViewHandler.java +152 -0
- package/dist/barcode.js +5271 -1377
- package/dist/barcode.js.map +1 -1
- package/dist/dts/definitions.d.ts +35 -8
- package/dist/dts/ts/BarcodeArView.d.ts +57 -0
- package/dist/dts/ts/BarcodeBatchAdvancedOverlay.d.ts +1 -0
- package/dist/dts/ts/BarcodeFindView.d.ts +1 -0
- package/dist/dts/web.d.ts +1 -3
- package/dist/index.js +562 -316
- package/dist/index.js.map +1 -1
- package/ios/Sources/ScanditCapacitorBarcode/BarcodeArViewHandler.swift +146 -0
- package/ios/Sources/ScanditCapacitorBarcode/BarcodeCountViewHandler.swift +11 -0
- package/ios/Sources/ScanditCapacitorBarcode/BarcodeFindViewHandler.swift +43 -25
- package/ios/Sources/ScanditCapacitorBarcode/BarcodePickViewHandler.swift +11 -8
- package/ios/Sources/ScanditCapacitorBarcode/ScanditBarcodeCapture.swift +293 -1910
- package/package.json +7 -7
- package/android/src/main/java/com/scandit/capacitor/datacapture/barcode/ScanditBarcodeNative.kt +0 -1569
- package/android/src/main/java/com/scandit/capacitor/datacapture/barcode/count/BarcodeCountViewHandler.kt +0 -137
- package/android/src/main/java/com/scandit/capacitor/datacapture/barcode/factories/BarcodeCaptureActionFactory.kt +0 -13
- package/android/src/main/java/com/scandit/capacitor/datacapture/barcode/find/BarcodeFindViewHandler.kt +0 -166
- package/android/src/main/java/com/scandit/capacitor/datacapture/barcode/pick/BarcodePickViewHandler.kt +0 -136
- package/android/src/main/java/com/scandit/capacitor/datacapture/barcode/utils/AdvancedOverlayViewSerialization.kt +0 -89
- package/ios/Sources/ScanditCapacitorBarcode/BlockingCallbackResults.swift +0 -73
- package/ios/Sources/ScanditCapacitorBarcode/CommandJSONArgument+ScanditBarcodeCapture.swift +0 -70
- package/ios/Sources/ScanditCapacitorBarcode/TappableBase64ImageView.swift +0 -63
package/android/build.gradle
CHANGED
|
@@ -9,6 +9,41 @@ def safeExtGet(prop, fallback) {
|
|
|
9
9
|
}
|
|
10
10
|
|
|
11
11
|
buildscript {
|
|
12
|
+
def getFrameworksFile = { String rootDir ->
|
|
13
|
+
def currentDir = new File(rootDir)
|
|
14
|
+
|
|
15
|
+
while (currentDir != null) {
|
|
16
|
+
def frameworksFile = new File(currentDir, "common/frameworks.gradle")
|
|
17
|
+
if (frameworksFile.exists()) {
|
|
18
|
+
return frameworksFile.absolutePath
|
|
19
|
+
}
|
|
20
|
+
currentDir = currentDir.getParentFile()
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
return null
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
def getCapacitorMajorVersion = {
|
|
28
|
+
try {
|
|
29
|
+
def capacitorAndroidDir = new File(rootProject.projectDir, "node_modules/@capacitor/android")
|
|
30
|
+
if (capacitorAndroidDir.exists()) {
|
|
31
|
+
def packageJson = new File(capacitorAndroidDir, "package.json")
|
|
32
|
+
if (packageJson.exists()) {
|
|
33
|
+
def json = new groovy.json.JsonSlurper().parseText(packageJson.text)
|
|
34
|
+
def version = json.version
|
|
35
|
+
if (version) {
|
|
36
|
+
def majorVersion = version.tokenize('.')[0] as Integer
|
|
37
|
+
return majorVersion
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
} catch (Exception e) {
|
|
42
|
+
// Fallback if detection fails
|
|
43
|
+
}
|
|
44
|
+
return 7 // Default to Capacitor 7 if detection fails
|
|
45
|
+
}
|
|
46
|
+
|
|
12
47
|
def retrieveCapacitorCompatibility = {
|
|
13
48
|
def appModule = rootProject.findProject(":app")
|
|
14
49
|
if (appModule == null) {
|
|
@@ -33,45 +68,54 @@ buildscript {
|
|
|
33
68
|
} else {
|
|
34
69
|
ext.rootTargetCompatibility = JavaVersion.VERSION_17
|
|
35
70
|
}
|
|
36
|
-
|
|
37
|
-
if (ext.rootTargetCompatibility == JavaVersion.VERSION_21) {
|
|
38
|
-
ext.kotlin_version = "1.9.25"
|
|
39
|
-
ext.agp_version = "8.7.2"
|
|
40
|
-
}
|
|
41
71
|
}
|
|
42
72
|
}
|
|
43
73
|
|
|
44
74
|
ext {
|
|
45
|
-
kotlin_version = "1.9.25"
|
|
46
|
-
agp_version = "8.5.2"
|
|
47
75
|
rootSourceCompatibility = JavaVersion.VERSION_17
|
|
48
76
|
rootTargetCompatibility = JavaVersion.VERSION_17
|
|
49
77
|
}
|
|
50
78
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
79
|
+
// Check for monorepo frameworks.gradle
|
|
80
|
+
def common_gradle_script = getFrameworksFile(rootProject.projectDir.path)
|
|
81
|
+
if (common_gradle_script != null) {
|
|
82
|
+
apply from: common_gradle_script
|
|
54
83
|
}
|
|
55
84
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
85
|
+
retrieveCapacitorCompatibility()
|
|
86
|
+
|
|
87
|
+
// Set AGP version if not already defined by frameworks.gradle or root project
|
|
88
|
+
if (!ext.has('agpVersion') && !rootProject.ext.has('agpVersion')) {
|
|
89
|
+
def capacitorMajorVersion = getCapacitorMajorVersion()
|
|
90
|
+
ext.agpVersion = capacitorMajorVersion >= 8 ? '8.13.0' : '8.7.2'
|
|
59
91
|
}
|
|
60
92
|
|
|
61
|
-
|
|
93
|
+
// Use repos from frameworks.gradle if available, otherwise explicit repos
|
|
94
|
+
if (ext.has('repos')) {
|
|
95
|
+
repositories ext.repos
|
|
96
|
+
} else {
|
|
97
|
+
repositories {
|
|
98
|
+
google()
|
|
99
|
+
mavenCentral()
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
dependencies {
|
|
104
|
+
classpath "com.android.tools.build:gradle:$agpVersion"
|
|
105
|
+
}
|
|
62
106
|
}
|
|
63
107
|
|
|
64
108
|
apply plugin: 'com.android.library'
|
|
65
|
-
apply plugin: 'kotlin-android'
|
|
66
109
|
|
|
67
110
|
android {
|
|
68
111
|
namespace "com.scandit.capacitor.datacapture.barcode"
|
|
69
|
-
|
|
112
|
+
compileSdk project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 33
|
|
70
113
|
defaultConfig {
|
|
71
|
-
|
|
72
|
-
|
|
114
|
+
minSdk project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 24
|
|
115
|
+
targetSdk project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 33
|
|
73
116
|
versionCode 1
|
|
74
117
|
versionName "1.0"
|
|
118
|
+
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
75
119
|
}
|
|
76
120
|
buildTypes {
|
|
77
121
|
release {
|
|
@@ -88,20 +132,24 @@ android {
|
|
|
88
132
|
}
|
|
89
133
|
}
|
|
90
134
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
135
|
+
// Use repos from frameworks.gradle if available, otherwise explicit repos
|
|
136
|
+
if (ext.has('repos')) {
|
|
137
|
+
repositories ext.repos
|
|
138
|
+
} else {
|
|
139
|
+
repositories {
|
|
140
|
+
google()
|
|
141
|
+
mavenCentral()
|
|
142
|
+
}
|
|
94
143
|
}
|
|
95
144
|
|
|
96
145
|
dependencies {
|
|
97
|
-
def sdk_version = "8.
|
|
146
|
+
def sdk_version = "8.2.0"
|
|
98
147
|
|
|
99
148
|
implementation fileTree(dir: 'libs', include: ['*.jar'])
|
|
100
149
|
implementation fileTree(dir: 'library', include: ['*.aar'])
|
|
101
150
|
implementation project(':capacitor-android')
|
|
102
151
|
|
|
103
152
|
implementation project(':scandit-capacitor-datacapture-core')
|
|
104
|
-
println("Version of the native sdk used in this build: ${safeExtGet('global_sdk_version', sdk_version)}")
|
|
105
153
|
if (findProject(':scandit-datacapture-frameworks-barcode') != null) {
|
|
106
154
|
api project(":scandit-datacapture-frameworks-barcode")
|
|
107
155
|
} else {
|