Skip to content

Commit 3f6bf1c

Browse files
authored
Merge pull request #25 from klippa-app/development
Release 2.0.1
2 parents 2085f3d + ec1ad58 commit 3f6bf1c

File tree

4 files changed

+40
-19
lines changed

4 files changed

+40
-19
lines changed

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
## 0.2.1
2+
3+
* Bump Android to 2.0.8
4+
* Bump iOS to 0.4.12
5+
6+
## 0.2.0
7+
8+
* Added support for gradle 7+
9+
110
## 0.1.13
211

312
* Bump iOS to 0.4.11

README.md

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,17 @@ allprojects {
2727

2828
Replace the `{your-username}` and `{your-password}` values with the ones provided by Klippa.
2929

30+
If you're using gradle 7+ you will need to change `copyDownloadableDepsToLibs` in the `app/build.gradle`.
31+
It should now look like:
32+
33+
```maven
34+
task copyDownloadableDepsToLibs(type: Copy) {
35+
from configurations.implementation
36+
into 'libs'
37+
}
38+
39+
```
40+
3041
### iOS
3142

3243
Edit the file `ios/Podfile`, add the Klippa CocoaPod:
@@ -38,7 +49,7 @@ target 'YourApplicationName' do
3849
# Pods for YourApplicationName
3950
// ... other pods
4051
41-
pod 'Klippa-Scanner', podspec: 'https://custom-ocr.klippa.com/sdk/ios/specrepo/{your-username}/{your-password}/KlippaScanner/0.4.11.podspec'
52+
pod 'Klippa-Scanner', podspec: 'https://custom-ocr.klippa.com/sdk/ios/specrepo/{your-username}/{your-password}/KlippaScanner/latest.podspec'
4253
end
4354
```
4455

@@ -195,7 +206,7 @@ The result of `KlippaScannerSDK.getCameraResult()` is a Promise, so you can get
195206
```javascript
196207
KlippaScannerSDK.getCameraResult(options).then((result) => {
197208
console.log(result);
198-
}).reject((reason) => {
209+
}).catch((reason) => {
199210
console.log(reason);
200211
});
201212
```
@@ -247,7 +258,7 @@ Replace the `{version}` value with the version you want to use.
247258

248259
### iOS
249260

250-
Edit the file `ios/Podfile`, change the pod line of `Klippa-Scanner` and replace `0.4.11.podspec` with `{version}.podspec`, replace the `{version}` value with the version you want to use.
261+
Edit the file `ios/Podfile`, change the pod line of `Klippa-Scanner` and replace `latest.podspec` with `{version}.podspec`, replace the `{version}` value with the version you want to use.
251262

252263
## How to change the colors of the scanner?
253264

android/build.gradle

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
// - https://github.com/facebook/react-native/blob/0.58-stable/local-cli/templates/HelloWorld/android/app/build.gradle
1212

1313
def DEFAULT_COMPILE_SDK_VERSION = 31
14-
def DEFAULT_BUILD_TOOLS_VERSION = '29.0.2'
14+
def DEFAULT_BUILD_TOOLS_VERSION = '30.0.3'
1515
def DEFAULT_MIN_SDK_VERSION = 21
1616
def DEFAULT_TARGET_SDK_VERSION = 31
1717

@@ -20,7 +20,7 @@ def safeExtGet(prop, fallback) {
2020
}
2121

2222
apply plugin: 'com.android.library'
23-
apply plugin: 'maven'
23+
apply plugin: 'maven-publish'
2424

2525
buildscript {
2626
// The Android Gradle plugin is only required when opening the android folder stand-alone.
@@ -33,14 +33,11 @@ buildscript {
3333
jcenter()
3434
}
3535
dependencies {
36-
classpath 'com.android.tools.build:gradle:4.1.3'
36+
classpath 'com.android.tools.build:gradle:7.1.2'
3737
}
3838
}
3939
}
4040

41-
apply plugin: 'com.android.library'
42-
apply plugin: 'maven'
43-
4441
android {
4542
compileSdkVersion safeExtGet('compileSdkVersion', DEFAULT_COMPILE_SDK_VERSION)
4643
buildToolsVersion safeExtGet('buildToolsVersion', DEFAULT_BUILD_TOOLS_VERSION)
@@ -72,7 +69,7 @@ repositories {
7269
}
7370

7471
dependencies {
75-
def klippaScannerVersion = project.hasProperty('klippaScannerVersion') ? project.klippaScannerVersion : "2.0.7"
72+
def klippaScannerVersion = project.hasProperty('klippaScannerVersion') ? project.klippaScannerVersion : "2.0.8"
7673

7774
//noinspection GradleDynamicVersion
7875
implementation 'com.facebook.react:react-native:+' // From node_modules
@@ -107,13 +104,17 @@ def configureReactNativePom(def pom) {
107104
}
108105
}
109106

107+
configurations {
108+
klippaConfig.extendsFrom implementation
109+
}
110+
110111
afterEvaluate { project ->
111112
// some Gradle build hooks ref:
112113
// https://www.oreilly.com/library/view/gradle-beyond-the/9781449373801/ch03.html
113114
task androidJavadoc(type: Javadoc) {
114115
source = android.sourceSets.main.java.srcDirs
115116
classpath += files(android.bootClasspath)
116-
classpath += files(project.getConfigurations().getByName('compile').asList())
117+
classpath += files(project.getConfigurations().getByName('klippaConfig').asList())
117118
include '**/*.java'
118119
}
119120

@@ -142,12 +143,12 @@ afterEvaluate { project ->
142143
archives androidJavadocJar
143144
}
144145

145-
task installArchives(type: Upload) {
146-
configuration = configurations.archives
147-
repositories.mavenDeployer {
148-
// Deploy to react-native-event-bridge/maven, ready to publish to npm
149-
repository url: "file://${projectDir}/../android/maven"
150-
configureReactNativePom pom
146+
publishing {
147+
publications {
148+
maven(MavenPublication) {
149+
artifact androidSourcesJar
150+
}
151151
}
152152
}
153-
}
153+
154+
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@klippa/react-native-klippa-scanner-sdk",
33
"title": "React Native Klippa Scanner SDK",
4-
"version": "0.1.13",
4+
"version": "0.2.1",
55
"description": "Allows you to take pictures with the Klippa Scanner SDK from React Native.",
66
"main": "index.js",
77
"files": [

0 commit comments

Comments
 (0)