Skip to content
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

Create tasks for debug variant which are not run by default #139

Merged
merged 2 commits into from
Dec 11, 2018

Conversation

fractalwrench
Copy link
Contributor

Goal

Tasks were not created for the debug buildType when bugsnag.uploadDebugBuildMappings was set to false. This means it's not possible to manually invoke the mapping file upload task for the debug buildType.

For example, ./gradlew uploadBugsnagJavaExample-debugMapping would be unsuccessful as the task does not exist in the project, whereas ./gradlew uploadBugsnagJavaExample-releaseMapping would be successful.

Our aim is to alter the plugin so that these debug tasks are created, but not run automatically. This is because in most scenarios, debug mapping files are not required and can slow down the build process.

Changeset

This changeset alters the plugin so that tasks are created regardless of build type. A dependency between tasks is only added if bugsnag.uploadDebugBuildMappings is true, meaning that only non-debug tasks are run automatically.

Tests

The existing mazerunner scenarios were run, to verify that debug mappings are not uploaded automatically. Additionally a debug mapping upload task was invoked manually in an example project where the artefact was installed.

Tasks were not created for the debug buildType when uploadDebugBuildMappings was false, meaning
manually running mapping file upload was not possible. This change makes the plugin always create
the tasks, but only run them automatically if a flag has been set.
Copy link
Contributor

@bengourley bengourley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified that when uploadDebugBuildMappings=false

  • uploadBugsnagDebugMapping task is created but not run by default
  • uploadBugsnagDebugMapping can be manually invoked

@fractalwrench fractalwrench merged commit 368964a into next Dec 11, 2018
@fractalwrench fractalwrench deleted the create-debug-tasks branch December 11, 2018 10:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants