Skip to content

Commit 1078585

Browse files
committed
Merged in release/16.2.1 (pull request #83)
Release/16.2.1
2 parents 7449990 + 24374ab commit 1078585

21 files changed

Lines changed: 1602 additions & 5217 deletions

File tree

.run/iOS.run.xml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<component name="ProjectRunConfigurationManager">
2+
<configuration default="false" name="iOS" type="js.build_tools.npm">
3+
<package-json value="$PROJECT_DIR$/example/package.json" />
4+
<command value="run" />
5+
<scripts>
6+
<script value="ios" />
7+
</scripts>
8+
<node-interpreter value="project" />
9+
<envs />
10+
<method v="2" />
11+
</configuration>
12+
</component>

README.md

Lines changed: 21 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -34,44 +34,6 @@ Install pods from the project root directory:
3434
cd ios && pod install && cd ..
3535
```
3636

37-
### Set compileSdkVersion version in the build.gradle file
38-
39-
Since Shake requires `compileSdkVersion` 29 or greater, verify that `compileSdkVersion` is correctly set in the *build.gradle* file:
40-
41-
```groovy title="android/build.gradle"
42-
buildscript {
43-
ext {
44-
buildToolsVersion = "30.0.2"
45-
minSdkVersion = 21
46-
compileSdkVersion = 30
47-
targetSdkVersion = 30
48-
ndkVersion = "20.1.5948944"
49-
}
50-
repositories {
51-
google()
52-
mavenCentral()
53-
}
54-
dependencies {
55-
classpath("com.android.tools.build:gradle:4.2.1")
56-
}
57-
}
58-
```
59-
60-
### Set multidexEnabled flag in the build.gradle file
61-
62-
If you do not have *multiDexEnabled* flag set, update app-level *build.gradle* like below:
63-
64-
```groovy title="app/build.gradle"
65-
defaultConfig {
66-
applicationId "com.shakebugs.react.example"
67-
minSdkVersion rootProject.ext.minSdkVersion
68-
targetSdkVersion rootProject.ext.targetSdkVersion
69-
versionCode 1
70-
versionName "1.0.0"
71-
multiDexEnabled true
72-
}
73-
```
74-
7537
### Start Shake
7638

7739
Call `Shake.start()` method in the *index.js* file.
@@ -89,6 +51,27 @@ Shake.start('client-id', 'client-secret');
8951

9052
Replace `client-id` and `client-secret` with the actual values you have in [your workspace settings](https://app.shakebugs.com/settings/workspace#general).
9153

54+
## Troubleshooting
55+
56+
If you get the following error during the build time:
57+
58+
```
59+
Execution failed for task ':app:mergeDexDebug'.
60+
```
61+
62+
You should set *multiDexEnabled* flag in app-level *build.gradle* like below:
63+
64+
```groovy title="app/build.gradle"
65+
defaultConfig {
66+
applicationId "com.shakebugs.react.example"
67+
minSdkVersion rootProject.ext.minSdkVersion
68+
targetSdkVersion rootProject.ext.targetSdkVersion
69+
versionCode 1
70+
versionName "1.0.0"
71+
multiDexEnabled true
72+
}
73+
```
74+
9275
## Resources
9376

9477
- [Official docs](https://www.shakebugs.com/docs/)

android/src/development/google-services.json

Lines changed: 0 additions & 263 deletions
This file was deleted.

android/src/main/java/com/shakebugs/react/ShakeModule.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -720,6 +720,11 @@ public void run() {
720720
});
721721
}
722722

723+
@ReactMethod
724+
public void setTags(final ReadableArray tagsArray) {
725+
Shake.getReportConfiguration().setTags(mapper.mapToTagsList(tagsArray));
726+
}
727+
723728
/*
724729
* Callbacks starters.
725730
*/

android/src/main/java/com/shakebugs/react/utils/Mapper.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -469,6 +469,16 @@ public ChatNotification mapToChatNotification(ReadableMap notificationData) {
469469
return chatNotification;
470470
}
471471

472+
public List<String> mapToTagsList(ReadableArray tagsArray) {
473+
if (tagsArray == null) return null;
474+
475+
ArrayList<String> tags = new ArrayList<>();
476+
for (int i = 0; i < tagsArray.size(); i++) {
477+
tags.add(tagsArray.getString(i));
478+
}
479+
return tags;
480+
}
481+
472482
private Map<String, Object> toMap(ReadableMap readableMap) {
473483

474484
Map<String, Object> map = new HashMap<>();

0 commit comments

Comments
 (0)