Skip to content

fix: eliminate auto-generated PNG density variants for ic_hcaptcha_logo (#233)#241

Open
CAMOBAP wants to merge 1 commit intomainfrom
fix/233-eliminate-png-density-variants
Open

fix: eliminate auto-generated PNG density variants for ic_hcaptcha_logo (#233)#241
CAMOBAP wants to merge 1 commit intomainfrom
fix/233-eliminate-png-density-variants

Conversation

@CAMOBAP
Copy link
Collaborator

@CAMOBAP CAMOBAP commented Mar 2, 2026

Enable vectorDrawables.useSupportLibrary in SDK defaultConfig and use app:srcCompat instead of android:src, so the AGP no longer generates ~50 KB of unnecessary PNG fallbacks for each density bucket.

…go (#233)

Enable vectorDrawables.useSupportLibrary in SDK defaultConfig and use
app:srcCompat instead of android:src, so the AGP no longer generates
~50 KB of unnecessary PNG fallbacks for each density bucket.
@CAMOBAP CAMOBAP self-assigned this Mar 2, 2026
@github-actions
Copy link

github-actions bot commented Mar 2, 2026

Diffuse report:

OLD: sdk-main.aar
NEW: sdk-pr.aar

 AAR      │ old      │ new      │ diff    
──────────┼──────────┼──────────┼─────────
      jar │ 59.4 KiB │ 59.4 KiB │     0 B 
 manifest │    411 B │    411 B │     0 B 
      res │ 78.2 KiB │ 28.3 KiB │ -50 KiB 
    other │    1 KiB │    1 KiB │     0 B 
──────────┼──────────┼──────────┼─────────
    total │  139 KiB │ 89.1 KiB │ -50 KiB 

 JAR     │ old │ new │ diff      
─────────┼─────┼─────┼───────────
 classes │  38 │  38 │ 0 (+0 -0) 
 methods │ 569 │ 569 │ 0 (+0 -0) 
  fields │ 174 │ 174 │ 0 (+0 -0)
AAR
 size     │ diff      │ path                                           
──────────┼───────────┼────────────────────────────────────────────────
          │ -17.1 KiB │ - res/drawable-xxxhdpi-v4/ic_hcaptcha_logo.png 
          │ -12.4 KiB │ - res/drawable-xxhdpi-v4/ic_hcaptcha_logo.png  
          │    -8 KiB │ - res/drawable-xhdpi-v4/ic_hcaptcha_logo.png   
          │  -5.7 KiB │ - res/drawable-hdpi-v4/ic_hcaptcha_logo.png    
          │    -4 KiB │ - res/drawable-mdpi-v4/ic_hcaptcha_logo.png    
          │  -2.8 KiB │ - res/drawable-ldpi-v4/ic_hcaptcha_logo.png    
          │ -10.9 KiB │ - res/drawable-anydpi-v21/ic_hcaptcha_logo.xml 
 10.9 KiB │ +10.9 KiB │ + res/drawable/ic_hcaptcha_logo.xml            
          │       0 B │ - res/drawable-anydpi-v21/                     
          │       0 B │ - res/drawable-xxxhdpi-v4/                     
          │       0 B │ - res/drawable-xxhdpi-v4/                      
          │       0 B │ - res/drawable-xhdpi-v4/                       
          │       0 B │ - res/drawable-hdpi-v4/                        
          │       0 B │ - res/drawable-ldpi-v4/                        
          │       0 B │ - res/drawable-mdpi-v4/                        
      0 B │       0 B │ + res/drawable/                                
  1.6 KiB │     +58 B │ ∆ res/layout/hcaptcha_fragment.xml             
──────────┼───────────┼────────────────────────────────────────────────
 12.5 KiB │   -50 KiB │ (total)

@CAMOBAP CAMOBAP requested review from DSergiu and brdlyptrs March 2, 2026 20:25
@github-actions
Copy link

github-actions bot commented Mar 2, 2026

Benchmark report:

Test name Time ms. (median) Allocations (median)
com.hcaptcha.sdk.HCaptchaBenchmarkTest.EMULATOR_UNLOCKED_benchmarkInvisibleVerification +550.97 +770
com.hcaptcha.sdk.HCaptchaBenchmarkTest.EMULATOR_UNLOCKED_benchmarkInvisibleVerificationColdRun +914.44 +1011
com.hcaptcha.sdk.HCaptchaBenchmarkTest.EMULATOR_UNLOCKED_benchmarkInvisibleSetup +28.68 +230.33
com.hcaptcha.sdk.HCaptchaDebugInfoTest.EMULATOR_UNLOCKED_benchmarkDebugInfo +49.61 -5591
com.hcaptcha.sdk.HCaptchaDebugInfoTest.EMULATOR_UNLOCKED_benchmarkDebugSys +58.08 +24

@e271828-
Copy link
Contributor

e271828- commented Mar 9, 2026

@CAMOBAP see #245

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.

3 participants