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

Set up Connect SDK Module #9203

Merged
merged 9 commits into from
Sep 9, 2024
Merged

Conversation

simond-stripe
Copy link
Collaborator

Summary

Set up the scaffolding for the Connect SDK. This PR sets up two new modules:

  1. stripe-connect: the module for the Connect SDK. This is what clients will call to use the Connect Embedded Components.
  2. stripe-connect-example: the module containing the demo app showing off how to use the Connect SDK.

Motivation

Prepare for adding APIs implementation to the new Connect SDK.

Testing

  • Added tests
  • Modified tests
  • Manually verified

Copy link
Contributor

github-actions bot commented Sep 6, 2024

Risky Change

This is considered a risky change because it adjusts the sample app build.gradle, please review carefully.
We've seen issues in the past which resulted in failed builds for merchants. Please make sure the build.gradle change is intended.

By adding the label accept-risky-change to this PR, I acknowledge that I'm changing an example app and have verified that the SDK remains in a shippable state.

@simond-stripe
Copy link
Collaborator Author

Accepted risky change due to test run failure: https://github.com/stripe/stripe-android/actions/runs/10743658522/job/29798864778?pr=9203

I'm changing the build.gradle file, but it's to exempt the new sample app from the .api checks which is valid. No changes which affect the other SDKs

Copy link
Contributor

github-actions bot commented Sep 6, 2024

Diffuse output:

OLD: identity-example-release-base.apk (signature: V1, V2)
NEW: identity-example-release-pr.apk (signature: V1, V2)

          │          compressed          │         uncompressed         
          ├───────────┬───────────┬──────┼───────────┬───────────┬──────
 APK      │ old       │ new       │ diff │ old       │ new       │ diff 
──────────┼───────────┼───────────┼──────┼───────────┼───────────┼──────
      dex │   1.9 MiB │   1.9 MiB │  0 B │     4 MiB │     4 MiB │  0 B 
     arsc │     1 MiB │     1 MiB │  0 B │     1 MiB │     1 MiB │  0 B 
 manifest │   2.3 KiB │   2.3 KiB │  0 B │     8 KiB │     8 KiB │  0 B 
      res │ 301.5 KiB │ 301.5 KiB │  0 B │   455 KiB │   455 KiB │  0 B 
   native │   6.2 MiB │   6.2 MiB │  0 B │  15.8 MiB │  15.8 MiB │  0 B 
    asset │   6.8 KiB │   6.8 KiB │  0 B │   6.5 KiB │   6.5 KiB │  0 B 
    other │  85.5 KiB │  85.5 KiB │ +4 B │ 158.7 KiB │ 158.7 KiB │  0 B 
──────────┼───────────┼───────────┼──────┼───────────┼───────────┼──────
    total │   9.5 MiB │   9.5 MiB │ +4 B │  21.4 MiB │  21.4 MiB │  0 B 

 DEX     │ old   │ new   │ diff      
─────────┼───────┼───────┼───────────
   files │     1 │     1 │ 0         
 strings │ 20227 │ 20227 │ 0 (+0 -0) 
   types │  6086 │  6086 │ 0 (+0 -0) 
 classes │  4894 │  4894 │ 0 (+0 -0) 
 methods │ 29483 │ 29483 │ 0 (+0 -0) 
  fields │ 17371 │ 17371 │ 0 (+0 -0) 

 ARSC    │ old  │ new  │ diff 
─────────┼──────┼──────┼──────
 configs │  164 │  164 │  0   
 entries │ 3608 │ 3608 │  0
APK
   compressed    │   uncompressed   │                                           
──────────┬──────┼───────────┬──────┤                                           
 size     │ diff │ size      │ diff │ path                                      
──────────┼──────┼───────────┼──────┼───────────────────────────────────────────
 28.3 KiB │ +9 B │  62.6 KiB │  0 B │ ∆ META-INF/CERT.SF                        
 25.1 KiB │ -5 B │  62.5 KiB │  0 B │ ∆ META-INF/MANIFEST.MF                    
    270 B │ -2 B │     120 B │  0 B │ ∆ META-INF/version-control-info.textproto 
  1.2 KiB │ +2 B │   1.2 KiB │  0 B │ ∆ META-INF/CERT.RSA                       
──────────┼──────┼───────────┼──────┼───────────────────────────────────────────
 54.9 KiB │ +4 B │ 126.4 KiB │  0 B │ (total)

* If you are interested in using a feature marked for private beta, send an email to
* [private-beta-element@stripe.com](mailto:private-beta-element@stripe.com).
*/
@RequiresOptIn(message = "This API is under construction. If you're interested in using it, email private-beta-element@stripe.com.")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you make the javadoc and the message here specific to the connect SDK private beta? A good example of this is the ExperimentalCustomerSessionApi annotation. (You could also get rid of the javadoc entirely if you want, I think)

package com.stripe.android.connectsdk

@PrivateBetaConnectSDK
class EmbeddedComponentManager internal constructor()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally, we annotate these with @RestrictTo(RestrictTo.Scope.LIBRARY_GROUP) before they're released. That will ensure that these are not actually included in our public API yet. Then, whenever you're ready to ship private beta, you can send out a PR which just removes the annotation and adds a changelog entry about the new feature/product being available. I'd recommend that approach here

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great idea! I like this approach a lot

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agreed!

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would expect this to be ~empty until you launch private beta. I left a comment below which I think will help with that.

There's some stuff that shows up here which is unavoidable and just generated code, e.g. the ComposableSingleton, but hopefully most stuff won't be visible here yet!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's still a decent amount of generated stuff in there unfortunately (like the ComposableSingleton), but it's empty in terms of things consumers can actually call in practice 🙂

@simond-stripe
Copy link
Collaborator Author

@amk-stripe thanks for the feedback, ready for re-review!

@simond-stripe simond-stripe merged commit add5c86 into master Sep 9, 2024
15 checks passed
@simond-stripe simond-stripe deleted the simond/initialize-connect-sdk-module branch September 9, 2024 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accept-risky-change accept-risky-change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants