Skip to content

Commit 5c1d6b7

Browse files
pengcao1alyezz
authored andcommitted
customize the generate sourcemap file or not (#381)
1 parent 1225412 commit 5c1d6b7

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,13 @@ For your app crashes to show up with a fully symbolicated stack trace, we will a
189189
190190
If your app token is defined as a constant, you can set an environment variable `INSTABUG_APP_TOKEN` to be used instead.
191191
192+
To disable the automatic upload in android, you can set the following property your build.gradle:
193+
```dart
194+
ext {
195+
instabugUploadEnable = false;
196+
}
197+
```
198+
192199
## Network Logging
193200
194201
Instabug network logging is enabled by default. It intercepts any requests performed with `fetch` or `XMLHttpRequest` and attaches them to the report that will be sent to the dashboard. To disable network logs:

android/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ task upload_sourcemap(type: Exec) {
5050
}
5151

5252
tasks.whenTaskAdded { task ->
53-
if (task.name == 'preReleaseBuild') {
53+
if (task.name == 'preReleaseBuild' &&
54+
rootProject.hasProperty("instabugUploadEnable") ? rootProject.instabugUploadEnable : true) {
5455
task.dependsOn upload_sourcemap
5556
}
5657
}

0 commit comments

Comments
 (0)