Skip to content

Commit

Permalink
fix(sdk): prevent enum's toString from obfuscation (#124)
Browse files Browse the repository at this point in the history
* fix(sdk): prevent enum's toString from obfuscation

* chore: Bump version to 3.9.1
  • Loading branch information
CAMOBAP authored May 25, 2023
1 parent 557fff1 commit 0ee0816
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

# 3.9.1

- Fix: add missing ProGuard rules for enums

# 3.9.0

- Feature: add config to control WebView hardware acceleration `HCaptchaConfig.disableHardwareAcceleration`
Expand Down
1 change: 1 addition & 0 deletions example-app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ android {

buildTypes {
release {
signingConfig signingConfigs.debug
minifyEnabled true
}
}
Expand Down
2 changes: 2 additions & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,5 @@ android.useAndroidX=true
android.enableJetifier=true
# Software Components will not be created automatically for Maven publishing from Android Gradle Plugin 8.0
android.disableAutomaticComponentCreation=true
# To test more aggressive optimizations
android.enableR8.fullMode=true
4 changes: 2 additions & 2 deletions sdk/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ android {
// See https://developer.android.com/studio/publish/versioning
// versionCode must be integer and be incremented by one for every new update
// android system uses this to prevent downgrades
versionCode 35
versionCode 36

// version number visible to the user
// should follow semantic versioning (See https://semver.org)
versionName "3.9.0"
versionName "3.9.1"

buildConfigField 'String', 'VERSION_NAME', "\"${defaultConfig.versionName}_${defaultConfig.versionCode}\""

Expand Down
3 changes: 3 additions & 0 deletions sdk/consumer-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,6 @@

# Prevent obfuscating the names when serializing to JSON
-keep class com.hcaptcha.sdk.HCaptchaConfig { *; }
-keepclasseswithmembernames public enum com.hcaptcha.sdk.** {
@com.fasterxml.jackson.annotation.JsonValue *;
}

0 comments on commit 0ee0816

Please sign in to comment.