Skip to content

Commit

Permalink
Merge branch 'master' into payment_sheet_appearance_beta_1
Browse files Browse the repository at this point in the history
  • Loading branch information
skyler-stripe committed Apr 19, 2022
2 parents d65d910 + a2a3633 commit bb9653e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 35 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ buildscript {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion"
classpath "org.jetbrains.kotlin:kotlin-serialization:$kotlinVersion"
classpath "org.jetbrains.dokka:dokka-gradle-plugin:$dokkaVersion"
classpath "org.jetbrains.kotlinx:binary-compatibility-validator:0.8.0"
classpath "org.jetbrains.kotlinx:binary-compatibility-validator:0.9.0"
classpath buildLibs.detektGradlePlugin
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ data class PrimaryButtonStyle(
data class PrimaryButtonColors(
val background: Color,
val onBackground: Color,
val borderStroke: Color,
val border: Color,
)

@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
Expand Down Expand Up @@ -164,12 +164,12 @@ object PaymentsThemeDefaults {
colorsLight = PrimaryButtonColors(
background = colors(false).primary,
onBackground = Color.White,
borderStroke = Color.Transparent
border = Color.Transparent
),
colorsDark = PrimaryButtonColors(
background = colors(true).primary,
onBackground = Color.White,
borderStroke = Color.Transparent
border = Color.Transparent
),
shape = PrimaryButtonShape(
cornerRadius = shapes.cornerRadius,
Expand Down Expand Up @@ -449,21 +449,21 @@ fun Color.shouldUseDarkDynamicColor(): Boolean {
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
fun PrimaryButtonStyle.getBackgroundColor(context: Context): Int {
val isDark = context.isSystemDarkTheme()
return (if (isDark) colorsLight else colorsDark).background.toArgb()
return (if (isDark) colorsDark else colorsLight).background.toArgb()
}

@ColorInt
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
fun PrimaryButtonStyle.getOnBackgroundColor(context: Context): Int {
val isDark = context.isSystemDarkTheme()
return (if (isDark) colorsLight else colorsDark).onBackground.toArgb()
return (if (isDark) colorsDark else colorsLight).onBackground.toArgb()
}

@ColorInt
@RestrictTo(RestrictTo.Scope.LIBRARY_GROUP)
fun PrimaryButtonStyle.getBorderStrokeColor(context: Context): Int {
val isDark = context.isSystemDarkTheme()
return (if (isDark) colorsLight.borderStroke else colorsDark.borderStroke).toArgb()
return (if (isDark) colorsDark else colorsLight).border.toArgb()
}

@Composable
Expand Down
16 changes: 0 additions & 16 deletions stripe-core/api/stripe-core.api
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
public final class com/stripe/android/core/AppInfo : android/os/Parcelable {
public static final field $stable I
public static final field CREATOR Landroid/os/Parcelable$Creator;
public static final field Companion Lcom/stripe/android/core/AppInfo$Companion;
public final fun copy (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Lcom/stripe/android/core/AppInfo;
Expand Down Expand Up @@ -40,7 +39,6 @@ public final class com/stripe/android/core/Logger$DefaultImpls {
}

public final class com/stripe/android/core/StripeError : com/stripe/android/core/model/StripeModel, java/io/Serializable {
public static final field $stable I
public static final field CREATOR Landroid/os/Parcelable$Creator;
public synthetic fun <init> (Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun component1 ()Ljava/lang/String;
Expand All @@ -67,7 +65,6 @@ public final class com/stripe/android/core/StripeError : com/stripe/android/core
}

public final class com/stripe/android/core/exception/APIConnectionException : com/stripe/android/core/exception/StripeException {
public static final field $stable I
public static final field Companion Lcom/stripe/android/core/exception/APIConnectionException$Companion;
public fun <init> ()V
public fun <init> (Ljava/lang/String;Ljava/lang/Throwable;)V
Expand All @@ -79,39 +76,33 @@ public final class com/stripe/android/core/exception/APIConnectionException$Comp
}

public final class com/stripe/android/core/exception/APIException : com/stripe/android/core/exception/StripeException {
public static final field $stable I
public fun <init> ()V
public fun <init> (Lcom/stripe/android/core/StripeError;Ljava/lang/String;ILjava/lang/String;Ljava/lang/Throwable;)V
public synthetic fun <init> (Lcom/stripe/android/core/StripeError;Ljava/lang/String;ILjava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
}

public final class com/stripe/android/core/exception/AuthenticationException : com/stripe/android/core/exception/StripeException {
public static final field $stable I
public synthetic fun <init> (Lcom/stripe/android/core/StripeError;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
}

public final class com/stripe/android/core/exception/InvalidRequestException : com/stripe/android/core/exception/StripeException {
public static final field $stable I
public fun <init> ()V
public fun <init> (Lcom/stripe/android/core/StripeError;Ljava/lang/String;ILjava/lang/String;Ljava/lang/Throwable;)V
public synthetic fun <init> (Lcom/stripe/android/core/StripeError;Ljava/lang/String;ILjava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
}

public final class com/stripe/android/core/exception/PermissionException : com/stripe/android/core/exception/StripeException {
public static final field $stable I
public fun <init> (Lcom/stripe/android/core/StripeError;Ljava/lang/String;)V
public synthetic fun <init> (Lcom/stripe/android/core/StripeError;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
}

public final class com/stripe/android/core/exception/RateLimitException : com/stripe/android/core/exception/StripeException {
public static final field $stable I
public fun <init> ()V
public fun <init> (Lcom/stripe/android/core/StripeError;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)V
public synthetic fun <init> (Lcom/stripe/android/core/StripeError;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
}

public abstract class com/stripe/android/core/exception/StripeException : java/lang/Exception {
public static final field $stable I
public static final field Companion Lcom/stripe/android/core/exception/StripeException$Companion;
public fun <init> ()V
public fun <init> (Lcom/stripe/android/core/StripeError;Ljava/lang/String;ILjava/lang/Throwable;Ljava/lang/String;)V
Expand Down Expand Up @@ -162,7 +153,6 @@ public final class com/stripe/android/core/model/CountryCodeKt {
}

public final class com/stripe/android/core/model/StripeFile : com/stripe/android/core/model/StripeModel {
public static final field $stable I
public static final field CREATOR Landroid/os/Parcelable$Creator;
public synthetic fun <init> (Ljava/lang/String;Ljava/lang/Long;Ljava/lang/String;Lcom/stripe/android/core/model/StripeFilePurpose;Ljava/lang/Integer;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V
public final fun component1 ()Ljava/lang/String;
Expand Down Expand Up @@ -191,7 +181,6 @@ public final class com/stripe/android/core/model/StripeFile : com/stripe/android
}

public final class com/stripe/android/core/model/StripeFileParams {
public static final field $stable I
public fun <init> (Ljava/io/File;Lcom/stripe/android/core/model/StripeFilePurpose;)V
public final fun copy (Ljava/io/File;Lcom/stripe/android/core/model/StripeFilePurpose;)Lcom/stripe/android/core/model/StripeFileParams;
public static synthetic fun copy$default (Lcom/stripe/android/core/model/StripeFileParams;Ljava/io/File;Lcom/stripe/android/core/model/StripeFilePurpose;ILjava/lang/Object;)Lcom/stripe/android/core/model/StripeFileParams;
Expand All @@ -201,7 +190,6 @@ public final class com/stripe/android/core/model/StripeFileParams {
}

public final class com/stripe/android/core/model/StripeFileParams$FileLink : android/os/Parcelable {
public static final field $stable I
public static final field CREATOR Landroid/os/Parcelable$Creator;
public fun <init> ()V
public fun <init> (Z)V
Expand Down Expand Up @@ -246,7 +234,6 @@ public final class com/stripe/android/core/networking/ApiRequest_Options_Factory
}

public final class com/stripe/android/core/networking/ConnectionFactory$Default : com/stripe/android/core/networking/ConnectionFactory {
public static final field $stable I
public static final field INSTANCE Lcom/stripe/android/core/networking/ConnectionFactory$Default;
public synthetic fun create (Lcom/stripe/android/core/networking/StripeRequest;)Lcom/stripe/android/core/networking/StripeConnection;
public fun createForFile (Lcom/stripe/android/core/networking/StripeRequest;Ljava/io/File;)Lcom/stripe/android/core/networking/StripeConnection;
Expand Down Expand Up @@ -276,13 +263,11 @@ public final class com/stripe/android/core/networking/RetryDelaySupplier_Factory
}

public final class com/stripe/android/core/networking/StripeConnection$Default : com/stripe/android/core/networking/StripeConnection$AbstractConnection {
public static final field $stable I
public synthetic fun createBodyFromResponseStream (Ljava/io/InputStream;)Ljava/lang/Object;
public fun createBodyFromResponseStream (Ljava/io/InputStream;)Ljava/lang/String;
}

public final class com/stripe/android/core/networking/StripeConnection$FileConnection : com/stripe/android/core/networking/StripeConnection$AbstractConnection {
public static final field $stable I
public fun createBodyFromResponseStream (Ljava/io/InputStream;)Ljava/io/File;
public synthetic fun createBodyFromResponseStream (Ljava/io/InputStream;)Ljava/lang/Object;
}
Expand Down Expand Up @@ -310,7 +295,6 @@ public final class com/stripe/android/core/networking/StripeResponseKtxKt {
}

public final class com/stripe/android/core/version/StripeSdkVersion {
public static final field $stable I
public static final field INSTANCE Lcom/stripe/android/core/version/StripeSdkVersion;
public static final field VERSION Ljava/lang/String;
public static final field VERSION_NAME Ljava/lang/String;
Expand Down
12 changes: 0 additions & 12 deletions stripe-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,10 @@ ext {
artifactDescrption = "The core module of Stripe Android SDKs"
}

android {
buildFeatures {
compose = true
viewBinding true
}

composeOptions {
kotlinCompilerExtensionVersion "$androidxComposeVersion"
}
}

dependencies {
implementation "com.google.dagger:dagger:$daggerVersion"
kapt "com.google.dagger:dagger-compiler:$daggerVersion"

implementation "androidx.activity:activity-compose:$androidxActivityVersion"
implementation "androidx.browser:browser:$androidxBrowserVersion"

implementation "org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlinCoroutinesVersion"
Expand Down

0 comments on commit bb9653e

Please sign in to comment.