Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make PaymentLauncher.create methods Java-friendly #6174

Merged
merged 1 commit into from
Feb 3, 2023

Conversation

tillh-stripe
Copy link
Collaborator

Summary

This pull request adds JvmOverloads and JvmStatic to the PaymentLauncher.create() methods for better Java interop.

Motivation

Trying to avoid writing PaymentLauncher.Companion.create() in the Cash App Pay docs.

Testing

  • Added tests
  • Modified tests
  • Manually verified

Screenshots

Before After
before screenshot after screenshot

Changelog

@tillh-stripe tillh-stripe marked this pull request as ready for review February 3, 2023 00:01
@tillh-stripe tillh-stripe requested a review from a team as a code owner February 3, 2023 00:01
@github-actions
Copy link
Contributor

github-actions bot commented Feb 3, 2023

Diffuse output:

OLD: paymentsheet-example-release-master.apk (signature: none)
NEW: paymentsheet-example-release-pr.apk (signature: none)

          │          compressed          │          uncompressed          
          ├──────────┬──────────┬────────┼───────────┬───────────┬────────
 APK      │ old      │ new      │ diff   │ old       │ new       │ diff   
──────────┼──────────┼──────────┼────────┼───────────┼───────────┼────────
      dex │  5.8 MiB │  5.8 MiB │ +234 B │    15 MiB │    15 MiB │ +548 B 
     arsc │  2.1 MiB │  2.1 MiB │    0 B │   2.1 MiB │   2.1 MiB │    0 B 
 manifest │  4.4 KiB │  4.4 KiB │    0 B │    21 KiB │    21 KiB │    0 B 
      res │  1.1 MiB │  1.1 MiB │    0 B │   1.9 MiB │   1.9 MiB │    0 B 
   native │  2.6 MiB │  2.6 MiB │    0 B │     6 MiB │     6 MiB │    0 B 
    asset │    3 MiB │    3 MiB │ +211 B │     3 MiB │     3 MiB │ +211 B 
    other │ 83.2 KiB │ 83.2 KiB │    0 B │ 159.6 KiB │ 159.6 KiB │    0 B 
──────────┼──────────┼──────────┼────────┼───────────┼───────────┼────────
    total │ 14.6 MiB │ 14.6 MiB │ +445 B │  28.2 MiB │  28.2 MiB │ +759 B 

         │          raw           │            unique            
         ├────────┬────────┬──────┼────────┬────────┬────────────
 DEX     │ old    │ new    │ diff │ old    │ new    │ diff       
─────────┼────────┼────────┼──────┼────────┼────────┼────────────
   files │      2 │      2 │    0 │        │        │            
 strings │  92934 │  92935 │   +1 │  77731 │  77732 │ +1 (+2 -1) 
   types │  24444 │  24445 │   +1 │  22099 │  22100 │ +1 (+1 -0) 
 classes │  19882 │  19883 │   +1 │  19882 │  19883 │ +1 (+1 -0) 
 methods │ 105567 │ 105574 │   +7 │ 101233 │ 101240 │ +7 (+7 -0) 
  fields │ 102761 │ 102761 │    0 │ 101476 │ 101476 │  0 (+0 -0) 

 ARSC    │ old  │ new  │ diff 
─────────┼──────┼──────┼──────
 configs │  333 │  333 │  0   
 entries │ 6886 │ 6886 │  0
APK
    compressed    │   uncompressed    │                               
─────────┬────────┼──────────┬────────┤                               
 size    │ diff   │ size     │ diff   │ path                          
─────────┼────────┼──────────┼────────┼───────────────────────────────
 2.3 MiB │ +233 B │  6.5 MiB │ +548 B │ ∆ classes2.dex                
 8.2 KiB │ +211 B │  8.1 KiB │ +211 B │ ∆ assets/dexopt/baseline.prof 
 3.4 MiB │   +1 B │  8.5 MiB │    0 B │ ∆ classes.dex                 
─────────┼────────┼──────────┼────────┼───────────────────────────────
 5.8 MiB │ +445 B │ 15.1 MiB │ +759 B │ (total)
DEX
STRINGS:

   old   │ new   │ diff       
  ───────┼───────┼────────────
   77731 │ 77732 │ +1 (+2 -1) 
  + ~~R8{backend:dex,compilation-mode:release,has-checksums:false,min-api:21,pg-map-id:2851bf3,r8-mode:compatibility,version:4.0.48}
  + Lcom/stripe/android/payments/paymentlauncher/a;
  
  - ~~R8{backend:dex,compilation-mode:release,has-checksums:false,min-api:21,pg-map-id:a18b0f7,r8-mode:compatibility,version:4.0.48}
  

TYPES:

   old   │ new   │ diff       
  ───────┼───────┼────────────
   22099 │ 22100 │ +1 (+1 -0) 
  + Lcom/stripe/android/payments/paymentlauncher/a;
  

METHODS:

   old    │ new    │ diff       
  ────────┼────────┼────────────
   101233 │ 101240 │ +7 (+7 -0) 
  + com.stripe.android.payments.paymentlauncher.PaymentLauncher_Companion create(ComponentActivity, String, PaymentLauncher_PaymentResultCallback) → PaymentLauncher
  + com.stripe.android.payments.paymentlauncher.PaymentLauncher_Companion create(Fragment, String, PaymentLauncher_PaymentResultCallback) → PaymentLauncher
  + com.stripe.android.payments.paymentlauncher.a <clinit>()
  + com.stripe.android.payments.paymentlauncher.a a(ComponentActivity, String, PaymentLauncher_PaymentResultCallback) → PaymentLauncher
  + com.stripe.android.payments.paymentlauncher.a b(ComponentActivity, String, String, PaymentLauncher_PaymentResultCallback) → PaymentLauncher
  + com.stripe.android.payments.paymentlauncher.a c(Fragment, String, PaymentLauncher_PaymentResultCallback) → PaymentLauncher
  + com.stripe.android.payments.paymentlauncher.a d(Fragment, String, String, PaymentLauncher_PaymentResultCallback) → PaymentLauncher

@tillh-stripe tillh-stripe merged commit 13fa637 into master Feb 3, 2023
@tillh-stripe tillh-stripe deleted the tillh/paymentlauncher-in-java branch February 3, 2023 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants