@sumsub/cordova-idensic-mobile-sdk-plugin 1.17.4 → 1.18.4
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/demo/Gemfile.lock +87 -70
- package/demo/config.xml +4 -3
- package/demo/package-lock.json +3544 -3526
- package/demo/package.json +2 -2
- package/demo/platforms/android/android.json +3 -3
- package/demo/platforms/android/app/build.gradle +2 -0
- package/demo/platforms/android/app/src/main/AndroidManifest.xml +2 -2
- package/demo/platforms/android/app/src/main/java/main/java/com/sumsub/msdk/plugins/cordova/SNSMobileSdkCordovaPlugin.java +37 -16
- package/demo/platforms/android/app/src/main/res/values/strings.xml +1 -0
- package/demo/platforms/android/app/src/main/res/xml/config.xml +5 -4
- package/demo/platforms/android/build.gradle +5 -3
- package/demo/platforms/android/cordova-idensic-mobile-sdk-plugin/SumSubCordova-build-extras.gradle +4 -2
- package/demo/platforms/android/gradle.properties +2 -1
- package/demo/platforms/android/platform_www/cordova_plugins.js +1 -1
- package/demo/platforms/android/platform_www/plugins/cordova-idensic-mobile-sdk-plugin/dist/SNSMobileSDK.js +1 -1
- package/demo/platforms/ios/Podfile +1 -1
- package/demo/platforms/ios/Podfile.lock +7 -7
- package/demo/platforms/ios/SumSubCordova/Images.xcassets/AppIcon.appiconset/Contents.json +64 -70
- package/demo/platforms/ios/SumSubCordova/Images.xcassets/AppIcon.appiconset/cordova_icon-1024.png +0 -0
- package/demo/platforms/ios/SumSubCordova/Images.xcassets/AppIcon.appiconset/cordova_icon-20.png +0 -0
- package/demo/platforms/ios/SumSubCordova/Images.xcassets/AppIcon.appiconset/cordova_icon-20@2x.png +0 -0
- package/demo/platforms/ios/SumSubCordova/Images.xcassets/AppIcon.appiconset/cordova_icon-20@3x.png +0 -0
- package/demo/platforms/ios/SumSubCordova/Images.xcassets/AppIcon.appiconset/cordova_icon-29.png +0 -0
- package/demo/platforms/ios/SumSubCordova/Images.xcassets/AppIcon.appiconset/cordova_icon-29@2x.png +0 -0
- package/demo/platforms/ios/SumSubCordova/Images.xcassets/AppIcon.appiconset/cordova_icon-29@3x.png +0 -0
- package/demo/platforms/ios/SumSubCordova/Images.xcassets/AppIcon.appiconset/cordova_icon-40.png +0 -0
- package/demo/platforms/ios/SumSubCordova/Images.xcassets/AppIcon.appiconset/cordova_icon-40@2x.png +0 -0
- package/demo/platforms/ios/SumSubCordova/Images.xcassets/AppIcon.appiconset/cordova_icon-40@3x.png +0 -0
- package/demo/platforms/ios/SumSubCordova/Images.xcassets/AppIcon.appiconset/cordova_icon-60@2x.png +0 -0
- package/demo/platforms/ios/SumSubCordova/Images.xcassets/AppIcon.appiconset/cordova_icon-60@3x.png +0 -0
- package/demo/platforms/ios/SumSubCordova/Images.xcassets/AppIcon.appiconset/cordova_icon-76.png +0 -0
- package/demo/platforms/ios/SumSubCordova/Images.xcassets/AppIcon.appiconset/cordova_icon-76@2x.png +0 -0
- package/demo/platforms/ios/SumSubCordova/Images.xcassets/AppIcon.appiconset/cordova_icon-83.5@2x.png +0 -0
- package/demo/platforms/ios/SumSubCordova/Plugins/cordova-idensic-mobile-sdk-plugin/SNSMobileSdkCordovaPlugin.m +33 -5
- package/demo/platforms/ios/SumSubCordova/SumSubCordova-Info.plist +5 -5
- package/demo/platforms/ios/SumSubCordova/config.xml +3 -3
- package/demo/platforms/ios/SumSubCordova.xcodeproj/project.pbxproj +23 -23
- package/demo/platforms/ios/ios.json +1 -1
- package/demo/platforms/ios/platform_www/cordova_plugins.js +1 -1
- package/demo/platforms/ios/platform_www/plugins/cordova-idensic-mobile-sdk-plugin/dist/SNSMobileSDK.js +1 -1
- package/demo/platforms/ios/pods.json +1 -1
- package/demo/plugins/cordova-idensic-mobile-sdk-plugin/dist/SNSMobileSDK.js +1 -1
- package/demo/plugins/cordova-idensic-mobile-sdk-plugin/package.json +3 -3
- package/demo/plugins/cordova-idensic-mobile-sdk-plugin/plugin.xml +4 -4
- package/demo/plugins/cordova-idensic-mobile-sdk-plugin/src/android/build-extras.gradle +4 -2
- package/demo/plugins/cordova-idensic-mobile-sdk-plugin/src/android/build.gradle +5 -5
- package/demo/plugins/cordova-idensic-mobile-sdk-plugin/src/android/src/main/java/com/sumsub/msdk/plugins/cordova/SNSMobileSdkCordovaPlugin.java +37 -16
- package/demo/plugins/cordova-idensic-mobile-sdk-plugin/src/ios/SNSMobileSdkCordovaPlugin.m +33 -5
- package/dist/SNSMobileSDK.js +1 -1
- package/package.json +3 -3
- package/plugin.xml +4 -4
- package/src/android/build-extras.gradle +4 -2
- package/src/android/build.gradle +5 -5
- package/src/android/src/main/java/com/sumsub/msdk/plugins/cordova/SNSMobileSdkCordovaPlugin.java +37 -16
- package/src/ios/SNSMobileSdkCordovaPlugin.m +33 -5
- package/demo/platforms/ios/SumSubCordova/Images.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png +0 -0
- package/demo/platforms/ios/SumSubCordova/Images.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png +0 -0
- package/demo/platforms/ios/SumSubCordova/Images.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png +0 -0
- package/demo/platforms/ios/SumSubCordova/Images.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png +0 -0
- package/demo/platforms/ios/SumSubCordova/Images.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png +0 -0
- package/demo/platforms/ios/SumSubCordova/Images.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png +0 -0
- package/demo/platforms/ios/SumSubCordova/Images.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png +0 -0
- package/demo/platforms/ios/SumSubCordova/Images.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png +0 -0
- package/demo/platforms/ios/SumSubCordova/Images.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png +0 -0
- package/demo/platforms/ios/SumSubCordova/Images.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png +0 -0
- package/demo/platforms/ios/SumSubCordova/Images.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png +0 -0
- package/demo/platforms/ios/SumSubCordova/Images.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png +0 -0
- package/demo/platforms/ios/SumSubCordova/Images.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png +0 -0
- package/demo/platforms/ios/SumSubCordova/Images.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png +0 -0
- package/demo/platforms/ios/SumSubCordova/Images.xcassets/AppIcon.appiconset/ItunesArtwork@2x.png +0 -0
- package/demo/plugins/cordova-idensic-mobile-sdk-plugin/src/android/dependencies.gradle +0 -122
- package/src/android/dependencies.gradle +0 -122
package/dist/SNSMobileSDK.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("cordova/exec")):"function"==typeof define&&define.amd?define(["cordova/exec"],t):"object"==typeof exports?exports.SNSMobileSDK=t(require("cordova/exec")):e.SNSMobileSDK=t(e["cordova/exec"])}(window,(function(e){return function(e){var t={};function n(
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("cordova/exec")):"function"==typeof define&&define.amd?define(["cordova/exec"],t):"object"==typeof exports?exports.SNSMobileSDK=t(require("cordova/exec")):e.SNSMobileSDK=t(e["cordova/exec"])}(window,(function(e){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=0)}([function(e,t,n){const r=n(1),o="SNSMobileSdkCordovaPlugin",i={onStatusChanged:null,onEvent:null,onActionResult:"onActionResultCompleted"};var s=null;function a(e){this.sdkConf=e}function u(e,t){return this.apiUrl=e,this.flowName=t,this.debug=!1,this.handlers={},this.applicantConf={},this}a.prototype.dismiss=function(){r(e=>{},e=>{},o,"dismiss",[])},a.prototype.sendEvent=function(e,t){var n=this.sdkConf.handlers[e];if(n){var s=i[e];if(s){var a=function(e,t){r(e=>{},e=>{},o,s,[{error:e,result:t}])};n(t).then(e=>{a(null,e)}).catch(e=>{a(e||new Error("rejected"),null)})}else n(t)}},a.prototype.getNewAccessToken=function(){var e=function(e){r(e=>{},e=>{},o,"setNewAccessToken",[e])};this.sdkConf.tokenExpirationHandler().then(t=>{e(t)}).catch(t=>{console.error(t instanceof Error?t.message:t),e(null)})},a.prototype.launch=function(){let e=this;return console.log("InSumSub",JSON.stringify(this.sdkConf)),new Promise((t,n)=>{s?n(new Error("Aborted since another instance is in use!")):e.sdkConf.accessToken?e.flowName&&!e.sdkConf.apiUrl?n(new Error("API URL is required")):(s=e,r(e=>{s=null,console.log("Promise SumSub Result",JSON.stringify(e)),t(e)},e=>{s=null,console.log("Promise SumSub Error",JSON.stringify(e)),n(e)},o,"launchSNSMobileSDK",[e.sdkConf])):n(new Error("Access token is required"))})},u.prototype.withAccessToken=function(e,t){if(this.accessToken=e,!t||"function"!=typeof t)throw new Error('Invalid parameter, "expirationHandler" must be a function');return this.tokenExpirationHandler=t,this},u.prototype.withHandlers=function(e){if(!e||"object"!=typeof e)throw new Error('Invalid parameter, "withHandlers" expects a hash');return Object.keys(i).forEach(t=>{var n=e[t];if(n){if("function"!=typeof n)throw new Error('Invalid handler, "'+t+'" must be a function');this.handlers[t]=n}}),this},u.prototype.withDebug=function(e){if("boolean"!=typeof e)throw new Error('Invalid parameter, "withDebug" expects a boolean');return this.debug=e,this},u.prototype.withLocale=function(e){if("string"!=typeof e)throw new Error('Invalid parameter, "locale" must be a string');return this.locale=e,this},u.prototype.withSupportEmail=function(e){if("string"!=typeof e)throw new Error('Invalid parameter, "supportEmail" must be a string');return this.supportEmail=e,this},u.prototype.withApplicantConf=function(e){if(!e||"object"!=typeof e)throw new Error('Invalid parameter, "withApplicantConf" expects a hash');return this.applicantConf=e,this},u.prototype.withBaseUrl=function(e){if("string"!=typeof e)throw new Error('Invalid parameter, "baseUrl" must be a string');return this.apiUrl=e,this},u.prototype.onTestEnv=function(){return this.withBaseUrl("https://test-api.sumsub.com")},u.prototype.build=function(){var e={};return Object.keys(this.handlers).forEach(t=>{e[t]=!0}),new a({apiUrl:this.apiUrl,flowName:this.flowName,accessToken:this.accessToken,tokenExpirationHandler:this.tokenExpirationHandler,handlers:this.handlers,hasHandlers:e,locale:this.locale,supportEmail:this.supportEmail,applicantConf:this.applicantConf,debug:this.debug})},e.exports={init:function(e,t){return(new u).withAccessToken(e,t)},Builder:function(e,t){return new u(e,t)},getNewAccessToken:function(){s&&s.getNewAccessToken()},sendEvent:function(e,t){s&&s.sendEvent(e,t)},reset:function(){s=null}}},function(t,n){t.exports=e}])}));
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sumsub/cordova-idensic-mobile-sdk-plugin",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "Cordova plugin exposing
|
|
3
|
+
"version": "1.18.4",
|
|
4
|
+
"description": "Cordova plugin exposing Sumsub SDK",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "webpack -p"
|
|
7
7
|
},
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"android",
|
|
39
39
|
"ios"
|
|
40
40
|
],
|
|
41
|
-
"author": "
|
|
41
|
+
"author": "Sumsub",
|
|
42
42
|
"license": "Apache-2.0",
|
|
43
43
|
"main": "webpack.config.js",
|
|
44
44
|
"dependencies": {},
|
package/plugin.xml
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="utf-8" ?>
|
|
2
|
-
<plugin id="cordova-idensic-mobile-sdk-plugin" version="1.
|
|
2
|
+
<plugin id="cordova-idensic-mobile-sdk-plugin" version="1.18.4" xmlns="http://apache.org/cordova/ns/plugins/1.0" xmlns:android="http://schemas.android.com/apk/res/android">
|
|
3
3
|
|
|
4
4
|
<name>cordova-idensic-mobile-sdk-plugin</name>
|
|
5
5
|
<description>Cordova plugin exposing SumSub Mobile SDK</description>
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
<feature name="SNSMobileSdkCordovaPlugin">
|
|
21
21
|
<param name="android-package" value="com.sumsub.msdk.plugins.cordova.SNSMobileSdkCordovaPlugin" />
|
|
22
22
|
</feature>
|
|
23
|
-
<preference name="android-targetSdkVersion" value="
|
|
24
|
-
<preference name="android-compileSdkVersion" value="
|
|
23
|
+
<preference name="android-targetSdkVersion" value="30" />
|
|
24
|
+
<preference name="android-compileSdkVersion" value="30" />
|
|
25
25
|
<preference name="android-buildToolsVersion" value="29.0.3" />
|
|
26
26
|
</config-file>
|
|
27
27
|
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
<source url="https://cdn.cocoapods.org/"/>
|
|
72
72
|
</config>
|
|
73
73
|
<pods>
|
|
74
|
-
<pod name="IdensicMobileSDK" spec="=1.
|
|
74
|
+
<pod name="IdensicMobileSDK" spec="=1.18.4" />
|
|
75
75
|
</pods>
|
|
76
76
|
</podspec>
|
|
77
77
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
buildscript {
|
|
2
2
|
repositories {
|
|
3
|
-
maven { url "https://maven.sumsub.com/repository/maven-public/" }
|
|
4
3
|
google()
|
|
5
4
|
jcenter()
|
|
5
|
+
mavenCentral()
|
|
6
6
|
}
|
|
7
7
|
}
|
|
8
8
|
|
|
@@ -11,10 +11,12 @@ allprojects {
|
|
|
11
11
|
maven { url "https://maven.sumsub.com/repository/maven-public/" }
|
|
12
12
|
google()
|
|
13
13
|
jcenter()
|
|
14
|
+
mavenCentral()
|
|
14
15
|
}
|
|
15
16
|
}
|
|
16
17
|
|
|
17
18
|
dependencies {
|
|
18
|
-
implementation "com.sumsub.sns:idensic-mobile-sdk:1.
|
|
19
|
+
implementation "com.sumsub.sns:idensic-mobile-sdk:1.18.4"
|
|
20
|
+
implementation "com.sumsub.sns:idensic-mobile-sdk-prooface:1.18.4"
|
|
19
21
|
implementation 'com.google.android.material:material:1.3.0'
|
|
20
22
|
}
|
package/src/android/build.gradle
CHANGED
|
@@ -3,7 +3,7 @@ buildscript {
|
|
|
3
3
|
repositories {
|
|
4
4
|
google()
|
|
5
5
|
jcenter()
|
|
6
|
-
|
|
6
|
+
mavelCentral()
|
|
7
7
|
}
|
|
8
8
|
dependencies {
|
|
9
9
|
classpath deps.build.androidPlugin
|
|
@@ -30,11 +30,10 @@ rootProject.allprojects {
|
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
android {
|
|
33
|
-
compileSdkVersion
|
|
34
|
-
buildToolsVersion '29.0.3'
|
|
33
|
+
compileSdkVersion 30
|
|
35
34
|
defaultConfig {
|
|
36
35
|
minSdkVersion 21
|
|
37
|
-
targetSdkVersion
|
|
36
|
+
targetSdkVersion 30
|
|
38
37
|
versionCode 1
|
|
39
38
|
versionName "1.0"
|
|
40
39
|
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
|
@@ -48,7 +47,8 @@ android {
|
|
|
48
47
|
}
|
|
49
48
|
|
|
50
49
|
dependencies {
|
|
51
|
-
implementation "com.sumsub.sns:idensic-mobile-sdk:1.
|
|
50
|
+
implementation "com.sumsub.sns:idensic-mobile-sdk:1.18.4"
|
|
51
|
+
implementation "com.sumsub.sns:idensic-mobile-sdk-prooface:1.18.4"
|
|
52
52
|
|
|
53
53
|
implementation 'com.google.android.material:material:1.3.0'
|
|
54
54
|
implementation 'org.apache.cordova:framework:8.1.0'
|
package/src/android/src/main/java/com/sumsub/msdk/plugins/cordova/SNSMobileSdkCordovaPlugin.java
CHANGED
|
@@ -4,7 +4,7 @@ import android.content.Intent;
|
|
|
4
4
|
import android.text.TextUtils;
|
|
5
5
|
import android.util.Log;
|
|
6
6
|
import android.webkit.ValueCallback;
|
|
7
|
-
|
|
7
|
+
import androidx.core.content.res.ResourcesCompat;
|
|
8
8
|
import com.google.gson.Gson;
|
|
9
9
|
import com.sumsub.sns.R;
|
|
10
10
|
import com.sumsub.sns.core.SNSActionResult;
|
|
@@ -20,6 +20,8 @@ import com.sumsub.sns.core.data.model.SNSCompletionResult;
|
|
|
20
20
|
import com.sumsub.sns.core.data.model.SNSException;
|
|
21
21
|
import com.sumsub.sns.core.data.model.SNSSDKState;
|
|
22
22
|
import com.sumsub.sns.core.data.model.SNSSupportItem;
|
|
23
|
+
import com.sumsub.sns.core.data.listener.SNSIconHandler;
|
|
24
|
+
import com.sumsub.sns.core.data.model.SNSInitConfig;
|
|
23
25
|
import com.sumsub.sns.prooface.SNSProoface;
|
|
24
26
|
|
|
25
27
|
import org.apache.cordova.CallbackContext;
|
|
@@ -68,19 +70,22 @@ public class SNSMobileSdkCordovaPlugin extends CordovaPlugin {
|
|
|
68
70
|
String locale = conf.optString("locale");
|
|
69
71
|
boolean isDebug = conf.optBoolean("debug", false);
|
|
70
72
|
JSONObject hasHandlers = conf.getJSONObject("hasHandlers");
|
|
73
|
+
JSONObject applicantConf = conf.optJSONObject("applicantConf");
|
|
74
|
+
String phone = applicantConf.optString("phone");
|
|
75
|
+
String email = applicantConf.optString("email");
|
|
71
76
|
|
|
72
77
|
if (TextUtils.isEmpty(supportEmail)) {
|
|
73
78
|
supportEmail = "support@sumsub.com";
|
|
74
79
|
}
|
|
75
80
|
|
|
76
|
-
if (TextUtils.isEmpty(
|
|
77
|
-
callbackContext.error("Error: Access token
|
|
81
|
+
if (TextUtils.isEmpty(accessToken)) {
|
|
82
|
+
callbackContext.error("Error: Access token must be provided");
|
|
78
83
|
return false;
|
|
79
84
|
}
|
|
80
85
|
if (TextUtils.isEmpty(locale)) {
|
|
81
86
|
locale = Locale.getDefault().getLanguage();
|
|
82
87
|
}
|
|
83
|
-
this.launchSNSMobileSDK(apiUrl, flowName, accessToken, supportEmail, locale, isDebug, hasHandlers, callbackContext);
|
|
88
|
+
this.launchSNSMobileSDK(apiUrl, flowName, accessToken, supportEmail, email, phone, locale, isDebug, hasHandlers, callbackContext);
|
|
84
89
|
return true;
|
|
85
90
|
} else if (action.equals(NEW_TOKEN_ACTION)) {
|
|
86
91
|
newAccessToken = args.getString(0);
|
|
@@ -134,14 +139,7 @@ public class SNSMobileSdkCordovaPlugin extends CordovaPlugin {
|
|
|
134
139
|
});
|
|
135
140
|
}
|
|
136
141
|
|
|
137
|
-
private void launchSNSMobileSDK(final String apiUrl, final String flowName, final String accessToken, String supportEmail, final String locale, final boolean isDebug, final JSONObject hasHandlers, CallbackContext callbackContext) {
|
|
138
|
-
final SNSSupportItem supportItem = new SNSSupportItem(
|
|
139
|
-
R.string.sns_support_EMAIL_title,
|
|
140
|
-
R.string.sns_support_EMAIL_description,
|
|
141
|
-
R.drawable.sns_ic_email,
|
|
142
|
-
SNSSupportItem.Type.Email,
|
|
143
|
-
supportEmail, null);
|
|
144
|
-
|
|
142
|
+
private void launchSNSMobileSDK(final String apiUrl, final String flowName, final String accessToken, String supportEmail, String email, String phone, final String locale, final boolean isDebug, final JSONObject hasHandlers, CallbackContext callbackContext) {
|
|
145
143
|
|
|
146
144
|
cordova.getActivity().runOnUiThread(new Runnable() {
|
|
147
145
|
@Override
|
|
@@ -193,7 +191,7 @@ public class SNSMobileSdkCordovaPlugin extends CordovaPlugin {
|
|
|
193
191
|
final SNSEventHandler eventHandler = snsEvent -> {
|
|
194
192
|
Map<String, Object> params = new HashMap<>();
|
|
195
193
|
final Map<String, Object> payload = snsEvent.getPayload();
|
|
196
|
-
for (String key: payload.keySet()) {
|
|
194
|
+
for (String key : payload.keySet()) {
|
|
197
195
|
if (key.equals("isCanceled") || key.equals("isCancelled")) {
|
|
198
196
|
params.put("isCancelled", (Boolean) payload.get(key));
|
|
199
197
|
} else {
|
|
@@ -214,7 +212,28 @@ public class SNSMobileSdkCordovaPlugin extends CordovaPlugin {
|
|
|
214
212
|
});
|
|
215
213
|
};
|
|
216
214
|
|
|
217
|
-
|
|
215
|
+
SNSMobileSDK.Builder snsSdkBuilder;
|
|
216
|
+
if (flowName.isEmpty()) {
|
|
217
|
+
snsSdkBuilder = new SNSMobileSDK.Builder(cordova.getActivity());
|
|
218
|
+
} else {
|
|
219
|
+
snsSdkBuilder = new SNSMobileSDK.Builder(cordova.getActivity(), null, flowName);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
if (apiUrl != null && !apiUrl.isEmpty()) {
|
|
223
|
+
snsSdkBuilder.withBaseUrl(apiUrl);
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
final SNSSupportItem supportItem = new SNSSupportItem(
|
|
227
|
+
R.string.sns_support_EMAIL_title,
|
|
228
|
+
R.string.sns_support_EMAIL_description,
|
|
229
|
+
SNSSupportItem.Type.Email,
|
|
230
|
+
supportEmail,
|
|
231
|
+
null,
|
|
232
|
+
SNSIconHandler.SNSCommonIcons.MAIL.getImageName(),
|
|
233
|
+
null
|
|
234
|
+
);
|
|
235
|
+
|
|
236
|
+
snsSdk = snsSdkBuilder
|
|
218
237
|
.withAccessToken(accessToken, () -> {
|
|
219
238
|
Timber.d("SumSub: calling onTokenExpired!");
|
|
220
239
|
newAccessToken = null;
|
|
@@ -242,10 +261,12 @@ public class SNSMobileSdkCordovaPlugin extends CordovaPlugin {
|
|
|
242
261
|
.withEventHandler(eventHandler)
|
|
243
262
|
.withSupportItems(Collections.singletonList(supportItem))
|
|
244
263
|
.withLocale(new Locale(locale))
|
|
264
|
+
.withConf(new SNSInitConfig(email, phone))
|
|
245
265
|
.build();
|
|
246
266
|
snsSdk.launch();
|
|
247
267
|
} catch (Exception e) {
|
|
248
268
|
Timber.e(e);
|
|
269
|
+
callbackContext.error("Error:" + e.getMessage());
|
|
249
270
|
}
|
|
250
271
|
|
|
251
272
|
}
|
|
@@ -285,7 +306,7 @@ public class SNSMobileSdkCordovaPlugin extends CordovaPlugin {
|
|
|
285
306
|
final SNSSDKState.ActionCompleted action = (SNSSDKState.ActionCompleted) state;
|
|
286
307
|
final JSONObject actionResult = new JSONObject();
|
|
287
308
|
actionResult.put("actionId", action.getActionId());
|
|
288
|
-
actionResult.put("answer", action.getAnswer()
|
|
309
|
+
actionResult.put("answer", action.getAnswer());
|
|
289
310
|
result.put("actionResult", actionResult);
|
|
290
311
|
}
|
|
291
312
|
} catch (JSONException e) {
|
|
@@ -305,7 +326,7 @@ public class SNSMobileSdkCordovaPlugin extends CordovaPlugin {
|
|
|
305
326
|
private String mapToString(Map<String, Object> values) {
|
|
306
327
|
StringBuilder sb = new StringBuilder();
|
|
307
328
|
sb.append('{');
|
|
308
|
-
for (String key: values.keySet()) {
|
|
329
|
+
for (String key : values.keySet()) {
|
|
309
330
|
Object value = values.get(key);
|
|
310
331
|
sb.append("'");
|
|
311
332
|
sb.append(key);
|
|
@@ -18,11 +18,32 @@
|
|
|
18
18
|
return [self complete:command withInvalidParameters:@"No params detected"];
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
21
|
+
NSString *apiUrl = params[@"apiUrl"];
|
|
22
|
+
NSString *flowName = params[@"flowName"];
|
|
23
|
+
NSString *accessToken = params[@"accessToken"];
|
|
24
|
+
NSString *locale = params[@"locale"];
|
|
25
|
+
|
|
26
|
+
SNSMobileSDK *sdk;
|
|
27
|
+
|
|
28
|
+
if (!flowName || flowName.length <= 0) {
|
|
29
|
+
|
|
30
|
+
SNSEnvironment environment = (apiUrl && apiUrl.length > 0) ? apiUrl : SNSEnvironmentProduction;
|
|
31
|
+
|
|
32
|
+
sdk = [SNSMobileSDK setupWithAccessToken:accessToken
|
|
33
|
+
environment:environment];
|
|
34
|
+
|
|
35
|
+
if (locale) {
|
|
36
|
+
sdk.locale = locale;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
} else {
|
|
40
|
+
|
|
41
|
+
sdk = [SNSMobileSDK setupWithBaseUrl:apiUrl
|
|
42
|
+
flowName:flowName
|
|
43
|
+
accessToken:accessToken
|
|
44
|
+
locale:locale
|
|
45
|
+
supportEmail:params[@"supportEmail"]];
|
|
46
|
+
}
|
|
26
47
|
|
|
27
48
|
if (!sdk.isReady) {
|
|
28
49
|
[self complete:command withSDK:sdk];
|
|
@@ -35,6 +56,13 @@
|
|
|
35
56
|
sdk.logLevel = SNSLogLevel_Debug;
|
|
36
57
|
}
|
|
37
58
|
|
|
59
|
+
if (params[@"applicantConf"][@"email"]) {
|
|
60
|
+
sdk.initialEmail = params[@"applicantConf"][@"email"];
|
|
61
|
+
}
|
|
62
|
+
if (params[@"applicantConf"][@"phone"]) {
|
|
63
|
+
sdk.initialPhone = params[@"applicantConf"][@"phone"];
|
|
64
|
+
}
|
|
65
|
+
|
|
38
66
|
__weak SNSMobileSdkCordovaPlugin *weakSelf = self;
|
|
39
67
|
|
|
40
68
|
[sdk tokenExpirationHandler:^(void (^ _Nonnull onComplete)(NSString * _Nullable)) {
|
package/demo/platforms/ios/SumSubCordova/Images.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
DELETED
|
Binary file
|
package/demo/platforms/ios/SumSubCordova/Images.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
DELETED
|
Binary file
|
package/demo/platforms/ios/SumSubCordova/Images.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
DELETED
|
Binary file
|
package/demo/platforms/ios/SumSubCordova/Images.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
DELETED
|
Binary file
|
package/demo/platforms/ios/SumSubCordova/Images.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
DELETED
|
Binary file
|
package/demo/platforms/ios/SumSubCordova/Images.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
DELETED
|
Binary file
|
package/demo/platforms/ios/SumSubCordova/Images.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
DELETED
|
Binary file
|
package/demo/platforms/ios/SumSubCordova/Images.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
DELETED
|
Binary file
|
package/demo/platforms/ios/SumSubCordova/Images.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
DELETED
|
Binary file
|
package/demo/platforms/ios/SumSubCordova/Images.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
DELETED
|
Binary file
|
package/demo/platforms/ios/SumSubCordova/Images.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
DELETED
|
Binary file
|
package/demo/platforms/ios/SumSubCordova/Images.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
DELETED
|
Binary file
|
package/demo/platforms/ios/SumSubCordova/Images.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
DELETED
|
Binary file
|
|
Binary file
|
package/demo/platforms/ios/SumSubCordova/Images.xcassets/AppIcon.appiconset/ItunesArtwork@2x.png
DELETED
|
Binary file
|
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
def versions = [
|
|
2
|
-
androidPlugin : "3.5.3",
|
|
3
|
-
|
|
4
|
-
kotlin : "1.4.0",
|
|
5
|
-
androidx : "1.1.0",
|
|
6
|
-
constraintLayout : "1.1.3",
|
|
7
|
-
coreKtx : "1.1.0",
|
|
8
|
-
lifecycleKtx : "2.2.0",
|
|
9
|
-
fragmentKtx : "1.2.0",
|
|
10
|
-
viewmodelSavedState : "1.0.0",
|
|
11
|
-
coroutines : "1.3.3",
|
|
12
|
-
retrofit : "2.6.4",
|
|
13
|
-
gsonConverter : "2.6.4",
|
|
14
|
-
okhttp : "3.12.11",
|
|
15
|
-
timber : "4.7.1",
|
|
16
|
-
dagger : "2.27",
|
|
17
|
-
assistedInject : "0.5.2",
|
|
18
|
-
butterknife : "10.2.1",
|
|
19
|
-
zoom : '8.7.0@aar',
|
|
20
|
-
cameraView : '2.6.1',
|
|
21
|
-
statusbarUtil : '1.5.1',
|
|
22
|
-
regulaCore : '5.1.2553@aar',
|
|
23
|
-
regulaApi : '5.1.2149@aar',
|
|
24
|
-
gifDrawable : '1.2.19',
|
|
25
|
-
chromeTabs : '23.3.0',
|
|
26
|
-
chromeTabsHelper : '2.0.0',
|
|
27
|
-
|
|
28
|
-
junit : "4.12",
|
|
29
|
-
mockitoCore : "3.3.0",
|
|
30
|
-
mockitoKotlin : "2.2.0",
|
|
31
|
-
robolectric : "4.1",
|
|
32
|
-
coroutinesTest : "1.3.2",
|
|
33
|
-
archCoreTesting : "2.1.0",
|
|
34
|
-
androidJUnit : "1.1.1",
|
|
35
|
-
espresso : "3.2.0",
|
|
36
|
-
]
|
|
37
|
-
|
|
38
|
-
def build = [
|
|
39
|
-
androidPlugin : "com.android.tools.build:gradle:${versions.androidPlugin}",
|
|
40
|
-
kotlinPlugin : "org.jetbrains.kotlin:kotlin-gradle-plugin:${versions.kotlin}",
|
|
41
|
-
butterknifePlugin : "com.jakewharton:butterknife-gradle-plugin:${versions.butterknife}",
|
|
42
|
-
]
|
|
43
|
-
|
|
44
|
-
def buildConfig = [
|
|
45
|
-
buildTools: "29.0.2",
|
|
46
|
-
compileSdk: 29,
|
|
47
|
-
minSdk : 19,
|
|
48
|
-
targetSdk : 29,
|
|
49
|
-
]
|
|
50
|
-
|
|
51
|
-
def apt = [
|
|
52
|
-
daggerCompiler : "com.google.dagger:dagger-compiler:${versions.dagger}",
|
|
53
|
-
daggerAndroidProcessor : "com.google.dagger:dagger-android-processor:${versions.dagger}",
|
|
54
|
-
butterknifeCompiler : "com.jakewharton:butterknife-compiler:${versions.butterknife}",
|
|
55
|
-
assistedInjectProcessor : "com.squareup.inject:assisted-inject-processor-dagger2:${versions.assistedInject}",
|
|
56
|
-
]
|
|
57
|
-
|
|
58
|
-
def external = [
|
|
59
|
-
kotlinStdlib : "org.jetbrains.kotlin:kotlin-stdlib:${versions.kotlin}",
|
|
60
|
-
coroutinesCore : "org.jetbrains.kotlinx:kotlinx-coroutines-core:${versions.coroutines}",
|
|
61
|
-
coroutinesAndroid : "org.jetbrains.kotlinx:kotlinx-coroutines-android:${versions.coroutines}",
|
|
62
|
-
retrofit : "com.squareup.retrofit2:retrofit:${versions.retrofit}",
|
|
63
|
-
gsonConverter : "com.squareup.retrofit2:converter-gson:${versions.gsonConverter}",
|
|
64
|
-
okhttp : "com.squareup.okhttp3:okhttp:${versions.okhttp}",
|
|
65
|
-
okhttpLogging : "com.squareup.okhttp3:logging-interceptor:${versions.okhttp}",
|
|
66
|
-
timber : "com.jakewharton.timber:timber:${versions.timber}",
|
|
67
|
-
dagger : "com.google.dagger:dagger:${versions.dagger}",
|
|
68
|
-
daggerAndroid : "com.google.dagger:dagger-android:${versions.dagger}",
|
|
69
|
-
daggerSuppAndroid : "com.google.dagger:dagger-android-support:${versions.dagger}",
|
|
70
|
-
assistedInject : "com.squareup.inject:assisted-inject-annotations-dagger2:${versions.assistedInject}",
|
|
71
|
-
butterknife : "com.jakewharton:butterknife:${versions.butterknife}",
|
|
72
|
-
zoom : "com.facetec.zoom.sdk:zoom-authentication:${versions.zoom}",
|
|
73
|
-
cameraView : "com.otaliastudios:cameraview:${versions.cameraView}",
|
|
74
|
-
statusbarUtil : "com.jaeger.statusbarutil:library:${versions.statusbarUtil}",
|
|
75
|
-
regulaCore : "com.regula.documentreader.doctype:core:${versions.regulaCore}",
|
|
76
|
-
regulaApi : "com.regula.documentreader:api:${versions.regulaApi}",
|
|
77
|
-
gifDrawable : "pl.droidsonroids.gif:android-gif-drawable:${versions.gifDrawable}",
|
|
78
|
-
chromeTabs : "com.android.support:customtabs:${versions.chromeTabs}",
|
|
79
|
-
chromeTabsHelper : "saschpe.android:customtabs:${versions.chromeTabsHelper}",
|
|
80
|
-
]
|
|
81
|
-
|
|
82
|
-
def lint = [ ]
|
|
83
|
-
|
|
84
|
-
def androidx = [
|
|
85
|
-
material : "com.google.android.material:material:${versions.androidx}",
|
|
86
|
-
annotations : "androidx.annotation:annotation:${versions.androidx}",
|
|
87
|
-
appCompat : "androidx.appcompat:appcompat:${versions.androidx}",
|
|
88
|
-
constraintLayout : "androidx.constraintlayout:constraintlayout:${versions.constraintLayout}",
|
|
89
|
-
coreKtx : "androidx.core:core-ktx:${versions.coreKtx}",
|
|
90
|
-
lifecycleKtx : "androidx.lifecycle:lifecycle-extensions:${versions.lifecycleKtx}",
|
|
91
|
-
livedataKtx : "androidx.lifecycle:lifecycle-livedata-ktx:${versions.lifecycleKtx}",
|
|
92
|
-
runtimeKtx : "androidx.lifecycle:lifecycle-runtime-ktx:${versions.lifecycleKtx}",
|
|
93
|
-
viewmodelKtx : "androidx.lifecycle:lifecycle-viewmodel-ktx:${versions.lifecycleKtx}",
|
|
94
|
-
lifecycleCommonJava8 : "androidx.lifecycle:lifecycle-common-java8:${versions.lifecycleKtx}",
|
|
95
|
-
viewmodelSavedState : "androidx.lifecycle:lifecycle-viewmodel-savedstate:${versions.viewmodelSavedState}",
|
|
96
|
-
fragmentKtx : "androidx.fragment:fragment-ktx:${versions.fragmentKtx}",
|
|
97
|
-
]
|
|
98
|
-
|
|
99
|
-
def test = [
|
|
100
|
-
junit : "junit:junit:${versions.junit}",
|
|
101
|
-
mokito : "org.mockito:mockito-core:${versions.mockitoCore}",
|
|
102
|
-
mokitoKotlin : "com.nhaarman.mockitokotlin2:mockito-kotlin:${versions.mockitoKotlin}",
|
|
103
|
-
robolectric : "org.robolectric:robolectric:${versions.robolectric}",
|
|
104
|
-
coroutinesTest : "org.jetbrains.kotlinx:kotlinx-coroutines-test:${versions.coroutinesTest}",
|
|
105
|
-
archCoreTesting : "androidx.arch.core:core-testing:${versions.archCoreTesting}",
|
|
106
|
-
androidJUnit : "androidx.test.ext:junit:${versions.androidJUnit}",
|
|
107
|
-
espresso : "androidx.test.espresso:espresso-core:${versions.espresso}",
|
|
108
|
-
]
|
|
109
|
-
|
|
110
|
-
ext.config = [
|
|
111
|
-
"build": buildConfig,
|
|
112
|
-
]
|
|
113
|
-
|
|
114
|
-
ext.deps = [
|
|
115
|
-
"androidx": androidx,
|
|
116
|
-
"apt" : apt,
|
|
117
|
-
"build" : build,
|
|
118
|
-
"external": external,
|
|
119
|
-
"lint" : lint,
|
|
120
|
-
"test" : test,
|
|
121
|
-
"versions": versions,
|
|
122
|
-
]
|
|
@@ -1,122 +0,0 @@
|
|
|
1
|
-
def versions = [
|
|
2
|
-
androidPlugin : "3.5.3",
|
|
3
|
-
|
|
4
|
-
kotlin : "1.4.0",
|
|
5
|
-
androidx : "1.1.0",
|
|
6
|
-
constraintLayout : "1.1.3",
|
|
7
|
-
coreKtx : "1.1.0",
|
|
8
|
-
lifecycleKtx : "2.2.0",
|
|
9
|
-
fragmentKtx : "1.2.0",
|
|
10
|
-
viewmodelSavedState : "1.0.0",
|
|
11
|
-
coroutines : "1.3.3",
|
|
12
|
-
retrofit : "2.6.4",
|
|
13
|
-
gsonConverter : "2.6.4",
|
|
14
|
-
okhttp : "3.12.11",
|
|
15
|
-
timber : "4.7.1",
|
|
16
|
-
dagger : "2.27",
|
|
17
|
-
assistedInject : "0.5.2",
|
|
18
|
-
butterknife : "10.2.1",
|
|
19
|
-
zoom : '8.7.0@aar',
|
|
20
|
-
cameraView : '2.6.1',
|
|
21
|
-
statusbarUtil : '1.5.1',
|
|
22
|
-
regulaCore : '5.1.2553@aar',
|
|
23
|
-
regulaApi : '5.1.2149@aar',
|
|
24
|
-
gifDrawable : '1.2.19',
|
|
25
|
-
chromeTabs : '23.3.0',
|
|
26
|
-
chromeTabsHelper : '2.0.0',
|
|
27
|
-
|
|
28
|
-
junit : "4.12",
|
|
29
|
-
mockitoCore : "3.3.0",
|
|
30
|
-
mockitoKotlin : "2.2.0",
|
|
31
|
-
robolectric : "4.1",
|
|
32
|
-
coroutinesTest : "1.3.2",
|
|
33
|
-
archCoreTesting : "2.1.0",
|
|
34
|
-
androidJUnit : "1.1.1",
|
|
35
|
-
espresso : "3.2.0",
|
|
36
|
-
]
|
|
37
|
-
|
|
38
|
-
def build = [
|
|
39
|
-
androidPlugin : "com.android.tools.build:gradle:${versions.androidPlugin}",
|
|
40
|
-
kotlinPlugin : "org.jetbrains.kotlin:kotlin-gradle-plugin:${versions.kotlin}",
|
|
41
|
-
butterknifePlugin : "com.jakewharton:butterknife-gradle-plugin:${versions.butterknife}",
|
|
42
|
-
]
|
|
43
|
-
|
|
44
|
-
def buildConfig = [
|
|
45
|
-
buildTools: "29.0.2",
|
|
46
|
-
compileSdk: 29,
|
|
47
|
-
minSdk : 19,
|
|
48
|
-
targetSdk : 29,
|
|
49
|
-
]
|
|
50
|
-
|
|
51
|
-
def apt = [
|
|
52
|
-
daggerCompiler : "com.google.dagger:dagger-compiler:${versions.dagger}",
|
|
53
|
-
daggerAndroidProcessor : "com.google.dagger:dagger-android-processor:${versions.dagger}",
|
|
54
|
-
butterknifeCompiler : "com.jakewharton:butterknife-compiler:${versions.butterknife}",
|
|
55
|
-
assistedInjectProcessor : "com.squareup.inject:assisted-inject-processor-dagger2:${versions.assistedInject}",
|
|
56
|
-
]
|
|
57
|
-
|
|
58
|
-
def external = [
|
|
59
|
-
kotlinStdlib : "org.jetbrains.kotlin:kotlin-stdlib:${versions.kotlin}",
|
|
60
|
-
coroutinesCore : "org.jetbrains.kotlinx:kotlinx-coroutines-core:${versions.coroutines}",
|
|
61
|
-
coroutinesAndroid : "org.jetbrains.kotlinx:kotlinx-coroutines-android:${versions.coroutines}",
|
|
62
|
-
retrofit : "com.squareup.retrofit2:retrofit:${versions.retrofit}",
|
|
63
|
-
gsonConverter : "com.squareup.retrofit2:converter-gson:${versions.gsonConverter}",
|
|
64
|
-
okhttp : "com.squareup.okhttp3:okhttp:${versions.okhttp}",
|
|
65
|
-
okhttpLogging : "com.squareup.okhttp3:logging-interceptor:${versions.okhttp}",
|
|
66
|
-
timber : "com.jakewharton.timber:timber:${versions.timber}",
|
|
67
|
-
dagger : "com.google.dagger:dagger:${versions.dagger}",
|
|
68
|
-
daggerAndroid : "com.google.dagger:dagger-android:${versions.dagger}",
|
|
69
|
-
daggerSuppAndroid : "com.google.dagger:dagger-android-support:${versions.dagger}",
|
|
70
|
-
assistedInject : "com.squareup.inject:assisted-inject-annotations-dagger2:${versions.assistedInject}",
|
|
71
|
-
butterknife : "com.jakewharton:butterknife:${versions.butterknife}",
|
|
72
|
-
zoom : "com.facetec.zoom.sdk:zoom-authentication:${versions.zoom}",
|
|
73
|
-
cameraView : "com.otaliastudios:cameraview:${versions.cameraView}",
|
|
74
|
-
statusbarUtil : "com.jaeger.statusbarutil:library:${versions.statusbarUtil}",
|
|
75
|
-
regulaCore : "com.regula.documentreader.doctype:core:${versions.regulaCore}",
|
|
76
|
-
regulaApi : "com.regula.documentreader:api:${versions.regulaApi}",
|
|
77
|
-
gifDrawable : "pl.droidsonroids.gif:android-gif-drawable:${versions.gifDrawable}",
|
|
78
|
-
chromeTabs : "com.android.support:customtabs:${versions.chromeTabs}",
|
|
79
|
-
chromeTabsHelper : "saschpe.android:customtabs:${versions.chromeTabsHelper}",
|
|
80
|
-
]
|
|
81
|
-
|
|
82
|
-
def lint = [ ]
|
|
83
|
-
|
|
84
|
-
def androidx = [
|
|
85
|
-
material : "com.google.android.material:material:${versions.androidx}",
|
|
86
|
-
annotations : "androidx.annotation:annotation:${versions.androidx}",
|
|
87
|
-
appCompat : "androidx.appcompat:appcompat:${versions.androidx}",
|
|
88
|
-
constraintLayout : "androidx.constraintlayout:constraintlayout:${versions.constraintLayout}",
|
|
89
|
-
coreKtx : "androidx.core:core-ktx:${versions.coreKtx}",
|
|
90
|
-
lifecycleKtx : "androidx.lifecycle:lifecycle-extensions:${versions.lifecycleKtx}",
|
|
91
|
-
livedataKtx : "androidx.lifecycle:lifecycle-livedata-ktx:${versions.lifecycleKtx}",
|
|
92
|
-
runtimeKtx : "androidx.lifecycle:lifecycle-runtime-ktx:${versions.lifecycleKtx}",
|
|
93
|
-
viewmodelKtx : "androidx.lifecycle:lifecycle-viewmodel-ktx:${versions.lifecycleKtx}",
|
|
94
|
-
lifecycleCommonJava8 : "androidx.lifecycle:lifecycle-common-java8:${versions.lifecycleKtx}",
|
|
95
|
-
viewmodelSavedState : "androidx.lifecycle:lifecycle-viewmodel-savedstate:${versions.viewmodelSavedState}",
|
|
96
|
-
fragmentKtx : "androidx.fragment:fragment-ktx:${versions.fragmentKtx}",
|
|
97
|
-
]
|
|
98
|
-
|
|
99
|
-
def test = [
|
|
100
|
-
junit : "junit:junit:${versions.junit}",
|
|
101
|
-
mokito : "org.mockito:mockito-core:${versions.mockitoCore}",
|
|
102
|
-
mokitoKotlin : "com.nhaarman.mockitokotlin2:mockito-kotlin:${versions.mockitoKotlin}",
|
|
103
|
-
robolectric : "org.robolectric:robolectric:${versions.robolectric}",
|
|
104
|
-
coroutinesTest : "org.jetbrains.kotlinx:kotlinx-coroutines-test:${versions.coroutinesTest}",
|
|
105
|
-
archCoreTesting : "androidx.arch.core:core-testing:${versions.archCoreTesting}",
|
|
106
|
-
androidJUnit : "androidx.test.ext:junit:${versions.androidJUnit}",
|
|
107
|
-
espresso : "androidx.test.espresso:espresso-core:${versions.espresso}",
|
|
108
|
-
]
|
|
109
|
-
|
|
110
|
-
ext.config = [
|
|
111
|
-
"build": buildConfig,
|
|
112
|
-
]
|
|
113
|
-
|
|
114
|
-
ext.deps = [
|
|
115
|
-
"androidx": androidx,
|
|
116
|
-
"apt" : apt,
|
|
117
|
-
"build" : build,
|
|
118
|
-
"external": external,
|
|
119
|
-
"lint" : lint,
|
|
120
|
-
"test" : test,
|
|
121
|
-
"versions": versions,
|
|
122
|
-
]
|