@velocitycareerlabs/vcl-react-native 2.10.0-rc.1 → 2.10.0-rc.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 +15 -0
- package/VclReactNative.podspec +7 -1
- package/android/build.gradle +8 -1
- package/package.json +5 -1
package/README.md
CHANGED
|
@@ -45,6 +45,21 @@ yarn add @velocitycareerlabs/vcl-react-native
|
|
|
45
45
|
npm install @velocitycareerlabs/vcl-react-native --save
|
|
46
46
|
```
|
|
47
47
|
|
|
48
|
+
### Native SDK versions
|
|
49
|
+
By default, the package pins native iOS and Android SDK versions through
|
|
50
|
+
`vclNativeSdkVersions` in its `package.json`, falling back to the React Native
|
|
51
|
+
package version if no native pin is present.
|
|
52
|
+
|
|
53
|
+
```json
|
|
54
|
+
{
|
|
55
|
+
"version": "2.10.0",
|
|
56
|
+
"vclNativeSdkVersions": {
|
|
57
|
+
"ios": "2.10.0-rc",
|
|
58
|
+
"android": "2.10.0-rc"
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
```
|
|
62
|
+
|
|
48
63
|
### Usage
|
|
49
64
|
To start using the VCL SDK, you’ll need to create its object and initialize it in Velocity Network™:
|
|
50
65
|
```js
|
package/VclReactNative.podspec
CHANGED
|
@@ -2,6 +2,12 @@ require "json"
|
|
|
2
2
|
|
|
3
3
|
package = JSON.parse(File.read(File.join(__dir__, "package.json")))
|
|
4
4
|
|
|
5
|
+
vcl_native_sdk_versions = package["vclNativeSdkVersions"] || {}
|
|
6
|
+
vcl_ios_sdk_version = [
|
|
7
|
+
vcl_native_sdk_versions["ios"],
|
|
8
|
+
package["version"]
|
|
9
|
+
].find { |value| !value.nil? && !value.to_s.strip.empty? }
|
|
10
|
+
|
|
5
11
|
Pod::Spec.new do |s|
|
|
6
12
|
s.name = "VclReactNative"
|
|
7
13
|
s.version = package["version"]
|
|
@@ -18,7 +24,7 @@ Pod::Spec.new do |s|
|
|
|
18
24
|
|
|
19
25
|
s.swift_version = "5.0"
|
|
20
26
|
|
|
21
|
-
s.dependency "VCL",
|
|
27
|
+
s.dependency "VCL", vcl_ios_sdk_version
|
|
22
28
|
|
|
23
29
|
install_modules_dependencies(s)
|
|
24
30
|
end
|
package/android/build.gradle
CHANGED
|
@@ -22,7 +22,14 @@ apply plugin: "kotlin-android"
|
|
|
22
22
|
apply plugin: "com.facebook.react"
|
|
23
23
|
|
|
24
24
|
def packageJson = new groovy.json.JsonSlurper().parse(file("$projectDir/../package.json"))
|
|
25
|
-
def
|
|
25
|
+
def vclNativeSdkVersions = packageJson.vclNativeSdkVersions instanceof Map ? packageJson.vclNativeSdkVersions : [:]
|
|
26
|
+
def firstPresentValue = { values ->
|
|
27
|
+
return values.find { value -> value != null && value.toString().trim() }
|
|
28
|
+
}
|
|
29
|
+
def vclSdkVersion = firstPresentValue([
|
|
30
|
+
vclNativeSdkVersions.android,
|
|
31
|
+
packageJson.version,
|
|
32
|
+
])
|
|
26
33
|
|
|
27
34
|
def getExtOrIntegerDefault(name) {
|
|
28
35
|
return rootProject.ext.has(name) ? rootProject.ext.get(name) : (project.properties["VclReactNative_" + name]).toInteger()
|
package/package.json
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@velocitycareerlabs/vcl-react-native",
|
|
3
|
-
"version": "2.10.0-rc.
|
|
3
|
+
"version": "2.10.0-rc.3",
|
|
4
|
+
"vclNativeSdkVersions": {
|
|
5
|
+
"ios": "2.10.0-rc",
|
|
6
|
+
"android": "2.10.0-rc"
|
|
7
|
+
},
|
|
4
8
|
"description": "Velocity Career Labs React Native SDK",
|
|
5
9
|
"license": "Apache-2.0",
|
|
6
10
|
"publishConfig": {
|