-
Notifications
You must be signed in to change notification settings - Fork 629
/
build.gradle
150 lines (129 loc) · 6.61 KB
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
plugins {
id 'com.android.application'
id 'kotlin-android'
id 'org.jetbrains.kotlin.plugin.serialization'
id 'shot'
}
// Read values from gradle.properties or system environment variable
def getBackendUrl() {
return findProperty('STRIPE_PAYMENTSHEET_EXAMPLE_BACKEND_URL') ?: ""
}
dependencies {
implementation project(':payments-core')
implementation project(':paymentsheet')
implementation project(':stripecardscan')
implementation project(':financial-connections')
implementation "com.google.android.libraries.places:places:$placesVersion"
implementation "androidx.lifecycle:lifecycle-livedata-ktx:$androidxLifecycleVersion"
implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:$androidxLifecycleVersion"
implementation "androidx.preference:preference-ktx:$androidxPreferenceVersion"
implementation "androidx.core:core-ktx:$androidxCoreVersion"
implementation "androidx.appcompat:appcompat:$androidxAppcompatVersion"
implementation "androidx.constraintlayout:constraintlayout:$androidxConstraintlayoutVersion"
implementation "androidx.navigation:navigation-fragment-ktx:$androidxNavigationVersion"
implementation "androidx.navigation:navigation-ui-ktx:$androidxNavigationVersion"
implementation "androidx.activity:activity-ktx:$androidxActivityVersion"
implementation "com.google.android.material:material:$materialVersion"
implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:$kotlinSerializationVersion"
implementation 'com.squareup.okhttp3:logging-interceptor:4.10.0'
implementation "com.jakewharton.retrofit:retrofit2-kotlinx-serialization-converter:0.8.0"
implementation 'com.github.kittinunf.fuel:fuel:2.3.1'
implementation 'com.google.code.gson:gson:2.9.0'
implementation 'com.godaddy.android.colorpicker:compose-color-picker-android:0.4.2'
implementation "androidx.compose.ui:ui:$androidxComposeVersion"
// Tooling support (Previews, etc.)
implementation "androidx.compose.ui:ui-tooling:$androidxComposeVersion"
// Foundation (Border, Background, Box, Image, Scroll, shapes, animations, etc.)
implementation "androidx.compose.foundation:foundation:$androidxComposeVersion"
// Material Design
implementation "androidx.compose.material:material:$androidxComposeVersion"
// Material design icons
implementation "androidx.compose.material:material-icons-core:$androidxComposeVersion"
implementation "androidx.compose.material:material-icons-extended:$androidxComposeVersion"
// Integration with activities
implementation "androidx.activity:activity-compose:$androidxActivityVersion"
// Integration with ViewModels
implementation "androidx.lifecycle:lifecycle-viewmodel-compose:$androidxLifecycleVersion"
// Integration with observables
implementation "androidx.compose.runtime:runtime-livedata:$androidxComposeVersion"
androidTestImplementation 'com.google.android.gms:play-services-wallet:19.1.0'
androidTestImplementation "androidx.test.uiautomator:uiautomator:$uiautomator"
testImplementation "junit:junit:$junitVersion"
androidTestImplementation "androidx.test.ext:junit:$androidTestJunitVersion"
androidTestImplementation "androidx.test.espresso:espresso-core:$espressoVersion"
// Core library
androidTestImplementation "androidx.test:core:$androidTestVersion"
androidTestImplementation 'androidx.test:core-ktx:1.1.0'
// AndroidJUnitRunner and JUnit Rules
androidTestImplementation "androidx.test:runner:$androidTestVersion"
androidTestImplementation "androidx.test:rules:$androidTestVersion"
// Assertions
androidTestImplementation "androidx.test.ext:junit:$androidTestJunitVersion"
androidTestImplementation "androidx.test.ext:truth:$androidTestVersion"
androidTestImplementation "com.google.truth:truth:$truthVersion"
androidTestImplementation "androidx.arch.core:core-testing:$androidxArchCoreVersion"
// Espresso dependencies
androidTestImplementation "androidx.test.espresso:espresso-core:$espressoVersion"
androidTestImplementation("androidx.test.espresso:espresso-contrib:$espressoVersion") {
exclude group: 'org.checkerframework', module: 'checker'
}
debugImplementation "androidx.test.espresso:espresso-intents:$espressoVersion"
androidTestImplementation("androidx.test.espresso:espresso-accessibility:$espressoVersion") {
exclude group: 'org.checkerframework', module: 'checker'
}
androidTestImplementation "androidx.test.espresso:espresso-web:$espressoVersion"
androidTestImplementation "androidx.test.espresso.idling:idling-concurrent:$espressoVersion"
// The following Espresso dependency can be either "implementation"
// or "androidTestImplementation", depending on whether you want the
// dependency to appear on your APK's compile classpath or the test APK
// classpath.
implementation "androidx.test.espresso:espresso-idling-resource:$espressoVersion"
androidTestImplementation 'com.jakewharton.espresso:okhttp3-idling-resource:1.0.0'
// Test rules and transitive dependencies:
androidTestImplementation "androidx.compose.ui:ui-test-junit4:$androidxComposeVersion"
androidTestImplementation project(path: ':payments-ui-core')
// Needed for createComposeRule, but not createAndroidComposeRule:
debugImplementation "androidx.compose.ui:ui-test-manifest:$androidxComposeVersion"
}
shot {
tolerance = 1 // 1% tolerance because screenshots look slightly different on arm64-v8a vs x86_64 vs m1 emulators
}
android {
compileSdkVersion rootProject.ext.compileSdkVersion
buildToolsVersion rootProject.ext.buildToolsVersion
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
defaultConfig {
applicationId "com.stripe.android.paymentsheet.example"
minSdkVersion 21
targetSdkVersion rootProject.ext.compileSdkVersion
versionCode 9
versionName VERSION_NAME
testInstrumentationRunner "com.karumi.shot.ShotTestRunner"
manifestPlaceholders = [
BACKEND_URL: getBackendUrl()
]
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
buildFeatures {
viewBinding true
compose true
}
composeOptions {
kotlinCompilerExtensionVersion "$androidxComposeVersion"
}
testOptions {
// Make sure animations are off when we run espresso tests
animationsDisabled = true
}
}