All Projects โ†’ leoafarias โ†’ Fvm

leoafarias / Fvm

Licence: mit
Flutter Version Management: A simple CLI to manage Flutter SDK versions.

Programming Languages

dart
5743 projects

Projects that are alternatives of or similar to Fvm

Devkit
Stars: โœญ 561 (-56.61%)
Mutual labels:  cli, sdk
Zapier Platform Cli
๐Ÿ’ป Build Zapier integrations and test locally using the JavaScript tools you already know.
Stars: โœญ 249 (-80.74%)
Mutual labels:  cli, sdk
Globalplatformpro
๐ŸŒ ๐Ÿ” Manage applets and keys on JavaCard-s like a pro (via command line or from your Java project)
Stars: โœญ 409 (-68.37%)
Mutual labels:  cli, sdk
Aliyun Cli
Alibaba Cloud CLI
Stars: โœญ 561 (-56.61%)
Mutual labels:  cli, sdk
Pyintelowl
Robust Python SDK and Command Line Client for interacting with IntelOwl's API.
Stars: โœญ 26 (-97.99%)
Mutual labels:  cli, sdk
Nodejs
Everything related to the Node.js ecosystem for the commercetools platform.
Stars: โœญ 47 (-96.37%)
Mutual labels:  cli, sdk
Sdk
Core functionality needed to create .NET Core projects, that is shared between Visual Studio and CLI
Stars: โœญ 996 (-22.97%)
Mutual labels:  cli, sdk
Cli
๐Ÿ’ป Decentraland command-line interface
Stars: โœญ 49 (-96.21%)
Mutual labels:  cli, sdk
Wxpay
ๅพฎไฟกๆ”ฏไป˜SDK - ๅ•†ๆˆทๆ”ฏไป˜/ๅ•†ๆˆทๅˆ†่ดฆ/ๆœๅŠกๅ•†ๆ”ฏไป˜/ๆœๅŠกๅ•†ๆ”ฏไป˜
Stars: โœญ 90 (-93.04%)
Mutual labels:  sdk
Diceparser
Powerful dice Roller is used as discord bot, irc bot, cli tool and inside Rolisteam : 1d20+4, 1L[head,arm,leg,belly,chest], 1d6+1d8, 8+5*3
Stars: โœญ 90 (-93.04%)
Mutual labels:  cli
Png To Ico
convert png to ico format
Stars: โœญ 88 (-93.19%)
Mutual labels:  cli
Spider
A small dart library to generate Assets dart code from assets folder.
Stars: โœญ 90 (-93.04%)
Mutual labels:  cli
Gtts
Python library and CLI tool to interface with Google Translate's text-to-speech API
Stars: โœญ 1,303 (+0.77%)
Mutual labels:  cli
Apk File
Search apk package contents via the command line.
Stars: โœญ 89 (-93.12%)
Mutual labels:  cli
Amadeus Node
Node library for the Amadeus Self-Service travel APIs
Stars: โœญ 91 (-92.96%)
Mutual labels:  sdk
Crowdin Cli
A command-line client for the Crowdin API
Stars: โœญ 89 (-93.12%)
Mutual labels:  cli
Vvisp
A Smart Way to Operate Smart Contracts on EVM Based Blockchains like Ethereum
Stars: โœญ 89 (-93.12%)
Mutual labels:  cli
Crlf Injection Scanner
Command line tool for testing CRLF injection on a list of domains.
Stars: โœญ 91 (-92.96%)
Mutual labels:  cli
Lintly
Automated GitHub PR code reviewer for Python, JavaScript, CSS, and more.
Stars: โœญ 91 (-92.96%)
Mutual labels:  cli
Run
โšกThe resource runtime
Stars: โœญ 90 (-93.04%)
Mutual labels:  cli
drawing

GitHub stars Pub Version Likes Health Coverage Github All Contributors MIT Licence Awesome Flutter

Flutter Version Management: A simple cli to manage Flutter SDK versions.

FVM helps with the need for a consistent app builds by allowing to reference Flutter SDK version used on a per-project basis. It also allows you to have multiple Flutter versions installed to quickly validate and test upcoming Flutter releases with your apps, without waiting for Flutter installation every time.

Features:

  • Configure and use Flutter SDK version per project
  • Ability to install and cache multiple Flutter SDK Versions
  • Fast switch between Flutter channels & versions
  • Dynamic SDK paths for IDE debugging support.
  • Version FVM config with a project for consistency across teams and CI environments.
  • Set global Flutter version across projects

GUI App - MacOS & Windows Download (Alpha)

FVM App Screenshot

Read more about it here.

Version Management

This tool allows you to manage multiple channels and releases, and caches these versions locally, so you don't have to wait for a full setup every time you want to switch versions.

Also, it allows you to grab versions by a specific release, i.e. v1.2.0 or 1.17.0-dev.3.1. In case you have projects in different Flutter SDK versions and do not want to upgrade.

Usage

  1. Install Dart.
  2. Activate Fvm:
> pub global activate fvm

Read dart.dev docs for more info on how to run global dart scripts.

And then, for information on each command:

> fvm help

Install a SDK Version

FVM gives you the ability to install many Flutter releases or channels.

  • version - use stable to install the Stable channel and v1.8.0 or 1.17.0-dev.3.1 to install the release.
  • --skip-setup - will skip Flutter setup after install
> fvm install <version>

Project Config SDK Version

If you configured your project to use a specific version, run install without any arguments will install the proper version.

> fvm install

Check out use command to see how to configure a version per project.

Use a SDK Version

You can use different Flutter SDK versions per project. To do that you have to go into the root of the project and:

> fvm use <version>

Set Global Version

If you want to use a specific version by default in your machine, you can specify the flag --global to the use command. A symbolic link to the Flutter version will be created in the fvm home folder, which you could then add to your PATH environment variable as follows: FVM_HOME/default/bin. Use fvm use --help, this will give you the exact path you need to configure.

โš ๏ธ Do not activate fvm using flutter pub global activate if you plan on using the --global flag. Only activate fvm using pub global activate fvm.

> fvm use <version> --global

Force Flag

Fvm only allows to call the use command on Flutter projects. However if you want to call the use command on a non-flutter directory use the --force flag.

If you are starting a new project and plan on using fvm flutter create you wil have to use the --force flag

> fvm use <version> --force

Remove a SDK Version

Using the remove command will uninstall the SDK version locally, this will impact any projects that depend on that version of the SDK.

> fvm remove <version>

Upgrade the current SDK Version

To upgrade currently used Flutter SDK version (e.g. stable) you should call the Flutter SDK command as you would normally do in case of typical Flutter installation. See more in the section Running Flutter SDK commands.

> fvm flutter upgrade

List Installed Versions

List all the versions that are installed on your machine. This command will also output where FVM stores the SDK versions.

> fvm list

List Flutter Releases

Displays all Flutter releases, including the current version for dev, beta and stable channels.

> fvm releases

Running Flutter SDK commands

There are couple of ways you can interact with the Flutter SDK setup in your project. You can run all the Flutter commands through the fvm proxy commands.

Proxy Commands

Flutter command within fvm proxies all calls to the CLI just changing the SDK to be the local one.

For instance, to run the flutter run with a given Flutter SDK version just call the following. FVM will recursively try for a version in a parent directory.

> fvm flutter run

This syntax works also for commands with parameters. The following command will call flutter build for a selected flavor and target.

> fvm flutter build aab --release --flavor prod -t lib/main_prod.dart

In other words, calling a fvm flutter xxx command is equivalent to flutter xxx if fvm is available in the directory tree.

Call Local SDK Directly

You can also call the local SDK directly bypassing the proxy commands. FVM creates a symbolic link within your project called fvm which links to the installed version of the SDK.

> .fvm/flutter_sdk/bin/flutter run

The above example is equivalent to flutter run command using the local project SDK.

Change FVM Cache Directory

