Skip to content

Commit

Permalink
chore(onyxsdk_pen): improve pub.dev score
Browse files Browse the repository at this point in the history
Dart analyzer gets confused because there are two pubspec.yaml files with the name `onyxsdk_pen`.
  • Loading branch information
adil192 committed Feb 20, 2024
1 parent 7b7f8d7 commit 2baa6e5
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 3 deletions.
4 changes: 4 additions & 0 deletions packages/onyxsdk_pen/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.2.2

- Improved pub.dev scores

## 1.2.1

- Updated the Onyx SDK
Expand Down
2 changes: 1 addition & 1 deletion packages/onyxsdk_pen/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: onyxsdk_pen
description: This plugin integrates the Onyx Pen SDK into Flutter to improve e-ink responsiveness in drawing apps.
version: 1.2.1
version: 1.2.2
homepage: https://github.com/saber-notes/saber/tree/main/packages/onyxsdk_pen

topics:
Expand Down
6 changes: 4 additions & 2 deletions packages/onyxsdk_pen_dummy/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
name: onyxsdk_pen
# This name should be replaced with `onyxsdk_pen` by the `patches/remove_proprietary_dependencies.sh` script.
# This is because the Dart analyzer gets confused because there are two pubspec.yaml files with the name `onyxsdk_pen`.
name: onyxsdk_pen_dummy
description: This plugin integrates the Onyx Pen SDK into Flutter to improve e-ink responsiveness in drawing apps.
version: 1.2.0
version: 1.2.2
homepage: https://github.com/saber-notes/saber/tree/main/packages/onyxsdk_pen
publish_to: 'none'

Expand Down
10 changes: 10 additions & 0 deletions patches/remove_proprietary_dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,16 @@ else
sed -i -e 's!/onyxsdk_pen!/onyxsdk_pen_dummy!' pubspec.yaml
fi

# find "name: onyxsdk_pen_dummy" and replace with "name: onyxsdk_pen"
echo -n "Patching onyxsdk_pen_dummy to have name onyxsdk_pen: "
# check if packages/onyxsdk_pen_dummy/pubspec.yaml contains name: onyxsdk_pen_dummy
if grep -q "name: onyxsdk_pen_dummy" packages/onyxsdk_pen_dummy/pubspec.yaml; then
echo "found"
sed -i -e 's!name: onyxsdk_pen_dummy!name: onyxsdk_pen!' packages/onyxsdk_pen_dummy/pubspec.yaml
else
echo "already done"
fi

# remove Onyx maven repo
echo -n "Removing Onyx,jitpack maven repo: "
# check if android/build.gradle contains "repo.boox.com"
Expand Down

0 comments on commit 2baa6e5

Please sign in to comment.