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

feat: upgrade gradle 8 and run tests against optimized sdk #125

Merged
merged 18 commits into from
Nov 15, 2023

Conversation

CAMOBAP
Copy link
Collaborator

@CAMOBAP CAMOBAP commented May 24, 2023

No description provided.

@CAMOBAP CAMOBAP self-assigned this May 24, 2023
@github-actions
Copy link

github-actions bot commented May 24, 2023

Diffuse report:

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

 AAR      │ old       │ new       │ diff      
──────────┼───────────┼───────────┼───────────
      jar │  50.1 KiB │     824 B │ -49.3 KiB 
 manifest │     457 B │     457 B │       0 B 
      res │  78.3 KiB │  78.3 KiB │       0 B 
    other │  75.8 KiB │  75.8 KiB │       0 B 
──────────┼───────────┼───────────┼───────────
    total │ 204.5 KiB │ 155.3 KiB │ -49.3 KiB 

 JAR     │ old │ new │ diff           
─────────┼─────┼─────┼────────────────
 classes │  37 │   1 │  -36 (+0 -36)  
 methods │ 500 │  13 │ -487 (+0 -487) 
  fields │ 160 │   0 │ -160 (+0 -160)
AAR
 size  │ diff      │ path          
───────┼───────────┼───────────────
 824 B │ -49.3 KiB │ ∆ classes.jar 
───────┼───────────┼───────────────
 824 B │ -49.3 KiB │ (total)
JAR
CLASSES:

   old │ new │ diff         
  ─────┼─────┼──────────────
   37  │ 1   │ -36 (+0 -36) 
  - com.hcaptcha.sdk.BuildConfig
  - com.hcaptcha.sdk.HCaptcha_1
  - com.hcaptcha.sdk.HCaptcha
  - com.hcaptcha.sdk.HCaptchaCompat
  - com.hcaptcha.sdk.HCaptchaConfig_HCaptchaConfigBuilder
  - com.hcaptcha.sdk.HCaptchaConfig
  - com.hcaptcha.sdk.HCaptchaDebugInfo
  - com.hcaptcha.sdk.HCaptchaDialogFragment_1
  - com.hcaptcha.sdk.HCaptchaDialogFragment
  - com.hcaptcha.sdk.HCaptchaError
  - com.hcaptcha.sdk.HCaptchaException
  - com.hcaptcha.sdk.HCaptchaHeadlessWebView
  - com.hcaptcha.sdk.HCaptchaHtml
  - com.hcaptcha.sdk.HCaptchaInternalConfig_HCaptchaInternalConfigBuilder
  - com.hcaptcha.sdk.HCaptchaInternalConfig
  - com.hcaptcha.sdk.HCaptchaJSInterface
  - com.hcaptcha.sdk.HCaptchaLog
  - com.hcaptcha.sdk.HCaptchaOrientation
  - com.hcaptcha.sdk.HCaptchaSize
  - com.hcaptcha.sdk.HCaptchaStateListener
  - com.hcaptcha.sdk.HCaptchaTheme
  - com.hcaptcha.sdk.HCaptchaTokenResponse
  - com.hcaptcha.sdk.HCaptchaWebViewHelper_1
  - com.hcaptcha.sdk.HCaptchaWebViewHelper_HCaptchaWebChromeClient
  - com.hcaptcha.sdk.HCaptchaWebViewHelper_HCaptchaWebClient
  - com.hcaptcha.sdk.HCaptchaWebViewHelper
  - com.hcaptcha.sdk.IHCaptcha
  - com.hcaptcha.sdk.IHCaptchaHtmlProvider
  - com.hcaptcha.sdk.IHCaptchaRetryPredicate
  - com.hcaptcha.sdk.IHCaptchaVerifier
  - com.hcaptcha.sdk.tasks.OnFailureListener
  - com.hcaptcha.sdk.tasks.OnLoadedListener
  - com.hcaptcha.sdk.tasks.OnOpenListener
  - com.hcaptcha.sdk.tasks.OnSuccessListener
  - com.hcaptcha.sdk.tasks.Task_1
  - com.hcaptcha.sdk.tasks.Task
  

METHODS:

   old │ new │ diff           
  ─────┼─────┼────────────────
   500 │ 13  │ -487 (+0 -487) 
  - com.hcaptcha.sdk.BuildConfig <init>()
  - com.hcaptcha.sdk.HCaptcha <init>(FragmentActivity, HCaptchaInternalConfig)
  - com.hcaptcha.sdk.HCaptcha access_000(HCaptcha)
  - com.hcaptcha.sdk.HCaptcha access_100(HCaptcha) → HCaptchaConfig
  - com.hcaptcha.sdk.HCaptcha access_200(HCaptcha, long)
  - com.hcaptcha.sdk.HCaptcha access_300(HCaptcha) → Handler
  - com.hcaptcha.sdk.HCaptcha access_400(HCaptcha, Object)
  - com.hcaptcha.sdk.HCaptcha access_500(HCaptcha, HCaptchaException)
  - com.hcaptcha.sdk.HCaptcha getClient(FragmentActivity) → HCaptcha
  - com.hcaptcha.sdk.HCaptcha getClient(FragmentActivity, HCaptchaInternalConfig) → HCaptcha
  - com.hcaptcha.sdk.HCaptcha reset()
  - com.hcaptcha.sdk.HCaptcha setup() → HCaptcha
  - com.hcaptcha.sdk.HCaptcha setup(HCaptchaConfig) → HCaptcha
  - com.hcaptcha.sdk.HCaptcha setup(String) → HCaptcha
  - com.hcaptcha.sdk.HCaptcha startVerification() → HCaptcha
  - com.hcaptcha.sdk.HCaptcha verifyWithHCaptcha() → HCaptcha
  - com.hcaptcha.sdk.HCaptcha verifyWithHCaptcha(HCaptchaConfig) → HCaptcha
  - com.hcaptcha.sdk.HCaptcha verifyWithHCaptcha(String) → HCaptcha
  - com.hcaptcha.sdk.HCaptcha_1 <init>(HCaptcha)
  - com.hcaptcha.sdk.HCaptcha_1 onFailure(HCaptchaException)
  - com.hcaptcha.sdk.HCaptcha_1 onOpen()
  - com.hcaptcha.sdk.HCaptcha_1 onSuccess(String)
  - com.hcaptcha.sdk.HCaptchaCompat <init>()
  - com.hcaptcha.sdk.HCaptchaCompat getApplicationInfo(Context) → ApplicationInfo
  - com.hcaptcha.sdk.HCaptchaCompat getParcelable(Bundle, String, Class) → Parcelable
  - com.hcaptcha.sdk.HCaptchaCompat getSerializable(Bundle, String, Class) → Serializable
  - com.hcaptcha.sdk.HCaptchaConfig _default_apiEndpoint() → String
  - com.hcaptcha.sdk.HCaptchaConfig _default_customTheme() → String
  - com.hcaptcha.sdk.HCaptchaConfig _default_diagnosticLog() → Boolean
  - com.hcaptcha.sdk.HCaptchaConfig _default_disableHardwareAcceleration() → Boolean
  - com.hcaptcha.sdk.HCaptchaConfig _default_hideDialog() → Boolean
  - com.hcaptcha.sdk.HCaptchaConfig _default_host() → String
  - com.hcaptcha.sdk.HCaptchaConfig _default_jsSrc() → String
  - com.hcaptcha.sdk.HCaptchaConfig _default_loading() → Boolean
  - com.hcaptcha.sdk.HCaptchaConfig _default_locale() → String
  - com.hcaptcha.sdk.HCaptchaConfig _default_orientation() → HCaptchaOrientation
  - com.hcaptcha.sdk.HCaptchaConfig _default_resetOnTimeout() → Boolean
  - com.hcaptcha.sdk.HCaptchaConfig _default_retryPredicate() → IHCaptchaRetryPredicate
  - com.hcaptcha.sdk.HCaptchaConfig _default_sentry() → Boolean
  - com.hcaptcha.sdk.HCaptchaConfig _default_size() → HCaptchaSize
  - com.hcaptcha.sdk.HCaptchaConfig _default_theme() → HCaptchaTheme
  - com.hcaptcha.sdk.HCaptchaConfig _default_tokenExpiration() → long
  - com.hcaptcha.sdk.HCaptchaConfig _d
...✂

@github-actions
Copy link

github-actions bot commented Sep 3, 2023

Benchmark report:

Test name Time ms. (median) Allocations (median)
com.hcaptcha.sdk.HCaptchaBenchmarkTest.EMULATOR_UNLOCKED_benchmarkInvisibleVerification +225.10 -4
com.hcaptcha.sdk.HCaptchaBenchmarkTest.EMULATOR_UNLOCKED_benchmarkInvisibleVerificationColdRun +87.67 +96
com.hcaptcha.sdk.HCaptchaBenchmarkTest.EMULATOR_UNLOCKED_benchmarkInvisibleSetup +14.05 +100.17
com.hcaptcha.sdk.HCaptchaDebugInfoTest.EMULATOR_UNLOCKED_benchmarkDebugInfo +47.70 +560
com.hcaptcha.sdk.HCaptchaDebugInfoTest.EMULATOR_UNLOCKED_benchmarkDebugSys +12.17 -28
com.hcaptcha.sdk.HCaptchaWebViewHelperTest.EMULATOR_UNLOCKED_benchmarkWebViewLoad +84.36 +95

@CAMOBAP
Copy link
Collaborator Author

CAMOBAP commented Sep 3, 2023

There is still issue because 0 tests was executed, probably obfuscator removed some important test annotations

...
> Task :test:connectedReleaseAndroidTest
Starting 0 tests on test(AVD) - 10
...

https://github.com/hCaptcha/hcaptcha-android-sdk/actions/runs/6063344408/job/16450575146#step:7:269

To be investigated...

@CAMOBAP CAMOBAP changed the title feat(test): move tests to separate module to run them against obfuscated sdk feat(test): move tests to separate module to run them against optimized sdk Sep 3, 2023
@CAMOBAP CAMOBAP force-pushed the feature/run-android-tests-on-minified-code branch from 25b8884 to 91aa936 Compare November 14, 2023 22:58
@CAMOBAP CAMOBAP requested a review from DSergiu November 15, 2023 06:46
@CAMOBAP
Copy link
Collaborator Author

CAMOBAP commented Nov 15, 2023

For now Diffuse report fails but it will be fixed after merge

@CAMOBAP CAMOBAP marked this pull request as ready for review November 15, 2023 06:47
@DSergiu DSergiu changed the title feat(test): move tests to separate module to run them against optimized sdk feat: upgrade gradle 8 and run tests against optimized sdk Nov 15, 2023
Copy link

sonarcloud bot commented Nov 15, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 3 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@DSergiu DSergiu merged commit d9f8299 into main Nov 15, 2023
12 of 13 checks passed
@DSergiu DSergiu deleted the feature/run-android-tests-on-minified-code branch November 15, 2023 15:39
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