From af6ddb36155f126b63932e5ce88051b8011e89a9 Mon Sep 17 00:00:00 2001 From: Nikolas Rimikis Date: Sun, 21 May 2023 10:07:10 +0200 Subject: [PATCH 1/4] tool: use melos --- .gitignore | 6 +++++ melos.yaml | 13 +++++++++ packages/app/pubspec.lock | 10 +++---- packages/app/pubspec.yaml | 20 ++++++++++---- packages/app/pubspec_overrides.yaml | 27 +++++++++++++++++++ packages/neon/neon/pubspec.yaml | 12 ++++++--- packages/neon/neon/pubspec_overrides.yaml | 15 +++++++++++ packages/neon/neon_files/pubspec.yaml | 21 +++++++++++---- .../neon/neon_files/pubspec_overrides.yaml | 14 ++++++++++ packages/neon/neon_news/pubspec.yaml | 16 ++++++++--- .../neon/neon_news/pubspec_overrides.yaml | 17 ++++++++++++ packages/neon/neon_notes/pubspec.yaml | 16 ++++++++--- .../neon/neon_notes/pubspec_overrides.yaml | 17 ++++++++++++ packages/neon/neon_notifications/pubspec.yaml | 8 ++++-- .../neon_notifications/pubspec_overrides.yaml | 12 +++++++++ packages/nextcloud/README.md | 7 +++++ packages/nextcloud/pubspec.yaml | 8 ++++-- packages/nextcloud/pubspec_overrides.yaml | 6 +++++ pubspec.yaml | 7 +++++ 19 files changed, 222 insertions(+), 30 deletions(-) create mode 100644 .gitignore create mode 100644 melos.yaml create mode 100644 packages/app/pubspec_overrides.yaml create mode 100644 packages/neon/neon/pubspec_overrides.yaml create mode 100644 packages/neon/neon_files/pubspec_overrides.yaml create mode 100644 packages/neon/neon_news/pubspec_overrides.yaml create mode 100644 packages/neon/neon_notes/pubspec_overrides.yaml create mode 100644 packages/neon/neon_notifications/pubspec_overrides.yaml create mode 100644 packages/nextcloud/pubspec_overrides.yaml create mode 100644 pubspec.yaml diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..46c5b957 --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ + +.dart_tool/ +pubspec.lock + +# Melos reccomends not adding them to vcs but we need them as we don't use melos in CI +# **/pubspec_overrides.yaml diff --git a/melos.yaml b/melos.yaml new file mode 100644 index 00000000..0a9d6642 --- /dev/null +++ b/melos.yaml @@ -0,0 +1,13 @@ +name: nextcloud-neon +repository: https://github.com/provokateurin/nextcloud-neon + +sdkPath: .fvm/flutter_sdk + +packages: + - packages/* + - packages/dynamite/* + - packages/neon/* + +ide: + intellij: + enabled: false diff --git a/packages/app/pubspec.lock b/packages/app/pubspec.lock index 76221138..dfe31e2c 100644 --- a/packages/app/pubspec.lock +++ b/packages/app/pubspec.lock @@ -146,7 +146,7 @@ packages: source: hosted version: "0.7.8" dynamite_runtime: - dependency: transitive + dependency: "direct overridden" description: path: "../dynamite/dynamite_runtime" relative: true @@ -177,7 +177,7 @@ packages: source: hosted version: "6.1.4" file_icons: - dependency: transitive + dependency: "direct overridden" description: path: "../file_icons" relative: true @@ -534,7 +534,7 @@ packages: source: hosted version: "1.0.0" nextcloud: - dependency: transitive + dependency: "direct overridden" description: path: "../nextcloud" relative: true @@ -790,7 +790,7 @@ packages: source: hosted version: "0.1.6" settings: - dependency: transitive + dependency: "direct overridden" description: path: "../settings" relative: true @@ -882,7 +882,7 @@ packages: source: sdk version: "0.0.99" sort_box: - dependency: transitive + dependency: "direct overridden" description: path: "../sort_box" relative: true diff --git a/packages/app/pubspec.yaml b/packages/app/pubspec.yaml index 5397affe..eb2b082c 100644 --- a/packages/app/pubspec.yaml +++ b/packages/app/pubspec.yaml @@ -11,15 +11,25 @@ dependencies: sdk: flutter flutter_native_splash: ^2.2.19 neon: - path: ../neon/neon + git: + url: https://github.com/provokateurin/nextcloud-neon + path: packages/neon/neon neon_files: - path: ../neon/neon_files + git: + url: https://github.com/provokateurin/nextcloud-neon + path: packages/neon/neon_files neon_news: - path: ../neon/neon_news + git: + url: https://github.com/provokateurin/nextcloud-neon + path: packages/neon/neon_news neon_notes: - path: ../neon/neon_notes + git: + url: https://github.com/provokateurin/nextcloud-neon + path: packages/neon/neon_notes neon_notifications: - path: ../neon/neon_notifications + git: + url: https://github.com/provokateurin/nextcloud-neon + path: packages/neon/neon_notifications shared_preferences: ^2.1.1 dev_dependencies: diff --git a/packages/app/pubspec_overrides.yaml b/packages/app/pubspec_overrides.yaml new file mode 100644 index 00000000..53dae8cd --- /dev/null +++ b/packages/app/pubspec_overrides.yaml @@ -0,0 +1,27 @@ +# melos_managed_dependency_overrides: dynamite_runtime,file_icons,neon,neon_files,neon_news,neon_notes,neon_notifications,nextcloud,settings,sort_box,wakelock_windows +dependency_overrides: + dynamite_runtime: + path: ../dynamite/dynamite_runtime + file_icons: + path: ../file_icons + neon: + path: ../neon/neon + neon_files: + path: ../neon/neon_files + neon_news: + path: ../neon/neon_news + neon_notes: + path: ../neon/neon_notes + neon_notifications: + path: ../neon/neon_notifications + nextcloud: + path: ../nextcloud + settings: + path: ../settings + sort_box: + path: ../sort_box + wakelock_windows: + git: + url: https://github.com/creativecreatorormaybenot/wakelock + ref: 094b4a74c31e547c11525bcc050dbd06b02a1f67 + path: wakelock_windows diff --git a/packages/neon/neon/pubspec.yaml b/packages/neon/neon/pubspec.yaml index 48d2f451..071b5c59 100644 --- a/packages/neon/neon/pubspec.yaml +++ b/packages/neon/neon/pubspec.yaml @@ -26,7 +26,9 @@ dependencies: json_annotation: ^4.8.1 material_design_icons_flutter: ^6.0.7096 nextcloud: - path: ../../nextcloud + git: + url: https://github.com/provokateurin/nextcloud-neon + path: packages/nextcloud package_info_plus: ^4.0.0 path: ^1.8.3 path_provider: ^2.0.15 @@ -35,10 +37,14 @@ dependencies: quick_actions: ^1.0.3 rxdart: ^0.27.7 settings: - path: ../../settings + git: + url: https://github.com/provokateurin/nextcloud-neon + path: packages/settings shared_preferences: ^2.1.1 sort_box: - path: ../../sort_box + git: + url: https://github.com/provokateurin/nextcloud-neon + path: packages/sort_box sqflite: ^2.2.8+2 sqflite_common_ffi: ^2.2.5 tray_manager: ^0.2.0 diff --git a/packages/neon/neon/pubspec_overrides.yaml b/packages/neon/neon/pubspec_overrides.yaml new file mode 100644 index 00000000..9889317e --- /dev/null +++ b/packages/neon/neon/pubspec_overrides.yaml @@ -0,0 +1,15 @@ +# melos_managed_dependency_overrides: dynamite_runtime,nextcloud,settings,sort_box,wakelock_windows +dependency_overrides: + dynamite_runtime: + path: ../../dynamite/dynamite_runtime + nextcloud: + path: ../../nextcloud + settings: + path: ../../settings + sort_box: + path: ../../sort_box + wakelock_windows: + git: + url: https://github.com/creativecreatorormaybenot/wakelock + ref: 094b4a74c31e547c11525bcc050dbd06b02a1f67 + path: wakelock_windows diff --git a/packages/neon/neon_files/pubspec.yaml b/packages/neon/neon_files/pubspec.yaml index ea64ac3e..48cd20e7 100644 --- a/packages/neon/neon_files/pubspec.yaml +++ b/packages/neon/neon_files/pubspec.yaml @@ -9,7 +9,9 @@ environment: dependencies: collection: ^1.17.0 file_icons: - path: ../../file_icons + git: + url: https://github.com/provokateurin/nextcloud-neon + path: packages/file_icons file_picker: ^5.3.0 filesize: ^2.0.1 flutter: @@ -18,18 +20,27 @@ dependencies: intersperse: ^2.0.0 material_design_icons_flutter: ^6.0.7096 neon: - path: ../neon + git: + url: https://github.com/provokateurin/nextcloud-neon + path: packages/neon/neon nextcloud: - path: ../../nextcloud + git: + url: https://github.com/provokateurin/nextcloud-neon + path: packages/nextcloud open_file: ^3.3.1 path: ^1.8.3 provider: ^6.0.5 queue: ^3.1.0+2 rxdart: ^0.27.7 settings: - path: ../../settings + git: + url: https://github.com/provokateurin/nextcloud-neon + path: packages/settings + share_plus: ^7.0.0 sort_box: - path: ../../sort_box + git: + url: https://github.com/provokateurin/nextcloud-neon + path: packages/sort_box dev_dependencies: nit_picking: diff --git a/packages/neon/neon_files/pubspec_overrides.yaml b/packages/neon/neon_files/pubspec_overrides.yaml new file mode 100644 index 00000000..5c50df51 --- /dev/null +++ b/packages/neon/neon_files/pubspec_overrides.yaml @@ -0,0 +1,14 @@ +# melos_managed_dependency_overrides: dynamite_runtime,file_icons,neon,nextcloud,settings,sort_box +dependency_overrides: + dynamite_runtime: + path: ../../dynamite/dynamite_runtime + file_icons: + path: ../../file_icons + neon: + path: ../neon + nextcloud: + path: ../../nextcloud + settings: + path: ../../settings + sort_box: + path: ../../sort_box diff --git a/packages/neon/neon_news/pubspec.yaml b/packages/neon/neon_news/pubspec.yaml index d71c9dfe..8d70a9df 100644 --- a/packages/neon/neon_news/pubspec.yaml +++ b/packages/neon/neon_news/pubspec.yaml @@ -13,16 +13,24 @@ dependencies: html: ^0.15.3 material_design_icons_flutter: ^6.0.7096 neon: - path: ../neon + git: + url: https://github.com/provokateurin/nextcloud-neon + path: packages/neon/neon nextcloud: - path: ../../nextcloud + git: + url: https://github.com/provokateurin/nextcloud-neon + path: packages/nextcloud provider: ^6.0.5 rxdart: ^0.27.7 settings: - path: ../../settings + git: + url: https://github.com/provokateurin/nextcloud-neon + path: packages/settings share_plus: ^7.0.0 sort_box: - path: ../../sort_box + git: + url: https://github.com/provokateurin/nextcloud-neon + path: packages/sort_box url_launcher: ^6.1.11 wakelock: ^0.6.2 webview_flutter: ^4.2.0 diff --git a/packages/neon/neon_news/pubspec_overrides.yaml b/packages/neon/neon_news/pubspec_overrides.yaml new file mode 100644 index 00000000..770fa63e --- /dev/null +++ b/packages/neon/neon_news/pubspec_overrides.yaml @@ -0,0 +1,17 @@ +# melos_managed_dependency_overrides: dynamite_runtime,neon,nextcloud,settings,sort_box,wakelock_windows +dependency_overrides: + dynamite_runtime: + path: ../../dynamite/dynamite_runtime + neon: + path: ../neon + nextcloud: + path: ../../nextcloud + settings: + path: ../../settings + sort_box: + path: ../../sort_box + wakelock_windows: + git: + url: https://github.com/creativecreatorormaybenot/wakelock + ref: 094b4a74c31e547c11525bcc050dbd06b02a1f67 + path: wakelock_windows diff --git a/packages/neon/neon_notes/pubspec.yaml b/packages/neon/neon_notes/pubspec.yaml index df676f93..9da7ff85 100644 --- a/packages/neon/neon_notes/pubspec.yaml +++ b/packages/neon/neon_notes/pubspec.yaml @@ -13,16 +13,24 @@ dependencies: flutter_markdown: ^0.6.14 material_design_icons_flutter: ^6.0.7096 neon: - path: ../neon + git: + url: https://github.com/provokateurin/nextcloud-neon + path: packages/neon/neon nextcloud: - path: ../../nextcloud + git: + url: https://github.com/provokateurin/nextcloud-neon + path: packages/nextcloud provider: ^6.0.5 queue: ^3.1.0+2 rxdart: ^0.27.7 settings: - path: ../../settings + git: + url: https://github.com/provokateurin/nextcloud-neon + path: packages/settings sort_box: - path: ../../sort_box + git: + url: https://github.com/provokateurin/nextcloud-neon + path: packages/sort_box url_launcher: ^6.1.11 wakelock: ^0.6.2 diff --git a/packages/neon/neon_notes/pubspec_overrides.yaml b/packages/neon/neon_notes/pubspec_overrides.yaml new file mode 100644 index 00000000..770fa63e --- /dev/null +++ b/packages/neon/neon_notes/pubspec_overrides.yaml @@ -0,0 +1,17 @@ +# melos_managed_dependency_overrides: dynamite_runtime,neon,nextcloud,settings,sort_box,wakelock_windows +dependency_overrides: + dynamite_runtime: + path: ../../dynamite/dynamite_runtime + neon: + path: ../neon + nextcloud: + path: ../../nextcloud + settings: + path: ../../settings + sort_box: + path: ../../sort_box + wakelock_windows: + git: + url: https://github.com/creativecreatorormaybenot/wakelock + ref: 094b4a74c31e547c11525bcc050dbd06b02a1f67 + path: wakelock_windows diff --git a/packages/neon/neon_notifications/pubspec.yaml b/packages/neon/neon_notifications/pubspec.yaml index 76cf4b88..0806f421 100644 --- a/packages/neon/neon_notifications/pubspec.yaml +++ b/packages/neon/neon_notifications/pubspec.yaml @@ -11,9 +11,13 @@ dependencies: sdk: flutter material_design_icons_flutter: ^6.0.7096 neon: - path: ../neon + git: + url: https://github.com/provokateurin/nextcloud-neon + path: packages/neon/neon nextcloud: - path: ../../nextcloud + git: + url: https://github.com/provokateurin/nextcloud-neon + path: packages/nextcloud provider: ^6.0.5 rxdart: ^0.27.7 diff --git a/packages/neon/neon_notifications/pubspec_overrides.yaml b/packages/neon/neon_notifications/pubspec_overrides.yaml new file mode 100644 index 00000000..7b4559d5 --- /dev/null +++ b/packages/neon/neon_notifications/pubspec_overrides.yaml @@ -0,0 +1,12 @@ +# melos_managed_dependency_overrides: dynamite_runtime,neon,nextcloud,settings,sort_box +dependency_overrides: + dynamite_runtime: + path: ../../dynamite/dynamite_runtime + neon: + path: ../neon + nextcloud: + path: ../../nextcloud + settings: + path: ../../settings + sort_box: + path: ../../sort_box diff --git a/packages/nextcloud/README.md b/packages/nextcloud/README.md index 73ae91f4..52787ee4 100644 --- a/packages/nextcloud/README.md +++ b/packages/nextcloud/README.md @@ -15,6 +15,13 @@ dependencies: url: https://github.com/provokateurin/nextcloud-neon path: packages/nextcloud ref: $COMMIT + +dependency_overrides: + dynamite_runtime: + git: + url: https://github.com/provokateurin/nextcloud-neon + path: packages/dynamite/dynamite_runtime + ref: $COMMIT ``` You can either remove the `ref` or use a commit hash. It's not recommended to remove it, because then the version will be updated very often. diff --git a/packages/nextcloud/pubspec.yaml b/packages/nextcloud/pubspec.yaml index 4b720e05..18885338 100644 --- a/packages/nextcloud/pubspec.yaml +++ b/packages/nextcloud/pubspec.yaml @@ -12,7 +12,9 @@ dependencies: crypto: ^3.0.3 crypton: ^2.0.5 dynamite_runtime: - path: ../dynamite/dynamite_runtime + git: + url: https://github.com/provokateurin/nextcloud-neon + path: packages/dynamite/dynamite_runtime intl: ^0.18.0 universal_io: ^2.2.0 version: ^3.0.2 @@ -24,7 +26,9 @@ dev_dependencies: built_value_generator: ^8.5.0 coverage: ^1.6.3 dynamite: - path: ../dynamite/dynamite + git: + url: https://github.com/provokateurin/nextcloud-neon + path: packages/dynamite/dynamite nit_picking: git: url: https://github.com/stack11/dart_nit_picking diff --git a/packages/nextcloud/pubspec_overrides.yaml b/packages/nextcloud/pubspec_overrides.yaml new file mode 100644 index 00000000..fc25dc64 --- /dev/null +++ b/packages/nextcloud/pubspec_overrides.yaml @@ -0,0 +1,6 @@ +# melos_managed_dependency_overrides: dynamite,dynamite_runtime +dependency_overrides: + dynamite: + path: ../dynamite/dynamite + dynamite_runtime: + path: ../dynamite/dynamite_runtime diff --git a/pubspec.yaml b/pubspec.yaml new file mode 100644 index 00000000..b45b7ca2 --- /dev/null +++ b/pubspec.yaml @@ -0,0 +1,7 @@ +name: neon_workspace +publish_to: none + +environment: + sdk: '>=3.0.0 <4.0.0' +dev_dependencies: + melos: ^3.0.1 From 87c7f4b77a74397c65e47d3f41a22622c8bc7567 Mon Sep 17 00:00:00 2001 From: Nikolas Rimikis Date: Mon, 22 May 2023 10:24:21 +0200 Subject: [PATCH 2/4] tool: pin fvm and mono_repo version --- .github/workflows/dart.yml | 4 ++-- pubspec.yaml | 2 ++ tool/ci.sh | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) mode change 100644 => 100755 tool/ci.sh diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index c0a9463b..9f8494bd 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -1,4 +1,4 @@ -# Created with package:mono_repo v6.5.5 +# Created with package:mono_repo v6.5.6 name: Dart CI on: push: @@ -33,7 +33,7 @@ jobs: name: Checkout repository uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab - name: mono_repo self validate - run: dart pub global activate mono_repo 6.5.5 + run: dart pub global activate mono_repo 6.5.6 - name: mono_repo self validate run: dart pub global run mono_repo generate --validate job_002: diff --git a/pubspec.yaml b/pubspec.yaml index b45b7ca2..ddcea5b6 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -4,4 +4,6 @@ publish_to: none environment: sdk: '>=3.0.0 <4.0.0' dev_dependencies: + fvm: ^2.4.1 melos: ^3.0.1 + mono_repo: ^6.5.6 diff --git a/tool/ci.sh b/tool/ci.sh old mode 100644 new mode 100755 index 2b5a2db1..59aa55ff --- a/tool/ci.sh +++ b/tool/ci.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Created with package:mono_repo v6.5.5 +# Created with package:mono_repo v6.5.6 # Support built in commands on windows out of the box. # When it is a flutter repo (check the pubspec.yaml for "sdk: flutter") From df41c0291e498056f6ffa39163deb8be921c40ee Mon Sep 17 00:00:00 2001 From: Nikolas Rimikis Date: Mon, 22 May 2023 10:29:32 +0200 Subject: [PATCH 3/4] tool: activate melos in install script --- tool/install.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tool/install.sh b/tool/install.sh index 8bd8dd37..0168dbc9 100755 --- a/tool/install.sh +++ b/tool/install.sh @@ -4,7 +4,8 @@ cd "$(dirname "$0")/.." git submodule init git submodule update -dart pub global activate mono_repo 6.5.0 +dart pub global activate melos 3.0.1 +dart pub global activate mono_repo 6.5.6 dart pub global activate fvm 2.4.1 yes | fvm install fvm exec mono_repo pub get From a8e8e0c916340f20de7345782e62410898a2519b Mon Sep 17 00:00:00 2001 From: Nikolas Rimikis Date: Mon, 22 May 2023 14:29:09 +0200 Subject: [PATCH 4/4] tool: fix melos in CI --- melos.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/melos.yaml b/melos.yaml index 0a9d6642..705b369e 100644 --- a/melos.yaml +++ b/melos.yaml @@ -3,6 +3,12 @@ repository: https://github.com/provokateurin/nextcloud-neon sdkPath: .fvm/flutter_sdk +bootstrap: + # It seems so that running "pub get" in parallel has some issues (like + # https://github.com/dart-lang/pub/issues/3404). Disabling this feature + # makes the CI much more stable. + runPubGetInParallel: false + packages: - packages/* - packages/dynamite/*