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

[stripe-core] change react native class for reflection #5352

Merged
merged 1 commit into from Aug 1, 2022

Conversation

ccen-stripe
Copy link
Collaborator

Summary

Didn't notice the previous class path was a generic annotation used across facebook. The new class is annotated with @DoNotStrip and won't be proguarded.

Motivation

Detect when the SDK is used from react native

Testing

  • Added tests
  • Modified tests
  • Manually verified - verified from native and react app

Screenshots

Before After
before screenshot after screenshot

Changelog

@github-actions
Copy link
Contributor

github-actions bot commented Aug 1, 2022

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 │  15.3 MiB │  15.3 MiB │ -2 B │  51.8 MiB │  51.8 MiB │ -8 B 
     arsc │   1.8 MiB │   1.8 MiB │  0 B │   1.8 MiB │   1.8 MiB │  0 B 
 manifest │     4 KiB │     4 KiB │  0 B │  18.5 KiB │  18.5 KiB │  0 B 
      res │ 872.2 KiB │ 872.2 KiB │  0 B │   1.4 MiB │   1.4 MiB │  0 B 
   native │   2.5 MiB │   2.5 MiB │  0 B │   5.9 MiB │   5.9 MiB │  0 B 
    asset │     3 MiB │     3 MiB │  0 B │     3 MiB │     3 MiB │  0 B 
    other │  81.6 KiB │  81.6 KiB │  0 B │ 155.4 KiB │ 155.4 KiB │  0 B 
──────────┼───────────┼───────────┼──────┼───────────┼───────────┼──────
    total │  23.5 MiB │  23.5 MiB │ -2 B │  63.9 MiB │  63.9 MiB │ -8 B 

         │          raw           │           unique            
         ├────────┬────────┬──────┼────────┬────────┬───────────
 DEX     │ old    │ new    │ diff │ old    │ new    │ diff      
─────────┼────────┼────────┼──────┼────────┼────────┼───────────
   files │      4 │      4 │    0 │        │        │           
 strings │ 250340 │ 250340 │    0 │ 213435 │ 213435 │ 0 (+1 -1) 
   types │  44167 │  44167 │    0 │  40542 │  40542 │ 0 (+0 -0) 
 classes │  37742 │  37742 │    0 │  37742 │  37742 │ 0 (+0 -0) 
 methods │ 220761 │ 220761 │    0 │ 212797 │ 212797 │ 0 (+0 -0) 
  fields │ 162702 │ 162702 │    0 │ 161663 │ 161663 │ 0 (+0 -0) 

 ARSC    │ old  │ new  │ diff 
─────────┼──────┼──────┼──────
 configs │  292 │  292 │  0   
 entries │ 6225 │ 6225 │  0
APK
   compressed   │  uncompressed  │                
─────────┬──────┼─────────┬──────┤                
 size    │ diff │ size    │ diff │ path           
─────────┼──────┼─────────┼──────┼────────────────
 2.2 MiB │ -2 B │ 6.8 MiB │ -8 B │ ∆ classes3.dex 
─────────┼──────┼─────────┼──────┼────────────────
 2.2 MiB │ -2 B │ 6.8 MiB │ -8 B │ (total)
DEX
STRINGS:

   old    │ new    │ diff      
  ────────┼────────┼───────────
   213435 │ 213435 │ 0 (+1 -1) 
  + com.facebook.react.bridge.NativeModule
  
  - com.facebook.proguard.annotations.DoNotStrip

@ccen-stripe ccen-stripe merged commit 2569b93 into master Aug 1, 2022
@ccen-stripe ccen-stripe deleted the ccen/changeReactReflection branch August 1, 2022 18:23
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