Skip to content

Commit

Permalink
Merge pull request #51 from IO-Design-Team/feature/hive-override-readme
Browse files Browse the repository at this point in the history
Adds workaround for transitive Hive dependencies to README
  • Loading branch information
Rexios80 authored Nov 25, 2024
2 parents f8172d4 + 2cfed60 commit 8a05c20
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 2 deletions.
4 changes: 4 additions & 0 deletions hive/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 2.8.0+2

- Adds workaround for transitive Hive dependencies to README

## 2.8.0+1

- Adds tutorial link to README
Expand Down
17 changes: 17 additions & 0 deletions hive/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,23 @@ import 'package:hive_ce/hive.dart';
import 'package:hive_ce_flutter/hive_flutter.dart';
```

## Workaround for transitive Hive dependencies

If you are using a package that depends on Hive v2, you can use the following workaround to force it to use Hive CE:

```yaml
dependencies:
# Depend on hive_ce to prevent resolving breaking versions
hive_ce: latest

dependency_overrides:
hive:
git:
url: https://github.com/IO-Design-Team/hive_ce
ref: f8172d4b88b195eea1b1d07e3397332dc77a91ae
path: overrides/hive
```
## Usage
You can use Hive just like a map. It is not necessary to await `Futures`.
Expand Down
2 changes: 1 addition & 1 deletion hive/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: hive_ce
description: Hive Community Edition - A spiritual continuation of Hive v2
version: 2.8.0+1
version: 2.8.0+2
homepage: https://github.com/IO-Design-Team/hive_ce/tree/main/hive
documentation: https://docs.hivedb.dev/

Expand Down
6 changes: 5 additions & 1 deletion overrides/hive/example/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ environment:

dependencies:
hive: any
hive_ce: ^2.8.0

dependency_overrides:
hive:
path: ../
git:
url: https://github.com/IO-Design-Team/hive_ce
ref: f8172d4b88b195eea1b1d07e3397332dc77a91ae
path: overrides/hive
2 changes: 2 additions & 0 deletions overrides/hive/example/puby.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
exclude:
- pub run build_runner
2 changes: 2 additions & 0 deletions overrides/hive/puby.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
exclude:
- pub run build_runner

0 comments on commit 8a05c20

Please sign in to comment.