@veriff/react-native-sdk 2.9.0 → 2.10.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/android/build.gradle +23 -133
- package/package.json +1 -1
package/android/build.gradle
CHANGED
|
@@ -1,156 +1,46 @@
|
|
|
1
|
-
|
|
1
|
+
buildscript {
|
|
2
|
+
ext.safeExtGet = { prop, fallback ->
|
|
3
|
+
return rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
|
|
4
|
+
}
|
|
2
5
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
// - https://github.com/facebook/react-native/blob/0.58-stable/local-cli/templates/HelloWorld/android/build.gradle
|
|
8
|
-
//
|
|
9
|
-
// * https://github.com/facebook/react-native/blob/0.60-stable/template/android/app/build.gradle
|
|
10
|
-
// original location:
|
|
11
|
-
// - https://github.com/facebook/react-native/blob/0.58-stable/local-cli/templates/HelloWorld/android/app/build.gradle
|
|
6
|
+
repositories {
|
|
7
|
+
google()
|
|
8
|
+
mavenCentral()
|
|
9
|
+
}
|
|
12
10
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
11
|
+
dependencies {
|
|
12
|
+
classpath 'com.android.tools.build:gradle:7.0.4'
|
|
13
|
+
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${safeExtGet('kotlinVersion', '1.6.10')}"
|
|
14
|
+
}
|
|
15
|
+
}
|
|
17
16
|
|
|
18
17
|
def safeExtGet(prop, fallback) {
|
|
19
18
|
rootProject.ext.has(prop) ? rootProject.ext.get(prop) : fallback
|
|
20
19
|
}
|
|
21
20
|
|
|
22
21
|
apply plugin: 'com.android.library'
|
|
23
|
-
apply plugin: '
|
|
24
|
-
|
|
25
|
-
buildscript {
|
|
26
|
-
// The Android Gradle plugin is only required when opening the android folder stand-alone.
|
|
27
|
-
// This avoids unnecessary downloads and potential conflicts when the library is included as a
|
|
28
|
-
// module dependency in an application project.
|
|
29
|
-
// ref: https://docs.gradle.org/current/userguide/tutorial_using_tasks.html#sec:build_script_external_dependencies
|
|
30
|
-
if (project == rootProject) {
|
|
31
|
-
repositories {
|
|
32
|
-
google()
|
|
33
|
-
jcenter()
|
|
34
|
-
}
|
|
35
|
-
dependencies {
|
|
36
|
-
classpath 'com.android.tools.build:gradle:3.4.3'
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
apply plugin: 'com.android.library'
|
|
42
|
-
apply plugin: 'maven'
|
|
22
|
+
apply plugin: 'kotlin-android'
|
|
23
|
+
apply plugin: 'maven-publish'
|
|
43
24
|
|
|
44
25
|
android {
|
|
45
|
-
compileSdkVersion safeExtGet('compileSdkVersion',
|
|
46
|
-
buildToolsVersion safeExtGet('buildToolsVersion',
|
|
26
|
+
compileSdkVersion safeExtGet('compileSdkVersion', 31)
|
|
27
|
+
buildToolsVersion safeExtGet('buildToolsVersion', '31.0.0')
|
|
28
|
+
|
|
47
29
|
defaultConfig {
|
|
48
|
-
minSdkVersion safeExtGet('minSdkVersion',
|
|
49
|
-
targetSdkVersion safeExtGet('targetSdkVersion',
|
|
50
|
-
versionCode 1
|
|
51
|
-
versionName "1.0"
|
|
52
|
-
}
|
|
53
|
-
compileOptions {
|
|
54
|
-
sourceCompatibility JavaVersion.VERSION_1_8
|
|
55
|
-
targetCompatibility JavaVersion.VERSION_1_8
|
|
56
|
-
}
|
|
57
|
-
lintOptions {
|
|
58
|
-
abortOnError false
|
|
30
|
+
minSdkVersion safeExtGet('minSdkVersion', 21)
|
|
31
|
+
targetSdkVersion safeExtGet('targetSdkVersion', 31)
|
|
59
32
|
}
|
|
60
33
|
}
|
|
61
34
|
|
|
62
35
|
repositories {
|
|
63
|
-
// ref: https://www.baeldung.com/maven-local-repository
|
|
64
36
|
mavenLocal()
|
|
65
|
-
maven {
|
|
66
|
-
// All of React Native (JS, Obj-C sources, Android binaries) is installed from npm
|
|
67
|
-
url "$rootDir/../node_modules/react-native/android"
|
|
68
|
-
}
|
|
69
|
-
maven {
|
|
70
|
-
// Android JSC is installed from npm
|
|
71
|
-
url "$rootDir/../node_modules/jsc-android/dist"
|
|
72
|
-
}
|
|
73
|
-
maven { url "https://cdn.veriff.me/android/" } //veriff public repo
|
|
74
37
|
google()
|
|
75
|
-
jcenter()
|
|
76
38
|
mavenCentral()
|
|
39
|
+
maven { url "https://cdn.veriff.me/android/" } //veriff public repo
|
|
77
40
|
}
|
|
78
41
|
|
|
79
42
|
dependencies {
|
|
80
43
|
//noinspection GradleDynamicVersion
|
|
81
44
|
implementation 'com.facebook.react:react-native:+'
|
|
82
|
-
implementation 'com.veriff:veriff-library:4.6.
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
def configureReactNativePom(def pom) {
|
|
86
|
-
def packageJson = new groovy.json.JsonSlurper().parseText(file('../package.json').text)
|
|
87
|
-
|
|
88
|
-
pom.project {
|
|
89
|
-
name packageJson.title
|
|
90
|
-
artifactId packageJson.name
|
|
91
|
-
version = packageJson.version
|
|
92
|
-
group = "com.reactlibrary"
|
|
93
|
-
description packageJson.description
|
|
94
|
-
url = "https://github.com/veriff/react-native-sdk"
|
|
95
|
-
|
|
96
|
-
licenses {
|
|
97
|
-
license {
|
|
98
|
-
name packageJson.license
|
|
99
|
-
url "https://github.com/veriff/react-native-sdk" + '/blob/master/' + packageJson.licenseFilename
|
|
100
|
-
distribution 'repo'
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
developers {
|
|
105
|
-
developer {
|
|
106
|
-
id packageJson.author.username
|
|
107
|
-
name packageJson.author.name
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
afterEvaluate { project ->
|
|
114
|
-
// some Gradle build hooks ref:
|
|
115
|
-
// https://www.oreilly.com/library/view/gradle-beyond-the/9781449373801/ch03.html
|
|
116
|
-
task androidJavadoc(type: Javadoc) {
|
|
117
|
-
source = android.sourceSets.main.java.srcDirs
|
|
118
|
-
classpath += files(android.bootClasspath)
|
|
119
|
-
classpath += files(project.getConfigurations().getByName('compile').asList())
|
|
120
|
-
include '**/*.java'
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
task androidJavadocJar(type: Jar, dependsOn: androidJavadoc) {
|
|
124
|
-
classifier = 'javadoc'
|
|
125
|
-
from androidJavadoc.destinationDir
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
task androidSourcesJar(type: Jar) {
|
|
129
|
-
classifier = 'sources'
|
|
130
|
-
from android.sourceSets.main.java.srcDirs
|
|
131
|
-
include '**/*.java'
|
|
132
|
-
}
|
|
133
|
-
|
|
134
|
-
android.libraryVariants.all { variant ->
|
|
135
|
-
def name = variant.name.capitalize()
|
|
136
|
-
def javaCompileTask = variant.javaCompileProvider.get()
|
|
137
|
-
|
|
138
|
-
task "jar${name}"(type: Jar, dependsOn: javaCompileTask) {
|
|
139
|
-
from javaCompileTask.destinationDir
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
artifacts {
|
|
144
|
-
archives androidSourcesJar
|
|
145
|
-
archives androidJavadocJar
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
task installArchives(type: Upload) {
|
|
149
|
-
configuration = configurations.archives
|
|
150
|
-
repositories.mavenDeployer {
|
|
151
|
-
// Deploy to react-native-event-bridge/maven, ready to publish to npm
|
|
152
|
-
repository url: "file://${projectDir}/../android/maven"
|
|
153
|
-
configureReactNativePom pom
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
}
|
|
45
|
+
implementation 'com.veriff:veriff-library:4.6.1'
|
|
46
|
+
}
|