Skip to content

Latest commit

 

History

History
44 lines (33 loc) · 1.86 KB

BUILD.md

File metadata and controls

44 lines (33 loc) · 1.86 KB

How to build OpenStop

Prerequisites

Install and setup the Flutter SDK.

Build process

To build/run the app, navigate into the project's folder and execute the following commands:

1. Get the necessary dependencies

flutter pub get

2. Create any generated code files

dart run build_runner build --delete-conflicting-outputs

Visit the build_runner package for more information.

3. Build and run the app

flutter run --dart-define THUNDERFOREST_API_KEY=${api key}

You can also omit the entire API key parameter. In this case the underlying map tiles won't be available in your build.

Additional notes

By default the app uses the OpenStreetMap development server for login and upload. In order to use the live servers the custom parameter --dart-define=IS_RELEASE=true has to be set when running/building the app. Note: This has nothing to do with flutter's release, profile and debug mode.

To build the app for a specific platform (apk, appbundle, ios, web) in its ultimate form (except code signing), use the following command:

flutter build ${platform} --release --dart-define=THUNDERFOREST_API_KEY=${api key} --dart-define=IS_RELEASE=true

The app uses a package to automatically generate icons for all platforms. If you modify the corresponding entries under flutter_icons: in pubspec.yaml or replace the icon images, you have to execute the following command for the modifications to take effect:

flutter pub run flutter_launcher_icons

Troubleshooting

macOS

If flutter doctor reports CocoaPods not installed and gem install cocoapods doesn't resolve the issue, try updating RubyGems by running gem update --system.