Skip to content

Commit d327394

Browse files
LI-58415 - Update documentation to handle no such method due Android Code Shrink tool to remove Generics java classes definitions.
1 parent 21d447a commit d327394

File tree

4 files changed

+15
-5
lines changed

4 files changed

+15
-5
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
Changelog
22
=========
3+
[1.0.2](https://github.com/hyperwallet/hyperwallet-android-sdk/releases/tag/1.0.2)
4+
-------------------
5+
* Update documentation to handle not such method exception generated by code shirk
36
[1.0.1](https://github.com/hyperwallet/hyperwallet-android-sdk/releases/tag/1.0.1)
47
-------------------
58
* Handle error no such method exception

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ We also provide an out-of-the-box [Hyperwallet Android UI SDK](https://github.c
2121
To install Hyperwallet Core SDK, you just need to add the dependency into your build.gradle file in Android Studio (or Gradle). For example:
2222

2323
```bash
24-
api 'com.hyperwallet.android:core-sdk:1.0.1'
24+
api 'com.hyperwallet.android:core-sdk:1.0.2'
2525
```
2626

2727
### Proguard
@@ -32,6 +32,13 @@ When enabling Proguard, please add a rule in `proguard-rules.pro` file in your m
3232
-keep public class com.hyperwallet.android.** { *; }
3333
```
3434

35+
On Grandle 7 and above, please add rules as well.
36+
Note: That will prevent `java.lang.NoSuchMethodException: com.hyperwallet.android.model.TypeReference.<init> [class org.json.JSONObject]`
37+
```properties
38+
-keep,allowobfuscation,allowshrinking class com.hyperwallet.android.model.TypeReference
39+
-keep,allowobfuscation,allowshrinking class * extends com.hyperwallet.android.model.TypeReference
40+
```
41+
3542
## Initialization
3643

3744
After you're done installing the SDK, you need to initialize an instance in order to utilize core SDK functions. Also you need to provide a [HyperwalletAuthenticationTokenProvider](#Authentication) object to retrieve an authentication token.

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ allprojects {
1919
mavenCentral()
2020
mavenLocal()
2121
}
22-
project.version = "1.0.2-beta-8"
22+
project.version = "1.0.2"
2323
}
2424

2525
task clean(type: Delete) {

core/src/test/java/com/hyperwallet/android/RestTransactionBuilderTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public void testBuild_withRequiredParametersOnly() throws JSONException {
6767
assertThat(headers.get("Content-Type"), is("application/json"));
6868
assertThat(headers.get("User-Agent"), is("HyperwalletSDK/Android/" + BuildConfig.VERSION_NAME +
6969
"; App: HyperwalletSDK; Android: " + Build.VERSION.RELEASE));
70-
assertThat(headers.get("X-Sdk-Version"), is("1.0.2-beta-8"));
70+
assertThat(headers.get("X-Sdk-Version"), is("1.0.2"));
7171
assertThat(headers.get("X-Sdk-Type"), is("android"));
7272
assertThat(headers.get("X-Sdk-ContextId"), is(notNullValue()));
7373
assertThat(headers.get("X-Sdk-ContextId"), is(contextId));
@@ -104,7 +104,7 @@ public void testBuild_withJsonModelOptionalParameter() throws JSONException {
104104
assertThat(headers.get("Content-Type"), is("application/json"));
105105
assertThat(headers.get("User-Agent"), is("HyperwalletSDK/Android/" + BuildConfig.VERSION_NAME +
106106
"; App: HyperwalletSDK; Android: " + Build.VERSION.RELEASE));
107-
assertThat(headers.get("X-Sdk-Version"), is("1.0.2-beta-8"));
107+
assertThat(headers.get("X-Sdk-Version"), is("1.0.2"));
108108
assertThat(headers.get("X-Sdk-Type"), is("android"));
109109
assertThat(headers.get("X-Sdk-ContextId"), is(notNullValue()));
110110
assertThat(headers.get("X-Sdk-ContextId"), is(contextId));
@@ -140,7 +140,7 @@ public void testBuild_withQueryModelOptionalParameter() throws JSONException {
140140
assertThat(headers.get("Content-Type"), is("application/json"));
141141
assertThat(headers.get("User-Agent"), is("HyperwalletSDK/Android/" + BuildConfig.VERSION_NAME +
142142
"; App: HyperwalletSDK; Android: " + Build.VERSION.RELEASE));
143-
assertThat(headers.get("X-Sdk-Version"), is("1.0.2-beta-8"));
143+
assertThat(headers.get("X-Sdk-Version"), is("1.0.2"));
144144
assertThat(headers.get("X-Sdk-Type"), is("android"));
145145
assertThat(headers.get("X-Sdk-ContextId"), is(notNullValue()));
146146
assertThat(headers.get("X-Sdk-ContextId"), is(contextId));

0 commit comments

Comments
 (0)