Update build and install instructions

Adapt build instructions to the recently added flutter submodule
This commit is contained in:
Anton Stubenbord
2023-02-13 18:32:59 +01:00
committed by GitHub
parent edd8b899c8
commit 6bbc396039

View File

@@ -74,8 +74,6 @@ With this app you can conveniently add, manage or simply find documents stored i
To get a local copy up and running follow these simple steps.
### Prerequisites
* Install the Flutter SDK (https://docs.flutter.dev/get-started/install)
* Install an IDE of your choice (e.g. VSCode with the Dart/Flutter extensions)
### Install dependencies and generate files
@@ -83,11 +81,18 @@ To get a local copy up and running follow these simple steps.
```sh
git clone https://github.com/astubenbord/paperless-mobile.git
```
You can now either run the `install_dependencies.sh` script at the root of the project, which will automatically install dependencies and generate code for both the app and subpackages, or you can manually run the following steps:
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 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:
#### Inside the `packages/paperless_api/` folder:
2. Install the dependencies for `paperless_api`
```sh
flutter pub get
@@ -129,6 +134,8 @@ buildTypes {
}
}
```
or use your own signing configuration as described in https://docs.flutter.dev/deployment/android#signing-the-app and leave the `build.gradle` as is.
2. Build the app with release profile (here for android):
```sh
flutter build apk