You are able to configure the fvm cache directory by setting FVM_HOME environment variable. If nothing is set the default fvm path will be used. You are also able to change the directory by setting the --cache-path on the config. See below

FVM Config

There are some configurations which you are able to set on FVM. All settings set on CLI are compatible with the App(GUI).

List config

> fvm config

Set cache path

Location where Flutter SDK versions will be stored. If nothing is set, default will be used.

> fvm config --cache-path <CACHE_PATH>

Flutter Fork & Git Cache

You are able to use your own Flutter fork or cache the Flutter git locally for faster cloning, by setting the FVM_GIT_CACHE environment variable.

Configure Your IDE

In some situations you might have to restart your IDE and the Flutter debugger to make sure it uses the new version.

VSCode

Add the following to your settings.json. This will list all Flutter SDKs installed when using VSCode when using Flutter: Change SDK.

Use fvm list to show you the path to the versions.

List all versions installed by FVM

You can see all the versions installed by FVM in VS Code by just providing path to versions directory:

{
  "dart.flutterSdkPaths": ["/Users/usr/fvm/versions"]
}

Alternatively, you can specify only selected versions. The following snippet will cause VS Code to show only stable and dev versions of Flutter.

{
  "dart.flutterSdkPaths": [
    "/Users/usr/fvm/versions/stable",
    "/Users/usr/fvm/versions/dev"
  ]
}

To change current Flutter version open a project and select Flutter: Change SDK in the command palette. You should see all the versions as depicted in the following screenshot.

VS Code version selector screenshot

You can also add the version symlink for dynamic switch

{
  "dart.flutterSdkPaths": [".fvm/flutter_sdk"]
}

Remove the flutter sdk from search to make things easier

{
  "search.exclude": {
    "**/.fvm": true
  },
}

Android Studio

Copy the absolute path of fvm symbolic link in your root project directory. Example: /absolute/path-to-your-project/.fvm/flutter_sdk

In the Android Studio menu open Languages & Frameworks -> Flutter or search for Flutter and change Flutter SDK path. Apply the changes. You now can Run and Debug with the selected versions of Flutter. Restart Android Studio to see the new settings applied.

Add your IDE instructions here

Working with this repo

Tests

pub run test

Publishing package

Before pushing package to pub.dev. Run command to create version constant.

pub run build_runner build

Update test coverage

To update test coverage run the following command.

pub run test_coverage

Troubleshooting

  1. On Windows make sure you are running as an administrator
  2. If you get errors with messages invalid kernel binary or invalid sdk hash it means you activated fvm using flutter pub global activate fvm. Only activate fvm using pub global activate fvm.

License

This project is licensed under the MIT License - see the LICENSE file for details

Contributors โœจ

Thanks goes to these wonderful people (emoji key):


Leo Farias

๐Ÿ“– ๐Ÿค” ๐Ÿ’ป ๐Ÿ’ก ๐Ÿ‘€ ๐Ÿšง ๐Ÿš‡

Ianko Leite

๐Ÿค”

Caijinglong

๐Ÿ’ป ๐Ÿค”

zmtzawqlp

๐Ÿ›

Peter Leibiger

๐Ÿ’ป ๐Ÿšง ๐Ÿ’ฌ

Luca Panteghini

๐Ÿ“–

David Martos

๐Ÿ’ป โš ๏ธ ๐Ÿ“–

Sven Jacobs

๐Ÿ’ป

Wolfhard Prell

๐Ÿ’ป

Jaspreet Singh

๐Ÿค” ๐Ÿ’ป

Matias de Andrea

๐Ÿ“–

znjameswu

๐Ÿ›

Dominik Roszkowski

๐Ÿ“– ๐Ÿ“ข

Suguru Kishimoto

๐Ÿ›

mx1up

๐Ÿ› ๐Ÿ’ป

Alexandru Mariuti

๐Ÿ’ป

Andrea Del Fante

๐Ÿค” ๐Ÿ’ป

Pieter van Loon

๐Ÿ’ป ๐Ÿค”

This project follows the all-contributors specification. Contributions of any kind welcome!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].