Skip to content

Commit

Permalink
[Identity] Add a factory method for Compose and update the example app (
Browse files Browse the repository at this point in the history
#5370)

* [Identity] Add a factory method for Compose and update the example app
  • Loading branch information
ccen-stripe authored Aug 12, 2022
1 parent 338105f commit bf7aac4
Show file tree
Hide file tree
Showing 16 changed files with 825 additions and 116 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@ and adds new `rememberLauncher` features for Payments
* [DEPRECATED][5274](https://github.com/stripe/stripe-android/pull/5274)
Deprecate `PaymentLauncher.createForCompose` in favor of `PaymentLauncher.rememberLauncher`.

### Identity
* [ADDED][5370](https://github.com/stripe/stripe-android/pull/5370) Add factory method for Compose

## 20.7.0 - 2022-07-06

This release adds additional support for Afterpay/Clearpay in PaymentSheet.
Expand Down
21 changes: 21 additions & 0 deletions identity-example/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ android {

buildFeatures {
viewBinding true
compose true
}

composeOptions {
kotlinCompilerExtensionVersion "$androidxComposeVersion"
}

flavorDimensions += "theme"
Expand Down Expand Up @@ -75,13 +80,29 @@ dependencies {
implementation "androidx.appcompat:appcompat:$androidxAppcompatVersion"
implementation "com.google.android.material:material:$materialVersion"
implementation 'com.github.kittinunf.fuel:fuel:2.3.1'
implementation 'com.github.kittinunf.fuel:fuel-coroutines:2.3.1'
implementation "androidx.constraintlayout:constraintlayout:$androidxConstraintlayoutVersion"
implementation "org.jetbrains.kotlinx:kotlinx-serialization-json:$kotlinSerializationVersion"
implementation "androidx.browser:browser:$androidxBrowserVersion"
implementation "androidx.lifecycle:lifecycle-livedata-ktx:$androidxLifecycleVersion"

testImplementation "junit:junit:$junitVersion"

ktlint "com.pinterest:ktlint:$ktlintVersion"

// compose
// Integration with activities
implementation "androidx.activity:activity-compose:$androidxComposeVersion"
// Integration with ViewModels
implementation "androidx.lifecycle:lifecycle-viewmodel-compose:$androidxLifecycleVersion"
implementation("androidx.compose.ui:ui:$androidxComposeVersion")
// Material Design
implementation("androidx.compose.material:material:$androidxComposeVersion")
// Integration with observables
implementation("androidx.compose.runtime:runtime-livedata:$androidxComposeVersion")
// MdcTheme
implementation "com.google.android.material:compose-theme-adapter:1.1.15"

}

task ktlint(type: JavaExec, group: "verification") {
Expand Down
6 changes: 5 additions & 1 deletion identity-example/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,18 @@
android:supportsRtl="true"
android:theme="${appTheme}">
<activity
android:name=".ThemeActivity"
android:name=".EntryActivity"
android:exported="true">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".ThemeActivity"
android:label="@string/classic_example" />
<activity android:name=".ComposeThemeActivity" />
</application>

</manifest>
Loading

0 comments on commit bf7aac4

Please sign in to comment.