Automatically search for NDK shared object files in unity projects #316
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Goal
NDK shared object mapping files are not currently uploaded by the plugin in Unity projects. This changeset ensures that mapping files are now uploaded automatically.
Changeset
In addition to the user-defined value of
bugsnag.sharedObjectPaths
, the plugin will automatically search two additional directories: one which covers Unity projects using the Gradle build system, the other which covers Unity 2019+ projects which have been exported to a standalone Gradle project. SO mapping files will be generated for any SO files in these directories.This additionally fixes a bug with the default behaviour of
isNdkUploadEnabled
, so that it returns true by default for Unity projects. Previously this heuristic checked whether cmake was in use in a project; however, in a Unity project this would not be the case.Testing
Adapted E2E tests so that NDK SO files are uploaded against a test fixture of an exported Unity project. Additionally verified in a non-exported Unity project that SO mapping files were generated when NDK files were present, and added unit tests for
bugsnag.sharedObjectPaths
behaviour.