From 8a0e633bafcf8ee27205908eb7bd1d82992653f5 Mon Sep 17 00:00:00 2001 From: Anton Stubenbord Date: Tue, 14 Feb 2023 23:46:56 +0100 Subject: [PATCH] Update build instructions --- README.md | 13 ++++--------- scripts/install_dependencies.sh | 10 +++++----- 2 files changed, 9 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 9df5a4b..6dfe824 100644 --- a/README.md +++ b/README.md @@ -75,22 +75,17 @@ To get a local copy up and running follow these simple steps. ### Prerequisites * Install an IDE of your choice (e.g. VSCode with the Dart/Flutter extensions) - +* Install the flutter SDK (https://docs.flutter.dev/get-started/install) _or_ use the flutter git submodule pinned in this project by running `git submodule update --init` inside the project root directory. +* ### Install dependencies and generate files 1. First, clone the repository: ```sh git clone https://github.com/astubenbord/paperless-mobile.git ``` -In this project, flutter is pinned at a specific version as a git submodule to ensure all contributors work with the same environment and build with the same flutter version. You can also use your local flutter installation, just make sure that the app also compiles with the same flutter version as pinned in the `flutter` submodule when opening a pull request. -To download the pinned flutter SDK from the submodule and plan to install the dependencies manually in the next step, simply run -```sh -git submodule update --init -``` +You can now run the `scripts/install_dependencies.sh` script at the root of the project, which will automatically install dependencies and generate files for both the app and local packages. -You can now run the `scripts/install_dependencies.sh` script at the root of the project, which will automatically install dependencies and generate files for both the app and subpackages. Note that the `install_dependencies.sh` script will pull the flutter submodule and use the SDK to execute the flutter commands. - -If you don't want to use submodules, you can also run the following commands using your local flutter installation: +If you want to manually install dependencies and build generated files, you can also run the following commands: #### Inside the `packages/paperless_api/` folder: 2. Install the dependencies for `paperless_api` diff --git a/scripts/install_dependencies.sh b/scripts/install_dependencies.sh index 74306ac..8841787 100644 --- a/scripts/install_dependencies.sh +++ b/scripts/install_dependencies.sh @@ -3,9 +3,9 @@ git submodules update --init pushd ../ pushd packages/paperless_api -../../flutter/bin/flutter pub get -../../flutter/bin/flutter pub run build_runner build --delete-conflicting-outputs +flutter pub get +flutter pub run build_runner build --delete-conflicting-outputs popd -flutter/bin/flutter pub get -flutter/bin/flutter pub run build_runner build --delete-conflicting-outputs -flutter/bin/flutter pub run intl_utils:generate +flutter pub get +flutter pub run build_runner build --delete-conflicting-outputs +flutter pub run intl_utils:generate