-
Notifications
You must be signed in to change notification settings - Fork 26
Setting up your local development environment
Fernando Trigoso edited this page May 16, 2023
·
5 revisions
The Monarch team has worked hard to make the contribution workflow easy. The Monarch repo has many build scripts which ease the contribution experience.
The build scripts can be run from macOS, Windows, or Linux.
- On macOS, make sure you have Xcode installed.
- On Windows, make sure you have Visual Studio 2022 with the “Desktop development with C++” workload installed, including all of its default components.
- On Linux, make sure you have the
Additional Linux requirements
and also install
sudo apt install lib32stdc++-12-dev
(Flutter documentation issue).
The steps below will help you set up Monarch in your local environment.
-
Clone this repo to your local environment.
-
Create a
cli/lib/settings.dart
file with these contents:
const kDeployment = 'local';
const kElasticsearchEndpoint = '';
const kElasticsearchUsername = '';
const kElasticsearchPassword = '';
const kVersionApiUrl = '';
- Create a file
tools/local_settings.yaml
, and declare the paths to the local Flutter SDKs you want to use for Monarch:
local_flutter_sdks:
- /Users/bob/development/flutter-sdks/beta
- /Users/bob/development/flutter-sdks/stable
Monarch Linux works on Flutter 3.9 or above.
- Run
dart pub get
inside the tools directory:
cd tools
dart pub get
- From the monarch root directory, use the tools/build.dart script to build Monarch:
dart tools/build.dart all
The tools/build.dart script has many subcommands. To get more details run:
dart tools/build -h
The build script will output the built artifacts to the out directory.
- Run all the Monarch tests:
dart tools/test.dart
The tools/test.dart script accepts many arguments. To get more details run:
dart tools/test.dart -h
- Run the version of Monarch you just built against a new Flutter project:
flutter create my_project
cd my_project
/path/to/out/monarch/bin/monarch init
/path/to/out/monarch/bin/monarch run --verbose
To make things easier, you could add the out/monarch/bin
directory to your PATH.