Skip to content

Commit

Permalink
Public release VGS Collect v1.6.19
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmytro Kos authored May 30, 2022
1 parent 96bd4e3 commit 67f0865
Show file tree
Hide file tree
Showing 659 changed files with 143,908 additions and 129,919 deletions.
10 changes: 0 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ Table of contents
=================

<!--ts-->
* [Dependencies](#dependencies)
* [Structure](#structure)
* [Integration](#integration)
* [Next steps](#next-steps)
Expand All @@ -22,15 +21,6 @@ Table of contents
<img src="/img/vgs-collect-android-state.png" width="200" alt="VGS Collect Android SDK States" hspace="20"><img src="/img/vgs-collect-android-response.png" width="200" alt="VGS Collect Android SDK Response" hspace="20">
</p>

## Dependencies

| Dependency | Version |
| :--- | :---: |
| Min SDK | 19 |
| Target SDK | 32 |
| androidx.appcompat:appcompat | 1.4.1 |
| com.google.android.material:material | 1.5.0 |
| com.squareup.okhttp3:okhttp | 4.9.3 |

## Structure
* **VGSCollect SDK** - provides an API for interacting with the VGS Vault
Expand Down
114 changes: 43 additions & 71 deletions app/build.gradle
Original file line number Diff line number Diff line change
@@ -1,107 +1,79 @@
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
plugins {
id 'com.android.application'
id 'kotlin-android'
id 'kotlin-android-extensions'
}

android {
compileSdkVersion 31
compileSdkVersion 32

defaultConfig {
applicationId "com.verygoodsecurity.demoapp"
minSdkVersion 19
targetSdkVersion 31
targetSdkVersion 32
versionCode 1
versionName "1.0"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

multiDexEnabled true

buildConfigField("String", "VAULT_ID", "\"${getLocalProperty("VGS_VAULT_ID")}\"")
buildConfigField("String", "PATH", "\"${getLocalProperty("VGS_PATH")}\"")
}

buildTypes {
release {
buildConfigField("com.verygoodsecurity.vgscollect.core.Environment", "ENVIRINMENT", getEnvironmentRelease())

debug {
buildConfigField(
"com.verygoodsecurity.vgscollect.core.Environment",
"ENVIRINMENT",
"com.verygoodsecurity.vgscollect.core.Environment.SANDBOX"
)
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
debug {
buildConfigField "com.verygoodsecurity.vgscollect.core.Environment", "ENVIRINMENT", getEnvironmentDebug()

release {
buildConfigField(
"com.verygoodsecurity.vgscollect.core.Environment",
"ENVIRINMENT",
"com.verygoodsecurity.vgscollect.core.Environment.LIVE"
)
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}

kotlinOptions {
jvmTarget = JavaVersion.VERSION_1_8.toString()
}
compileOptions {
sourceCompatibility = 1.8
targetCompatibility = 1.8
}

applicationVariants.all { variant ->
String vari = getLocalProperty("VGS_VAULT_ID")
variant.resValue "string", "vault_id", vari+''
String vari2 = getLocalProperty("VGS_ENDPOINT")
variant.resValue "string", "endpoint", vari2+''
}
}

static def getEnvironmentRelease() {
return "com.verygoodsecurity.vgscollect.core.Environment.LIVE"
}
static def getEnvironmentDebug() {
return "com.verygoodsecurity.vgscollect.core.Environment.SANDBOX"
}

def getLocalProperty(String propName) {
def propsFile = rootProject.file('local.properties')
if (propsFile.exists()) {
def props = new Properties()
props.load(new FileInputStream(propsFile))
def value = props[propName]
if(value == null) {
return ""
} else {
return value
}

} else {
return ""
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}

dependencies {
implementation project(":vgscollect")
implementation project(":vgscollect-cardio")
// implementation project(":vgscollect-bouncer")

implementation "androidx.appcompat:appcompat:$android_support_libraries"
implementation "androidx.core:core-ktx:$androidx_core_ktx_version"
implementation 'androidx.constraintlayout:constraintlayout:2.1.3'
implementation "com.google.android.material:material:$android_material_version"
implementation "androidx.appcompat:appcompat:${versions.appcompat}"
implementation "androidx.core:core-ktx:${versions.core_ktx}"
implementation "androidx.constraintlayout:constraintlayout:${versions.constraintlayout}"
implementation "com.google.android.material:material:${versions.material}"

implementation 'com.google.android.gms:play-services-auth:20.0.1'
implementation "androidx.multidex:multidex:${versions.multidex}"

implementation 'androidx.multidex:multidex:2.0.1'
debugImplementation "com.squareup.leakcanary:leakcanary-android:${versions.leakcanary}"

debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.8.1'
testImplementation "junit:junit:${testVersions.junit}"

testImplementation "junit:junit:$junit_version"
androidTestImplementation "androidx.test:rules:$androidx_test_rules_version"
androidTestImplementation "androidx.test.ext:junit:$androidx_test_junit_version"
androidTestImplementation "androidx.test:runner:$androidx_test_runner_version"
androidTestImplementation "androidx.test:rules:$androidx_test_rules_version"
androidTestImplementation 'androidx.test:core-ktx:1.4.0'
androidTestImplementation "androidx.test.ext:junit-ktx:$androidx_test_junit_version"
androidTestImplementation 'org.hamcrest:hamcrest-integration:1.3'
androidTestImplementation 'androidx.test.uiautomator:uiautomator:2.2.0'
androidTestImplementation "androidx.test.espresso:espresso-intents:3.4.0"
androidTestImplementation "androidx.test.espresso:espresso-core:$androidx_test_espresso_espresso_core_version"
androidTestImplementation('com.android.support.test.espresso:espresso-contrib:3.0.2') {
exclude group: 'com.android.support', module: 'appcompat'
exclude module: 'support-annotations'
exclude module: 'support-v4'
exclude module: 'support-v13'
exclude module: 'recyclerview-v7'
exclude module: 'appcompat-v7'
}
androidTestImplementation "androidx.test:runner:${testVersions.test_runner}"
androidTestImplementation "androidx.test:rules:${testVersions.test_rules}"
androidTestImplementation "androidx.test.ext:junit:${testVersions.junit_ext}"
androidTestImplementation "androidx.test.ext:junit-ktx:${testVersions.junit_ext_ktx}"
androidTestImplementation "androidx.test.uiautomator:uiautomator:${testVersions.uiautomator}"
androidTestImplementation "androidx.test.espresso:espresso-intents:${testVersions.espresso_intents}"
androidTestImplementation "androidx.test.espresso:espresso-core:${testVersions.espresso_core}"
androidTestImplementation "com.android.support.test.espresso:espresso-contrib:${testVersions.espresso_contrib}"
}
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class FragmentCaseInstrumentedTest {
const val CARD_HOLDER = "Gohn Galt"

const val CARD_EXP_DATE_WRONG = "99/9999"
const val CARD_EXP_DATE= "02/22"
const val CARD_EXP_DATE= "02/32"

const val CARD_CVC_WRONG = "12"
const val CARD_CVC= "123"
Expand Down
49 changes: 31 additions & 18 deletions app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,41 +3,54 @@
xmlns:tools="http://schemas.android.com/tools"
package="com.verygoodsecurity.demoapp">

<uses-sdk tools:overrideLibrary="android.support.test.uiautomator.v18"/>
<uses-sdk tools:overrideLibrary="android.support.test.uiautomator.v18" />

<application
android:name=".DemoApplication"
android:allowBackup="false"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:roundIcon="@mipmap/ic_launcher_round"
android:supportsRtl="true"
android:theme="@style/AppTheme">

<activity android:name=".StartActivity"
android:theme="@style/AppTheme.StartActivity"
<activity
android:name=".StartActivity"
android:exported="true"
android:screenOrientation="portrait">
android:screenOrientation="portrait"
android:theme="@style/AppTheme.StartActivity"
tools:ignore="LockedOrientationActivity">

<intent-filter>

<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>


<activity android:name=".activity_case.VGSCollectActivity"
android:label="Activity Demo"/>
<activity android:name=".fragment_case.VGSCollectFragmentActivity"
android:label="Fragment Demo"/>
<activity android:name=".viewpager_case.VGSViewPagerActivity"
android:label="ViewPager Demo"/>
<activity android:name=".instrumented.VGSEditTextInputTypeActivity"
android:label="Instrumented Demo"/>
<activity android:name=".instrumented.VGSEditTextActivity"
android:label="Instrumented Demo"/>
<activity android:name=".instrumented.CustomBrandsActivity"
android:label="Instrumented Demo"/>
</application>
<activity
android:name=".activity_case.VGSCollectActivity"
android:label="Activity Demo" />

<activity
android:name=".fragment_case.VGSCollectFragmentActivity"
android:label="Fragment Demo" />

<activity
android:name=".viewpager_case.VGSViewPagerActivity"
android:label="ViewPager Demo" />

<activity
android:name=".instrumented.VGSEditTextInputTypeActivity"
android:label="Instrumented Demo" />

<activity
android:name=".instrumented.VGSEditTextActivity"
android:label="Instrumented Demo" />

<activity
android:name=".instrumented.CustomBrandsActivity"
android:label="Instrumented Demo" />
</application>
</manifest>
26 changes: 0 additions & 26 deletions app/src/main/java/com/verygoodsecurity/demoapp/DemoApplication.kt

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@ class StartActivity:AppCompatActivity(), View.OnClickListener {
}

private fun setupUI() {
userVault?.setText(R.string.vault_id)
userPath?.setText(R.string.endpoint)
userVault?.setText(BuildConfig.VAULT_ID)
userPath?.setText(BuildConfig.PATH)

environmentSpinner.setSelection(BuildConfig.ENVIRINMENT.ordinal)
}
Expand Down
17 changes: 7 additions & 10 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,21 +1,18 @@
apply from: 'gradle/gradle-dependencies.gradle'

buildscript {
ext.kotlin_version = '1.6.10'
ext.dokka_version = '1.6.10'
apply from: 'gradle/dependencies.gradle'
apply from: 'gradle/utils.gradle'

repositories {
mavenCentral()
google()
}

dependencies {
classpath 'com.android.tools.build:gradle:7.1.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"

classpath 'com.github.dcendents:android-maven-gradle-plugin:2.1'
classpath 'com.vanniktech:gradle-maven-publish-plugin:0.18.0'
classpath "org.jetbrains.dokka:dokka-gradle-plugin:$dokka_version"
classpath "com.android.tools.build:gradle:${versions.gradle_tools}"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:${versions.gradle_kotlin_plugin}"
classpath "com.github.dcendents:android-maven-gradle-plugin:${versions.gradle_maven_plugin}"
classpath "com.vanniktech:gradle-maven-publish-plugin:${versions.maven_publish_plugin}"
classpath "org.jetbrains.dokka:dokka-gradle-plugin:${versions.gradle_dokka_plugin}"
}
}

Expand Down
2 changes: 1 addition & 1 deletion docs/images/anchor-copy-button.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/images/arrow_down.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions docs/images/copy-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/images/copy-successful-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/images/footer-go-to-link.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/images/go-to-top-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions docs/images/logo-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions docs/images/theme-toggle.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 67f0865

Please sign in to comment.