Skip to content

Commit

Permalink
Set up Connect SDK Module (#9203)
Browse files Browse the repository at this point in the history
* Create skeleton of stripe-connect module

* Add codeowners, add example, push

* Update CODEOWNERS

* Revert change to gradle properties (un-needed)

* Remove last line

* Add dependencies, fix lint

* Fix lint, restrict to library, clarify comment

* Generate new api file

* Fix manifest
  • Loading branch information
simond-stripe authored Sep 9, 2024
1 parent 2b7daa5 commit add5c86
Show file tree
Hide file tree
Showing 20 changed files with 1,659 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,7 @@
# Financial Connections SDK
/financial-connections/ @stripe/android-connections-reviewers @stripe/android-sdk-reviewers @stripe/android-sdk-non-core-reviewers
/financial-connections-example/ @stripe/android-connections-reviewers @stripe/android-sdk-reviewers @stripe/android-sdk-non-core-reviewers

# Stripe Connect SDK
/stripe-connect/ @stripe/mx-mobile-reviewers
/stripe-connect-example/ @stripe/mx-mobile-reviewers
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ apiValidation {
"payments-core-testing",
"paymentsheet-example",
"stripecardscan-example",
"stripe-connect-example",
"screenshot-testing",
"3ds2playground",
]
Expand Down
2 changes: 2 additions & 0 deletions settings.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ include ':stripe-ui-core'
include ':stripecardscan'
include ':stripecardscan-example'
include ':stripecardscan-tflite'
include ':stripe-connect'
include ':stripe-connect-example'
include ':wechatpay'
include ':ml-core:base'
include ':ml-core:default'
Expand Down
1 change: 1 addition & 0 deletions stripe-connect-example/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/build
126 changes: 126 additions & 0 deletions stripe-connect-example/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,126 @@
apply from: configs.androidApplication

apply plugin: 'com.google.devtools.ksp'
apply plugin: "org.jetbrains.kotlin.plugin.parcelize"
apply plugin: 'org.jetbrains.kotlin.plugin.serialization'

dependencies {
implementation project(":stripe-connect")

// Kotlin
implementation libs.kotlin.coroutines
implementation libs.kotlin.coroutinesAndroid
implementation libs.kotlin.serialization

// AndroidX
implementation libs.androidx.activity
implementation libs.androidx.annotation
implementation libs.androidx.appCompat
implementation libs.androidx.browser
implementation libs.androidx.fragment
implementation libs.androidx.lifecycle
implementation libs.androidx.savedState
implementation libs.androidx.viewModel

// Compose
implementation libs.compose.ui
implementation libs.compose.uiViewBinding
implementation libs.compose.foundation
implementation libs.compose.material
implementation libs.compose.materialIcons
implementation libs.compose.activity
implementation libs.compose.navigation
implementation libs.accompanist.systemUiController

// Test
testImplementation testLibs.androidx.archCore
testImplementation testLibs.androidx.composeUi
testImplementation testLibs.androidx.core
testImplementation testLibs.androidx.fragment
testImplementation testLibs.androidx.junit
testImplementation testLibs.androidx.junitKtx
testImplementation testLibs.androidx.lifecycle
testImplementation testLibs.androidx.testRules
testImplementation testLibs.hamcrest
testImplementation testLibs.junit
testImplementation testLibs.json
testImplementation testLibs.kotlin.annotations
testImplementation testLibs.kotlin.coroutines
testImplementation testLibs.kotlin.junit
testImplementation testLibs.mockito.core
testImplementation testLibs.mockito.inline
testImplementation testLibs.mockito.kotlin
testImplementation testLibs.robolectric
testImplementation testLibs.truth

androidTestImplementation testLibs.androidx.composeUi
androidTestImplementation testLibs.androidx.coreKtx
androidTestImplementation testLibs.androidx.junit
androidTestImplementation testLibs.androidx.junitKtx
androidTestImplementation testLibs.androidx.testRules
androidTestImplementation testLibs.androidx.testRunner
androidTestImplementation testLibs.androidx.truth
androidTestImplementation testLibs.androidx.uiAutomator
androidTestImplementation testLibs.espresso.core
androidTestImplementation (testLibs.espresso.contrib) {
exclude group: 'org.checkerframework', module: 'checker'
}
androidTestImplementation testLibs.mockito.core
androidTestImplementation testLibs.mockito.inline
androidTestImplementation testLibs.mockito.kotlin
androidTestImplementation libs.leakCanary
androidTestImplementation testLibs.leakCanaryInstrumentation
androidTestImplementation testLibs.testParameterInjector
androidTestImplementation testLibs.truth

androidTestUtil testLibs.testOrchestrator
}

android {
defaultConfig {
testApplicationId "com.stripe.android.connectsdk.example.test"
}

buildFeatures {
compose = true
viewBinding true
}

testOptions {
unitTests {
// Note: without this, all Robolectric tests using assets will fail.
includeAndroidResources = true
all {
maxHeapSize = "1024m"
}
}

kotlinOptions {
freeCompilerArgs += ["-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi"]
}

managedDevices {
localDevices {
register("pixel2api33") {
device = "Pixel 2"
apiLevel = 33
systemImageSource = "aosp"
}
}
}
}

composeOptions {
kotlinCompilerExtensionVersion "${versions.androidxComposeCompiler}"
}

kotlinOptions {
freeCompilerArgs += [
"-opt-in=kotlinx.coroutines.FlowPreview",
"-Xcontext-receivers",
]
if (gradle.ext.isCi) {
kotlinOptions.allWarningsAsErrors = true
}
}
}
Loading

0 comments on commit add5c86

Please sign in to comment.