Skip to content

@W-17247702: Remove getBuildConfigValue reflection usage#2850

Merged
wmathurin merged 1 commit intoforcedotcom:devfrom
wmathurin:build_config
Mar 17, 2026
Merged

@W-17247702: Remove getBuildConfigValue reflection usage#2850
wmathurin merged 1 commit intoforcedotcom:devfrom
wmathurin:build_config

Conversation

@wmathurin
Copy link
Contributor

Replace reflection-based BuildConfig access with direct use of SDK's BuildConfig.DEBUG constant to fix obfuscation compatibility issues and ClassNotFoundException errors.

NB: The buildConfig feature was already enabled, the import com.salesforce.androidsdk.BuildConfig.DEBUG was already at the top of the file (line 74), but the code was still using reflection to access the consumer app's BuildConfig instead of the SDK's own BuildConfig.

Replace reflection-based BuildConfig access with direct use of SDK's BuildConfig.DEBUG constant to fix obfuscation compatibility issues and ClassNotFoundException errors.
@codecov
Copy link

codecov bot commented Mar 17, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 54.16%. Comparing base (a6fd61c) to head (0d68e71).
⚠️ Report is 4 commits behind head on dev.

❗ There is a different number of reports uploaded between BASE (a6fd61c) and HEAD (0d68e71). Click for more details.

HEAD has 1 upload less than BASE
Flag BASE (a6fd61c) HEAD (0d68e71)
SalesforceSDK 2 1
Additional details and impacted files
@@              Coverage Diff              @@
##                dev    #2850       +/-   ##
=============================================
- Coverage     64.90%   54.16%   -10.74%     
+ Complexity     2963     2433      -530     
=============================================
  Files           222      222               
  Lines         17394    17382       -12     
  Branches       2478     2475        -3     
=============================================
- Hits          11289     9415     -1874     
- Misses         4906     6880     +1974     
+ Partials       1199     1087      -112     
Components Coverage Δ
Analytics 47.92% <ø> (ø)
SalesforceSDK 39.71% <100.00%> (-20.02%) ⬇️
Hybrid 59.05% <ø> (ø)
SmartStore 78.20% <ø> (ø)
MobileSync 81.68% <ø> (ø)
React 52.36% <ø> (ø)
Files with missing lines Coverage Δ
.../salesforce/androidsdk/app/SalesforceSDKManager.kt 33.45% <100.00%> (-25.98%) ⬇️

... and 56 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@wmathurin wmathurin merged commit d076b0f into forcedotcom:dev Mar 17, 2026
15 of 19 checks passed
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.

2 participants