-
-
Notifications
You must be signed in to change notification settings - Fork 121
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
Add support for bugsnagReporting in gradle config. #820
Add support for bugsnagReporting in gradle config. #820
Conversation
configuration/src/main/kotlin/com/malinskiy/marathon/config/Configuration.kt
Show resolved
Hide resolved
@@ -181,8 +181,6 @@ class Marathon( | |||
} | |||
|
|||
private fun logSystemInformation() { | |||
log.info { "System Information:" } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How is this relevant to the PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, that was not intentional, added it back.
/** | ||
* Whether to report crashes to Bugsnag. By default, this is enabled. Use **false** to disable. | ||
*/ | ||
var bugsnagReporting: Boolean = true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
@@ -51,6 +51,8 @@ android { | |||
} | |||
|
|||
marathon { | |||
analyticsTracking = false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove these from the sample app. Instead, maybe the docs need an example of disabling bugsnag for both CLI and for Gradle, currently there are none.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed and updated docs/docs/intro/configure.md
...guration/src/main/kotlin/com/malinskiy/marathon/config/serialization/ConfigurationFactory.kt
Outdated
Show resolved
Hide resolved
Codecov Report
@@ Coverage Diff @@
## develop #820 +/- ##
=============================================
+ Coverage 59.55% 59.59% +0.04%
- Complexity 794 799 +5
=============================================
Files 213 213
Lines 4374 4381 +7
Branches 688 690 +2
=============================================
+ Hits 2605 2611 +6
- Misses 1444 1445 +1
Partials 325 325
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
docs/docs/intro/configure.md
Outdated
@@ -343,6 +344,42 @@ marathon { | |||
</TabItem> | |||
</Tabs> | |||
|
|||
NOTE: analyticsTracking can also be enabled (default value) / disabled directly from the CLI. It is disabled if it's set to be disabled in either the config or the CLI. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please just use https://docusaurus.io/docs/markdown-features/admonitions?
There are examples in the codebase for them already
docs/docs/intro/configure.md
Outdated
</TabItem> | ||
</Tabs> | ||
|
||
NOTE: bugsnagReporting can also be enabled (default value) / disabled directly from the CLI. It is disabled if it's set to be disabled in either the config or the CLI. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same with admonitions
Thanks @Malinskiy for the review! Are you going to merge this PR (since I obviously don't have permission to) or do we still need reviews from @tagantroy and @Vacxe ? |
I'm waiting for one more lgtm for a day and will merge afterwards assuming no issues. |
...guration/src/main/kotlin/com/malinskiy/marathon/config/serialization/ConfigurationFactory.kt
Outdated
Show resolved
Hide resolved
...guration/src/main/kotlin/com/malinskiy/marathon/config/serialization/ConfigurationFactory.kt
Outdated
Show resolved
Hide resolved
@Malinskiy let's merge |
See #818. This PR essentially adds feature parity between
analyticsTracking
andbugsnagReporting
This PR also:
analyticsTracking
is set to False in the gradle configThings are a bit messy today because
analyticsTracking
can be set in both Marathonfile / gradle config and CLI today. In the case where we run Marathon from gradle, we can only set it inside gradle config but not the CLI. Before this PR,analyticsTracking
defaults to False for Marathon config but defaults to True for CLI. This makes it impossible to disableanalyticsTracking
when running Marathon from Gradle because the CLI's default True value will always take priority and overwrite whatever value we have in the Marathonfile / gradle config. This PR changes it such that we default to True for both Marathonfile / gradle config and CLI, and if we set it to False explicitly in either, we will disable the analytics tracking. A similar pattern is also applied tobugsnagReporting
.This PR is tested by:
samples/android-app
sample app where we seeNoop exceptions reporter started
withbugsnagReporting
set to False in the gradle config.ConfigurationFactory.kt