From fd29a63ea69f2a784286c94dd1a263d50de9bbd4 Mon Sep 17 00:00:00 2001 From: Mitchel Humpherys Date: Fri, 23 Aug 2024 15:13:56 -0700 Subject: [PATCH] docs: Add vendoring instructions to README Fixes #124 --- README.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/README.md b/README.md index 4f3e59d..1543a7d 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,37 @@ For complete usage instructions and configuration reference, see our [`rollbar-d See our [Releases](https://github.com/rollbar/rollbar-flutter/releases) page for a list of all releases and changes. +## Vendoring + +Since Rollbar will no longer be publishing package updates to pub.dev, it's +recommended that you "vendor" the Rollbar packages into your project so +that you can have full control over the versions being pulled in, pull in +fixes from the community, etc. For example, the `rollbar_dart` package on +pub.dev currently has old http dependencies, even though this has already +been updated on the `main` branch. + +To vendor this package in your project, it's recommended to add it as a +`git` submodule, like so: + +``` +git submodule add https://github.com/rollbar/rollbar-flutter.git vendor/rollbar-flutter +``` + +You might also want to fork the repo and use your fork URL in the above +command. + +Next, remove `rollbar_flutter: ^X.X.X` from the `dependencies:` block in +your `pubspec.yaml`, and add the following: + +```yaml +dependencies: + ... + + # vendored packages + rollbar_flutter: + path: vendor/rollbar-flutter/rollbar_flutter +``` + ## Help / Support If you run into any issues, please email us at [support@rollbar.com](mailto:support@rollbar.com).