GithubHelp home page GithubHelp logo

verygoodopensource / very_good_cli Goto Github PK

View Code? Open in Web Editor NEW
2.1K 46.0 182.0 17.86 MB

A Very Good Command-Line Interface for Dart created by Very Good Ventures ๐Ÿฆ„

Home Page: http://cli.vgv.dev

License: MIT License

Dart 95.55% Shell 0.84% JavaScript 0.79% CSS 1.49% TypeScript 1.32%
dart flutter cli dart-package dart-library flutter-package

very_good_cli's Introduction

Very Good CLI


ci coverage pub package style: very good analysis License: MIT


A Very Good Command-Line Interface for Dart.

Developed with ๐Ÿ’™ by Very Good Ventures ๐Ÿฆ„

Documentation ๐Ÿ“

For official documentation, please visit https://cli.vgv.dev.

Quick Start ๐Ÿš€

Installing ๐Ÿง‘โ€๐Ÿ’ป

dart pub global activate very_good_cli

Or install a specific version using:

dart pub global activate very_good_cli <version>

If you haven't already, you might need to set up your path.

When that is not possible (eg: CI environments), run very_good commands via:

dart pub global run very_good_cli:very_good <command> <args>

Commands โœจ

Create a very good project in seconds based on the provided template. Each template has a corresponding sub-command (e.g.,very_good create flutter_app will generate a Flutter starter app).

Very Good Create

Creates a new very good project in the specified directory.

Usage: very_good create <subcommand> <project-name> [arguments]
-h, --help    Print this usage information.

Available subcommands:
  dart_cli          Generate a Very Good Dart CLI application.
  dart_package      Generate a Very Good Dart package.
  docs_site         Generate a Very Good documentation site.
  flame_game        Generate a Very Good Flame game.
  flutter_app       Generate a Very Good Flutter application.
  flutter_package   Generate a Very Good Flutter package.
  flutter_plugin    Generate a Very Good Flutter plugin.

Run "very_good help" to see global options.

Usage

# Create a new Flutter app named my_app
very_good create flutter_app my_app

# Create a new Flutter app named my_app with a custom org
very_good create flutter_app my_app --desc "My new Flutter app" --org "com.custom.org"

# Create a new Flutter app named my_app with a custom application id
very_good create flutter_app my_app --desc "My new Flutter app" --application-id "com.custom.app.id"

# Create a new Flame game named my_game
very_good create flame_game my_game --desc "My new Flame game"

# Create a new Wear OS app named my_wear_app
very_good create flutter_app my_wear_app --desc "My new Wear OS app" --template wear

# Create a new Flutter package named my_flutter_package
very_good create flutter_package my_flutter_package --desc "My new Flutter package"

# Create a new Dart package named my_dart_package
very_good create dart_package my_dart_package --desc "My new Dart package"

# Create a new Dart package named my_dart_package that is publishable
very_good create dart_package my_dart_package --desc "My new Dart package" --publishable

# Create a new Dart CLI application named my_dart_cli
very_good create dart_cli my_dart_cli --desc "My new Dart CLI package"

# Create a new Dart CLI application named my_dart_cli with a custom executable name
very_good create dart_cli my_dart_cli --desc "My new Dart CLI package" --executable-name my_executable_name

# Create a new Flutter plugin named my_flutter_plugin (all platforms enabled)
very_good create flutter_plugin my_flutter_plugin --desc "My new Flutter plugin"

# Create a new Flutter plugin named my_flutter_plugin (some platforms only)
very_good create flutter_plugin my_flutter_plugin --desc "My new Flutter plugin" --platforms android,ios,macos

# Create a new docs site named my_docs_site
very_good create docs_site my_docs_site

Run tests in a Dart or Flutter project.

# Run all tests
very_good test

# Run all tests and collect coverage
very_good test --coverage

# Run all tests and enforce 100% coverage
very_good test --coverage --min-coverage 100

# Run only tests in ./some/other/directory
very_good test ./some/other/directory

# Run tests recursively
very_good test --recursive

# Run tests recursively (shorthand)
very_good test -r

Get packages in a Dart or Flutter project.

# Install packages in the current directory
very_good packages get

# Install packages in ./some/other/directory
very_good packages get ./some/other/directory

# Install packages recursively
very_good packages get --recursive

# Install packages recursively (shorthand)
very_good packages get -r

Check packages' licenses in a Dart or Flutter project.

# Check licenses in the current directory
very_good packages check licenses

# Only allow the use of certain licenses
very_good packages check licenses --allowed="MIT,BSD-3-Clause,BSD-2-Clause,Apache-2.0"

# Deny the use of certain licenses
very_good packages check licenses --forbidden="unknown"

# Check licenses for certain dependencies types
very_good packages check licenses --dependency-type="direct-main,transitive"

See the complete list of commands and usage information.

๐Ÿฆ„ A Very Good Command-Line Interface

Usage: very_good <command> [arguments]

Global options:
-h, --help            Print this usage information.
    --version         Print the current version.
    --[no-]verbose    Noisy logging, including all shell commands executed.

Available commands:
  create     very_good create <subcommand> <project-name> [arguments]
             Creates a new very good project in the specified directory.
  packages   Command for managing packages.
  test       Run tests in a Dart or Flutter project.
  update     Update Very Good CLI.

Run "very_good help <command>" for more information about a command.

very_good_cli's People

Contributors

aaronkelton avatar abhishek01039 avatar agacemi avatar alestiago avatar denangelov avatar dependabot[bot] avatar dewinjm avatar droidbg avatar eliasreis54 avatar erickzanardo avatar felangel avatar github-actions[bot] avatar giuspepe avatar hkuczynski avatar kirpal avatar kylefin avatar limbou avatar macoshita avatar marcossevilla avatar mrgnhnt96 avatar renancaraujo avatar scarletteliza avatar superiorsd10 avatar tomarra avatar willhlas avatar wolfenrain avatar yaksh1 avatar yeikel16 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

very_good_cli's Issues

feat: add --org-name suggestion when user tries --org

Description
Reading https://github.com/VeryGoodOpenSource/very_good_cli/blob/main/doc/very_good_core.md language led me to believe I could use the --org flag.

Then, you can use the very_good create command just like you would flutter create

When using the --org flag, the error message Could not find an option named "org". Is there a way to include a "did you mean" feature? So for example when someone uses --org, they will see Could not find an option named "org". Did you mean --org-name?

Steps To Reproduce

  1. Run the command very_good create --org com.my_app my_app
  2. Read the error message Could not find an option named "org".

Expected Behavior
I expect to read a suggestion, because I have used very_good create just like flutter create, per the documentation.
I expect to read Could not find an option named "org". Did you mean --org-name?
An alternative solution would be to change the usage text after the error message to show the output of very_good create --help instead of the output of very_good --help

Screenshots
CleanShot 2022-01-02 at 10 12 10@2x

Generated Project Open in Intellij

Description
Loved the tools, Generated Project need some manual adjustment before it can run the project

Steps To Reproduce

very_good create budgetpos --org-name works.budgetapp.budgetpos

image

fix: omit type annotations for local variables warning

Description
I am getting omit type annotations for local variables whenever annotating the local varible

Steps To Reproduce

Creating a local variable in a function

Expected Behavior
Avoiding the error

Screenshots
image

Additional Context
On further inspection I found that I can supress the warning by commenting it or by turning it off in the analyzer.
I prefer annotating variables as it becomes more clearer and easier for me to understand at a later point of time.
It is turned on by the CLI,
I would like to know if annotating is good or bad and why I shouldn't use it

fix: java.lang.ClassNotFoundException: Didn't find class "com.example.verygoodcore.MainActivity"

Description
A newly created app doesn't run for Development, Staging, or Production environment. It always returns ClassNotFoundException

Steps To Reproduce

  1. Generate a new app using Very_Good_Cli version 0.4.4 and run it in any environment.

Outputs

  1. Flutter Doctor
    `Doctor summary (to see all details, run flutter doctor -v):
    [โœ“] Flutter (Channel stable, 2.5.1, on Microsoft Windows [Version 10.0.19043.1237], locale en-IN)
    [โœ“] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
    [โœ“] Chrome - develop for the web
    [โœ“] Android Studio (version 4.1)
    [โœ“] VS Code
    [โœ“] VS Code, 64-bit edition (version 1.60.2)
    [โœ“] Connected device (3 available)

โ€ข No issues found!`

  1. Very Good Cli Version: 0.4.4

  2. Flutter Run
    [ +156 ms] executing: [C:\flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%H
    [+1149 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
    [ ] ffb2ecea5223acdd139a5039be2f9c796962833d
    [ +1 ms] executing: [C:\flutter/] git tag --points-at ffb2ecea5223acdd139a5039be2f9c796962833d
    [ +221 ms] Exit code 0 from: git tag --points-at ffb2ecea5223acdd139a5039be2f9c796962833d
    [ ] 2.5.1
    [ +19 ms] executing: [C:\flutter/] git rev-parse --abbrev-ref --symbolic @{u}
    [ +91 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
    [ ] origin/stable
    [ ] executing: [C:\flutter/] git ls-remote --get-url origin
    [ +75 ms] Exit code 0 from: git ls-remote --get-url origin
    [ ] https://github.com/flutter/flutter.git
    [ +227 ms] executing: [C:\flutter/] git rev-parse --abbrev-ref HEAD
    [ +82 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
    [ ] stable
    [ +128 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
    [ ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
    [ ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
    [ ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
    [ +9 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
    [ ] Artifact Instance of 'WindowsUwpEngineArtifacts' is not required, skipping update.
    [ ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
    [ ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
    [ ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
    [ ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
    [ ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
    [ ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
    [ +142 ms] executing: C:\Users\KetulRastogi\AppData\Local\Android\sdk\platform-tools\adb.exe devices -l
    [ +100 ms] List of devices attached
    HS1202017111448 device product:HS117 model:Capture_ device:rimoB transport_id:3
    [ +14 ms] C:\Users\KetulRastogi\AppData\Local\Android\sdk\platform-tools\adb.exe -s HS1202017111448 shell getprop
    [ +108 ms] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
    [ ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
    [ ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
    [ +5 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
    [ ] Artifact Instance of 'WindowsUwpEngineArtifacts' is not required, skipping update.
    [ ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
    [ ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
    [ ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
    [ ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
    [ ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
    [ ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
    [ +191 ms] Initializing file store
    [ +22 ms] Done initializing file store
    [ +56 ms] Skipping target: gen_localizations
    [ +3 ms] Persisting file store
    [ +9 ms] Done persisting file store
    [ +18 ms] Skipping pub get: version match.
    [ +418 ms] Generating D:\KetulRastogi\Samples\sampleapp\android\app\src\main\java\io\flutter\plugins\GeneratedPluginRegistrant.java
    [ +128 ms] ro.hardware = qcom
    [ +114 ms] Initializing file store
    [ ] Done initializing file store
    [ +12 ms] gen_localizations: Starting due to {InvalidatedReasonKind.inputChanged: The following inputs have updated contents: C:\flutter\packages\flutter_tools\lib\src\build_system\targets\localizations.dart,D:\KetulRastogi\Samples\sampleapp\l10n.yaml,D:\KetulRastogi\Samples\sampleapp\lib/l10n/arb\app_en.arb,D:\KetulRastogi\Samples\sampleapp\lib/l10n/arb\app_es.arb,D:\KetulRastogi\Samples\sampleapp.dart_tool\flutter_gen\gen_l10n\app_localizations_en.dart,D:\KetulRastogi\Samples\sampleapp.dart_tool\flutter_gen\gen_l10n\app_localizations_es.dart,D:\KetulRastogi\Samples\sampleapp.dart_tool\flutter_gen\gen_l10n\app_localizations.dart}
    [ +234 ms] Skipping target: gen_dart_plugin_registrant
    [ +2 ms] gen_localizations: Complete
    [ +5 ms] Skipping target: _composite
    [ +4 ms] complete
    [ +10 ms] Launching lib/main_production.dart on Capture in debug mode...
    [ +12 ms] C:\flutter\bin\cache\dart-sdk\bin\dart.exe --disable-dart-dev C:\flutter\bin\cache\artifacts\engine\windows-x64\frontend_server.dart.snapshot --sdk-root C:\flutter\bin\cache\artifacts\engine\common\flutter_patched_sdk/ --incremental --target=flutter --debugger-module-names --experimental-emit-debug-metadata -Dflutter.inspector.structuredErrors=true -DFLUTTER_WEB_AUTO_DETECT=true --output-dill C:\Users\KETULR~1\AppData\Local\Temp\flutter_tools.94ba1848\flutter_tool.b36a6705\app.dill --packages D:\KetulRastogi\Samples\sampleapp.dart_tool\package_config.json -Ddart.vm.profile=false -Ddart.vm.product=false --enable-asserts --track-widget-creation --filesystem-scheme org-dartlang-root --initialize-from-dill build\4f2a58af27abc49ecf55570043bbf938.cache.dill.track.dill --enable-experiment=alternative-invalidation-strategy
    [ +17 ms] executing: C:\Users\KetulRastogi\AppData\Local\Android\sdk\build-tools\30.0.3\aapt dump xmltree D:\KetulRastogi\Samples\sampleapp\build\app\outputs\flutter-apk\app.apk AndroidManifest.xml
    [ +171 ms] Exit code 0 from: C:\Users\KetulRastogi\AppData\Local\Android\sdk\build-tools\30.0.3\aapt dump xmltree D:\KetulRastogi\Samples\sampleapp\build\app\outputs\flutter-apk\app.apk AndroidManifest.xml
    [ ] N: android=http://schemas.android.com/apk/res/android
    E: manifest (line=2)
    A: android:versionCode(0x0101021b)=(type 0x10)0x1
    A: android:versionName(0x0101021c)="1.0.0" (Raw: "1.0.0")
    A: android:compileSdkVersion(0x01010572)=(type 0x10)0x1e
    A: android:compileSdkVersionCodename(0x01010573)="11" (Raw: "11")
    A: package="com.example.verygoodcore.dev" (Raw: "com.example.verygoodcore.dev")
    A: platformBuildVersionCode=(type 0x10)0x1e
    A: platformBuildVersionName=(type 0x10)0xb
    E: uses-sdk (line=7)
    A: android:minSdkVersion(0x0101020c)=(type 0x10)0x10
    A: android:targetSdkVersion(0x01010270)=(type 0x10)0x1e
    E: uses-permission (line=14)
    A: android:name(0x01010003)="android.permission.INTERNET" (Raw: "android.permission.INTERNET")
    E: application (line=16)
    A: android:label(0x01010001)="Sampleapp" (Raw: "Sampleapp")
    A: android:icon(0x01010002)=@0x7f080000
    A: android:debuggable(0x0101000f)=(type 0x12)0xffffffff
    A: android:appComponentFactory(0x0101057a)="androidx.core.app.CoreComponentFactory" (Raw: "androidx.core.app.CoreComponentFactory")
    E: activity (line=21)
    A: android:theme(0x01010000)=@0x7f0a0000
    A: android:name(0x01010003)="com.example.verygoodcore.MainActivity" (Raw: "com.example.verygoodcore.MainActivity")
    A: android:launchMode(0x0101001d)=(type 0x10)0x1
    A: android:configChanges(0x0101001f)=(type 0x11)0x40003fb4
    A: android:windowSoftInputMode(0x0101022b)=(type 0x11)0x10
    A: android:hardwareAccelerated(0x010102d3)=(type 0x12)0xffffffff
    E: meta-data (line=35)
    A: android:name(0x01010003)="io.flutter.embedding.android.NormalTheme" (Raw: "io.flutter.embedding.android.NormalTheme")
    A: android:resource(0x01010025)=@0x7f0a0001
    E: meta-data (line=45)
    A: android:name(0x01010003)="io.flutter.embedding.android.SplashScreenDrawable" (Raw: "io.flutter.embedding.android.SplashScreenDrawable")
    A: android:resource(0x01010025)=@0x7f040003
    E: intent-filter (line=49)
    E: action (line=50)
    A: android:name(0x01010003)="android.intent.action.MAIN" (Raw: "android.intent.action.MAIN")
    E: category (line=52)
    A: android:name(0x01010003)="android.intent.category.LAUNCHER" (Raw: "android.intent.category.LAUNCHER")
    E: meta-data (line=59)
    A: android:name(0x01010003)="flutterEmbedding" (Raw: "flutterEmbedding")
    A: android:value(0x01010024)=(type 0x10)0x2
    [ +13 ms] executing: C:\Users\KetulRastogi\AppData\Local\Android\sdk\platform-tools\adb.exe -s HS1202017111448 shell -x logcat -v time -t 1
    [ +24 ms] <- compile package:sampleapp/main_production.dart
    [ +238 ms] --------- beginning of main
    09-30 11:55:47.370 D/KeyguardUpdateMonitor( 2030): handleBatteryUpdate
    [ +22 ms] executing: C:\Users\KetulRastogi\AppData\Local\Android\sdk\platform-tools\adb.exe version
    [ +51 ms] Android Debug Bridge version 1.0.41
    Version 30.0.4-6686687
    Installed as C:\Users\KetulRastogi\AppData\Local\Android\sdk\platform-tools\adb.exe
    [ +4 ms] executing: C:\Users\KetulRastogi\AppData\Local\Android\sdk\platform-tools\adb.exe start-server
    [ +108 ms] Building APK
    [ +41 ms] Using gradle from D:\KetulRastogi\Samples\sampleapp\android\gradlew.bat.
    [ +12 ms] executing: C:\Program Files\Android\Android Studio\jre\bin\java -version
    [+2381 ms] Exit code 0 from: C:\Program Files\Android\Android Studio\jre\bin\java -version
    [ ] openjdk version "1.8.0_242-release"
    OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)
    OpenJDK 64-Bit Server VM (build 25.242-b01, mixed mode)
    [ +2 ms] executing: [D:\KetulRastogi\Samples\sampleapp\android/] D:\KetulRastogi\Samples\sampleapp\android\gradlew.bat -Pverbose=true -Ptarget-platform=android-arm64 -Ptarget=D:\KetulRastogi\Samples\sampleapp\lib/main_production.dart -Pdart-defines=Zmx1dHRlci5pbnNwZWN0b3Iuc3RydWN0dXJlZEVycm9ycz10cnVl,RkxVVFRFUl9XRUJfQVVUT19ERVRFQ1Q9dHJ1ZQ== -Pdart-obfuscation=false -Ptrack-widget-creation=true -Ptree-shake-icons=false -Pfilesystem-scheme=org-dartlang-root assembleProductionDebug
    [+3759 ms] > Configure project :app
    [ ] WARNING: DSL element 'useProguard' is obsolete.
    [ ] It will be removed in version 5.0 of the Android Gradle plugin.
    [ ] Use 'android.enableR8' in gradle.properties to switch between R8 and Proguard.
    [+4781 ms] > Task :app:compileFlutterBuildProductionDebug
    [ ] [ +195 ms] executing: [C:\flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%H
    [+1298 ms] [+1294 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
    [ ] [ ] ffb2ecea5223acdd139a5039be2f9c796962833d
    [ ] [ +1 ms] executing: [C:\flutter/] git tag --points-at ffb2ecea5223acdd139a5039be2f9c796962833d
    [ +93 ms] [ +107 ms] Exit code 0 from: git tag --points-at ffb2ecea5223acdd139a5039be2f9c796962833d
    [ ] [ ] 2.5.1
    [ ] [ +17 ms] executing: [C:\flutter/] git rev-parse --abbrev-ref --symbolic @{u}
    [ +110 ms] [ +97 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
    [ ] [ ] origin/stable
    [ ] [ ] executing: [C:\flutter/] git ls-remote --get-url origin
    [ +95 ms] [ +79 ms] Exit code 0 from: git ls-remote --get-url origin
    [ ] [ ] https://github.com/flutter/flutter.git
    [ +203 ms] [ +134 ms] executing: [C:\flutter/] git rev-parse --abbrev-ref HEAD
    [ ] [ +94 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
    [ ] [ ] stable
    [ +191 ms] [ +116 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
    [ ] [ ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
    [ ] [ ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
    [ ] [ ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
    [ ] [ +7 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
    [ ] [ ] Artifact Instance of 'WindowsUwpEngineArtifacts' is not required, skipping update.
    [ ] [ ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
    [ ] [ ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
    [ ] [ ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
    [ ] [ ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
    [ ] [ ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
    [ ] [ ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
    [ +202 ms] [ +249 ms] Artifact Instance of 'MaterialFonts' is not required, skipping update.
    [ ] [ ] Artifact Instance of 'GradleWrapper' is not required, skipping update.
    [ ] [ +9 ms] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
    [ ] [ ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
    [ ] [ ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
    [ ] [ ] Artifact Instance of 'FlutterSdk' is not required, skipping update.
    [ ] [ ] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
    [ ] [ ] Artifact Instance of 'WindowsUwpEngineArtifacts' is not required, skipping update.
    [ ] [ ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
    [ ] [ ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
    [ ] [ ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
    [ ] [ ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
    [ ] [ ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
    [ ] [ ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
    [ ] [ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
    [ ] [ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
    [ ] [ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
    [ ] [ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
    [ ] [ ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
    [ ] [ ] Artifact Instance of 'FontSubsetArtifacts' is not required, skipping update.
    [ ] [ ] Artifact Instance of 'PubDependencies' is not required, skipping update.
    [ +91 ms] [ +107 ms] Initializing file store
    [ +95 ms] [ +50 ms] gen_localizations: Starting due to {}
    [ +300 ms] [ +297 ms] Skipping target: gen_dart_plugin_registrant
    [ ] [ +5 ms] gen_localizations: Complete
    [ ] [ +15 ms] kernel_snapshot: Starting due to {}
    [ ] [ +29 ms] C:\flutter\bin\cache\dart-sdk\bin\dart.exe --disable-dart-dev C:\flutter\bin\cache\artifacts\engine\windows-x64\frontend_server.dart.snapshot --sdk-root C:\flutter\bin\cache\artifacts\engine\common\flutter_patched_sdk/ --target=flutter --no-print-incremental-dependencies -Dflutter.inspector.structuredErrors=true -DFLUTTER_WEB_AUTO_DETECT=true -Ddart.vm.profile=false -Ddart.vm.product=false --enable-asserts --track-widget-creation --no-link-platform --packages D:\KetulRastogi\Samples\sampleapp.dart_tool\package_config.json --output-dill D:\KetulRastogi\Samples\sampleapp.dart_tool\flutter_build\c7f665df265046e023a120a3c3419db5\app.dill --depfile D:\KetulRastogi\Samples\sampleapp.dart_tool\flutter_build\c7f665df265046e023a120a3c3419db5\kernel_snapshot.d package:sampleapp/main_production.dart
    [+25300 ms] [+25298 ms] kernel_snapshot: Complete
    [+1795 ms] [+1738 ms] debug_android_application: Starting due to {}
    [ +507 ms] [ +518 ms] debug_android_application: Complete
    [+1497 ms] [+1544 ms] Persisting file store
    [ +95 ms] [ +19 ms] Done persisting file store
    [ ] [ +24 ms] build succeeded.
    [ ] [ +31 ms] "flutter assemble" took 29,966ms.
    [ +311 ms] [ +260 ms] ensureAnalyticsSent: 254ms
    [ ] [ +2 ms] Running shutdown hooks
    [ ] [ ] Shutdown hooks complete
    [ ] [ ] exiting with code 0
    [ +790 ms] > Task :app:packLibsflutterBuildProductionDebug
    [ ] > Task :app:preBuild UP-TO-DATE
    [ ] > Task :app:preProductionDebugBuild UP-TO-DATE
    [ ] > Task :app:compileProductionDebugAidl NO-SOURCE
    [ ] > Task :app:compileProductionDebugRenderscript NO-SOURCE
    [ +108 ms] > Task :app:generateProductionDebugBuildConfig
    [ +95 ms] > Task :app:checkProductionDebugAarMetadata
    [ ] > Task :app:cleanMergeProductionDebugAssets UP-TO-DATE
    [ ] > Task :app:mergeProductionDebugShaders
    [ ] > Task :app:compileProductionDebugShaders NO-SOURCE
    [ ] > Task :app:generateProductionDebugAssets UP-TO-DATE
    [ ] > Task :app:mergeProductionDebugAssets
    [ +689 ms] > Task :app:copyFlutterAssetsProductionDebug
    [ ] > Task :app:generateProductionDebugResValues
    [ ] > Task :app:generateProductionDebugResources
    [+3705 ms] > Task :app:createProductionDebugCompatibleScreenManifests
    [ ] > Task :app:extractDeepLinksProductionDebug
    [ +107 ms] > Task :app:processProductionDebugMainManifest
    [ ] > Task :app:processProductionDebugManifest
    [ ] > Task :app:mergeProductionDebugNativeDebugMetadata NO-SOURCE
    [ ] > Task :app:javaPreCompileProductionDebug
    [ +284 ms] > Task :app:checkProductionDebugDuplicateClasses
    [ ] > Task :app:processProductionDebugJavaRes NO-SOURCE
    [ ] > Task :app:mergeProductionDebugJniLibFolders
    [ +109 ms] > Task :app:mergeProductionDebugResources
    [ ] > Task :app:validateSigningProductionDebug
    [ ] > Task :app:processProductionDebugManifestForPackage
    [ ] > Task :app:desugarProductionDebugFileDependencies
    [+1292 ms] > Task :app:compressProductionDebugAssets
    [ +510 ms] > Task :app:processProductionDebugResources
    [ ] > Task :app:compileProductionDebugKotlin
    [ +189 ms] > Task :app:compileProductionDebugJavaWithJavac
    [ ] > Task :app:compileProductionDebugSources
    [ +302 ms] > Task :app:dexBuilderProductionDebug
    [ +899 ms] > Task :app:mergeExtDexProductionDebug
    [ +493 ms] > Task :app:mergeProductionDebugJavaResource
    [ +300 ms] > Task :app:mergeDexProductionDebug
    [+2202 ms] > Task :app:mergeProductionDebugNativeLibs
    [ +600 ms] > Task :app:stripProductionDebugDebugSymbols
    [ ] Unable to strip the following libraries, packaging them as they are: libflutter.so.
    [+3906 ms] > Task :app:packageProductionDebug
    [ +393 ms] > Task :app:assembleProductionDebug
    [ +96 ms] Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
    [ ] Use '--warning-mode all' to show the individual deprecation warnings.
    [ ] See https://docs.gradle.org/6.7/userguide/command_line_interface.html#sec:command_line_warnings
    [ ] BUILD SUCCESSFUL in 57s
    [ +1 ms] 32 actionable tasks: 31 executed, 1 up-to-date
    [+1199 ms] calculateSha: LocalDirectory: 'D:\KetulRastogi\Samples\sampleapp\build\app\outputs\flutter-apk'/app.apk
    [+1669 ms] โœ“ Built build\app\outputs\flutter-apk\app-production-debug.apk.
    [ +21 ms] executing: C:\Users\KetulRastogi\AppData\Local\Android\sdk\build-tools\30.0.3\aapt dump xmltree D:\KetulRastogi\Samples\sampleapp\build\app\outputs\flutter-apk\app.apk AndroidManifest.xml
    [ +246 ms] Exit code 0 from: C:\Users\KetulRastogi\AppData\Local\Android\sdk\build-tools\30.0.3\aapt dump xmltree D:\KetulRastogi\Samples\sampleapp\build\app\outputs\flutter-apk\app.apk AndroidManifest.xml
    [ ] N: android=http://schemas.android.com/apk/res/android
    E: manifest (line=2)
    A: android:versionCode(0x0101021b)=(type 0x10)0x1
    A: android:versionName(0x0101021c)="1.0.0" (Raw: "1.0.0")
    A: android:compileSdkVersion(0x01010572)=(type 0x10)0x1e
    A: android:compileSdkVersionCodename(0x01010573)="11" (Raw: "11")
    A: package="com.example.verygoodcore" (Raw: "com.example.verygoodcore")
    A: platformBuildVersionCode=(type 0x10)0x1e
    A: platformBuildVersionName=(type 0x10)0xb
    E: uses-sdk (line=7)
    A: android:minSdkVersion(0x0101020c)=(type 0x10)0x10
    A: android:targetSdkVersion(0x01010270)=(type 0x10)0x1e
    E: uses-permission (line=14)
    A: android:name(0x01010003)="android.permission.INTERNET" (Raw: "android.permission.INTERNET")
    E: application (line=16)
    A: android:label(0x01010001)="Sampleapp" (Raw: "Sampleapp")
    A: android:icon(0x01010002)=@0x7f080000
    A: android:debuggable(0x0101000f)=(type 0x12)0xffffffff
    A: android:appComponentFactory(0x0101057a)="androidx.core.app.CoreComponentFactory" (Raw: "androidx.core.app.CoreComponentFactory")
    E: activity (line=21)
    A: android:theme(0x01010000)=@0x7f0a0000
    A: android:name(0x01010003)="com.example.verygoodcore.MainActivity" (Raw: "com.example.verygoodcore.MainActivity")
    A: android:launchMode(0x0101001d)=(type 0x10)0x1
    A: android:configChanges(0x0101001f)=(type 0x11)0x40003fb4
    A: android:windowSoftInputMode(0x0101022b)=(type 0x11)0x10
    A: android:hardwareAccelerated(0x010102d3)=(type 0x12)0xffffffff
    E: meta-data (line=35)
    A: android:name(0x01010003)="io.flutter.embedding.android.NormalTheme" (Raw: "io.flutter.embedding.android.NormalTheme")
    A: android:resource(0x01010025)=@0x7f0a0001
    E: meta-data (line=45)
    A: android:name(0x01010003)="io.flutter.embedding.android.SplashScreenDrawable" (Raw: "io.flutter.embedding.android.SplashScreenDrawable")
    A: android:resource(0x01010025)=@0x7f040003
    E: intent-filter (line=49)
    E: action (line=50)
    A: android:name(0x01010003)="android.intent.action.MAIN" (Raw: "android.intent.action.MAIN")
    E: category (line=52)
    A: android:name(0x01010003)="android.intent.category.LAUNCHER" (Raw: "android.intent.category.LAUNCHER")
    E: meta-data (line=59)
    A: android:name(0x01010003)="flutterEmbedding" (Raw: "flutterEmbedding")
    A: android:value(0x01010024)=(type 0x10)0x2
    [ +1 ms] Stopping app 'app.apk' on Capture.
    [ ] executing: C:\Users\KetulRastogi\AppData\Local\Android\sdk\platform-tools\adb.exe -s HS1202017111448 shell am force-stop com.example.verygoodcore
    [ +127 ms] executing: C:\Users\KetulRastogi\AppData\Local\Android\sdk\platform-tools\adb.exe -s HS1202017111448 shell pm list packages com.example.verygoodcore
    [ +954 ms] package:com.example.verygoodcore
    package:com.example.verygoodcore.dev
    [ +2 ms] executing: C:\Users\KetulRastogi\AppData\Local\Android\sdk\platform-tools\adb.exe -s HS1202017111448 shell cat /data/local/tmp/sky.com.example.verygoodcore.sha1
    [ +80 ms] 75d512dfc08711a79c2eb218acf30f14f14dd96d
    [ +1 ms] Installing APK.
    [ +2 ms] executing: C:\Users\KetulRastogi\AppData\Local\Android\sdk\platform-tools\adb.exe -s HS1202017111448 install -t -r D:\KetulRastogi\Samples\sampleapp\build\app\outputs\flutter-apk\app.apk
    [+12953 ms] Performing Streamed Install
    Success
    [ +3 ms] executing: C:\Users\KetulRastogi\AppData\Local\Android\sdk\platform-tools\adb.exe -s HS1202017111448 shell echo -n 4eca204772fe8a0c32a45ed47b097aaa5932e773 > /data/local/tmp/sky.com.example.verygoodcore.sha1
    [ +73 ms] executing: C:\Users\KetulRastogi\AppData\Local\Android\sdk\platform-tools\adb.exe -s HS1202017111448 shell -x logcat -v time -t 1
    [ +337 ms] --------- beginning of main
    09-30 11:57:05.660 I/zygote64(27269): The ClassLoaderContext is a special shared library.
    [ +18 ms] executing: C:\Users\KetulRastogi\AppData\Local\Android\sdk\platform-tools\adb.exe -s HS1202017111448 shell am start -a android.intent.action.RUN -f 0x20000000 --ez enable-background-compilation true --ez enable-dart-profiling true --ez enable-checked-mode true --ez verify-entry-points true --ez start-paused true com.example.verygoodcore/com.example.verygoodcore.MainActivity
    [ +217 ms] Starting: Intent { act=android.intent.action.RUN flg=0x20000000 cmp=com.example.verygoodcore/.MainActivity (has extras) }
    [ ] Waiting for observatory port to be available...
    [ +236 ms] E/AndroidRuntime(27337): FATAL EXCEPTION: main
    [ ] E/AndroidRuntime(27337): Process: com.example.verygoodcore, PID: 27337
    [ ] E/AndroidRuntime(27337): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.example.verygoodcore/com.example.verygoodcore.MainActivity}: java.lang.ClassNotFoundException: Didn't find class "com.example.verygoodcore.MainActivity" on path: DexPathList[[zip file "/data/app/com.example.verygoodcore-zlP3FKLF-ydFu_R3b3uM3w==/base.apk"],nativeLibraryDirectories=[/data/app/com.example.verygoodcore-zlP3FKLF-ydFu_R3b3uM3w==/lib/arm64, /data/app/com.example.verygoodcore-zlP3FKLF-ydFu_R3b3uM3w==/base.apk!/lib/arm64-v8a, /system/lib64, /system/vendor/lib64]]
    [ ] E/AndroidRuntime(27337): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2679)
    [ ] E/AndroidRuntime(27337): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2856)
    [ ] E/AndroidRuntime(27337): at android.app.ActivityThread.-wrap11(Unknown Source:0)
    [ ] E/AndroidRuntime(27337): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589)
    [ ] E/AndroidRuntime(27337): at android.os.Handler.dispatchMessage(Handler.java:106)
    [ ] E/AndroidRuntime(27337): at android.os.Looper.loop(Looper.java:164)
    [ ] E/AndroidRuntime(27337): at android.app.ActivityThread.main(ActivityThread.java:6501)
    [ ] E/AndroidRuntime(27337): at java.lang.reflect.Method.invoke(Native Method)
    [ ] E/AndroidRuntime(27337): at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
    [ ] E/AndroidRuntime(27337): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)
    [ ] E/AndroidRuntime(27337): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.example.verygoodcore.MainActivity" on path: DexPathList[[zip file "/data/app/com.example.verygoodcore-zlP3FKLF-ydFu_R3b3uM3w==/base.apk"],nativeLibraryDirectories=[/data/app/com.example.verygoodcore-zlP3FKLF-ydFu_R3b3uM3w==/lib/arm64, /data/app/com.example.verygoodcore-zlP3FKLF-ydFu_R3b3uM3w==/base.apk!/lib/arm64-v8a, /system/lib64, /system/vendor/lib64]]
    [ ] E/AndroidRuntime(27337): at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:125)
    [ ] E/AndroidRuntime(27337): at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
    [ ] E/AndroidRuntime(27337): at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
    [ ] E/AndroidRuntime(27337): at android.app.Instrumentation.newActivity(Instrumentation.java:1175)
    [ ] E/AndroidRuntime(27337): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2669)
    [ ] E/AndroidRuntime(27337): ... 9 more
    Exited (1)

I am not able to run the app. Please help me to fix this.

Thanks
Ketul

fix: runs command twice in windows

Description
very_good command is run twice in windows.

Steps To Reproduce

  1. Go to terminal and push very_good

Expected Behavior
It is expected for the command to run only once.

Screenshots
image

Additional Context
Maybe this is the error with dart itself, I found the same issue with fvm too.
You can see the dart issue here.

fix: Package directive doesn't match file location

Description
Android Studio gives a warning about omitted root packages in Kotlin. I guess this is not really a bug (feel free to close it), more a question on my part: was this a conscious design decision to leave out the root packages (com.example.foo) in the directory structure?

Steps To Reproduce

  1. very_good create --org-name com.example --template flutter_plugin foo
  2. Open directory foo/foo_android/android in Android studio
  3. Open source file src/main/kotlin/foo/FooPlugin.kt
  4. Inspection for package declaration package com.example.foo says "Package directive doesn't match file location"

Flutter Awesome

Hi

It would be Very Good to have a new section on Awesome Flutter !!!

OK ?

fix: Android Studio IDE run button not working ( getting gradle exception)

Description
The following is the error log, When i run on Android studio IDE run button.
Screenshot from 2021-03-02 21-05-48

Steps To Reproduce

  1. run command: very_good create my_app
  2. open project in android studio
  3. select staging ( run configuration)
  4. click on install button ( Green color run button)
  5. Seeing error as above screenshot

Expected Behavior
after tap on android studio run button, android app should be build and install into any available or target device/simulator.

My workaround notes
1.app is build success and installed into target device when i used command in teriminal
command : flutter run --flavor staging --target lib/main_staging.dart

  1. i have made below change ( added flavor argument in IDE run configuration as below ) and working as expected
    only diff is line number 3 added.
    Screenshot from 2021-03-02 21-18-22

feat: Install Dependencies Automatically

Description
(More like an improvement than a bug) Creating a new project is not running flutter pub get to install dependencies automatically.

Steps To Reproduce

  1. Create a new project: very_good create hello
  2. Open with vscode
  3. Need to run flutter pub get manually

Expected Behavior
When creating the project, automatically install the dependencies from pubspec.yaml

Additional Context
Only want to say, awesome work! thanks for sharing with the community this powerful CLI.

feat: Support plain dart package generation

Description
I was thinking it would be nice to be able to generate an opinionated Dart package starter project that's already hooked up to use very_good_analysis, mocktail, test_coverage and/or anything else that would be helpful to use by default.

For reference, this is the usual Dart command which generates a new Dart package:

dart create --template package-simple my_package

I realized I would be repeating the same steps as the package creation steps here for every Dart package I wanted to make, hence this suggestion.

fix: plugin template generation

Description
Plugin template is crashing and generates Android plugin with embedding < 2.0.

ascenio@arch> very_good create my_plugin -t flutter_plugin
Can't load Kernel binary: Invalid kernel binary format version.
Unhandled exception:
ProcessException: Standard out
Waiting for another flutter command to release the startup lock...
Running "flutter pub get" in my_plugin_android...                2.700ms
โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”
Warning
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
Your Flutter application is created using an older version of the Android
embedding. It's being deprecated in favor of Android embedding v2. Follow the
steps at

https://flutter.dev/go/android-project-migration

to migrate your project.
โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”
Standard error
The plugin `my_plugin_android` doesn't have a main class defined in /tmp/tmp.bkOZZqLVdS/my_plugin/my_plugin_android/android/src/main/java/com/example/verygoodcore/my_plugin/MyPluginAndroidPlatform.java or /tmp/tmp.bkOZZqLVdS/my_plugin/my_plugin_android/android/src/main/kotlin/com/example/verygoodcore/my_plugin/MyPluginAndroidPlatform.kt. This is likely to due to an incorrect `androidPackage: com.example.verygoodcore.my_plugin` or `mainClass` entry in the plugin's pubspec.yaml.
If you are the author of this plugin, fix the `androidPackage` entry or move the main class to any of locations used above. Otherwise, please contact the author of this plugin and consider using a different plugin in the meanwhile.
  Command: flutter packages get
#0      _Cmd._throwIfProcessFailed (package:very_good_cli/src/flutter_cli.dart:119:7)
#1      _Cmd.run (package:very_good_cli/src/flutter_cli.dart:98:7)
<asynchronous suspension>
#2      Future.wait.<anonymous closure> (dart:async/future.dart)
<asynchronous suspension>
#3      Flutter._installPackages (package:very_good_cli/src/flutter_cli.dart:73:5)
<asynchronous suspension>
#4      Flutter.packagesGet (package:very_good_cli/src/flutter_cli.dart:15:5)
<asynchronous suspension>
#5      FlutterPluginTemplate.onGenerateComplete (package:very_good_cli/src/templates/template.dart:117:7)
<asynchronous suspension>
#6      CreateCommand.run (package:very_good_cli/src/commands/create.dart:119:5)
<asynchronous suspension>
#7      CommandRunner.runCommand (package:args/command_runner.dart:209:13)
<asynchronous suspension>
#8      VeryGoodCommandRunner.run (package:very_good_cli/src/command_runner.dart:69:14)
<asynchronous suspension>
#9      main (file:///home/ascenio/.pub-cache/hosted/pub.dartlang.org/very_good_cli-0.4.2/bin/very_good.dart:5:24)
<asynchronous suspension>

Steps To Reproduce

  1. Generate a plugin with very_good create my_plugin -t flutter_plugin

Expected Behavior
The cli should generate a plugin compatible with Android embedding 2.0 and without crashing.

Additional Context
I'm using the cli from a temporary folder, that's why you see /tmp/tmp.bkOZZqLVdS/ in the logs. No need to be scared about that xD.

fix: update min Dart SDK version

Description

When creating a new project of type dart_pkg, the pubspec.yaml includes the following environment setup:

environment:
  sdk: ">=2.12.0 <3.0.0"

Seems like something trivial, but it is sometimes annoying to update nested packages after their creation.

Steps To Reproduce

  1. Run very_good create --project-name my_pkg --org-name com.my.org -t dart_pkg ./my_pkg.
  2. Go to ./my_pkg/pubspec.yaml.
  3. See the environment config field.

Expected Behavior

The expected min Dart SDK is expected to be 2.13.0 as follows:

environment:
  sdk: ">=2.13.0 <3.0.0"

Additional Context

CLI version: very_good_cli 0.3.2

docs: available commands are unclear

I come across this cli and tried to read it but didn't get too much info, then I ignored it and few days later I got this from get, all the commands where listed in read me and clear then thought to ask you if you can list most of the commands like get or it is different.
thanks.

sorry I just got bug template.

fix: zsh: command not found: very_good

Description
I have zsh installed in my terminal. I installed very_good and after that when I run very_good create xxxx, I get the follwoing error
zsh: command not found: very_good

Expected Behavior
Should run with out error or provide steps on how to fix

Bug: Missing Simulators in Xcode

Description
No Simulators are showing in Xcode 13.1.
They do show in a new "flutter create" project, but not with "very_good create"

Steps To Reproduce

  1. Open terminal,
  2. enter very_good create appname
  3. Run any of the configurations in vscode.
  4. Open .xcworkspace in xcode.
  5. No simulators are showing.

Expected Behavior
A list of available Simulators.

Screenshots
Screenshot 2021-11-22 at 22 31 56

Additional Context
very_good --version
0.4.10
flutter --version

Flutter 2.5.1 โ€ข channel stable โ€ข https://github.com/flutter/flutter.git
Framework โ€ข revision ffb2ecea52 (9 weeks ago) โ€ข 2021-09-17 15:26:33 -0400
Engine โ€ข revision b3af521a05
Tools โ€ข Dart 2.14.2

Mac M1 12.0.1 Monterey

fix: Could not resolve all artifacts for configuration ':app:productionReleaseRuntimeClasspath'

Description
Hello fellow devs, thank you for putting this tool together. It helped me get started on my current client project. However I'm getting the following error when building this project:

Note: /Users/joppong/tools/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_secure_storage-4.0.0/android/src/main/java/com/it_nomads/fluttersecurestorage/FlutterSecureStoragePlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.                    
Note: /Users/joppong/tools/flutter/.pub-cache/hosted/pub.dartlang.org/local_auth-1.1.0/android/src/main/java/io/flutter/plugins/localauth/LocalAuthPlugin.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.                    
                                                                        
FAILURE: Build failed with an exception.                                
                                                                        
* What went wrong:                                                      
Execution failed for task ':app:lintVitalDevelopmentRelease'.           
> Could not resolve all artifacts for configuration ':app:productionReleaseRuntimeClasspath'.
   > Failed to transform libs.jar to match attributes {artifactType=processed-jar, org.gradle.libraryelements=jar, org.gradle.usage=java-runtime}.
      > Execution failed for JetifyTransform: /Users/joppong/Projects/clients/sumgroup_app/packages/sumgroup_flutter/build/app/intermediates/flutter/productionRelease/libs.jar.
         > Transform's input file does not exist: /Users/joppong/Projects/clients/sumgroup_app/packages/sumgroup_flutter/build/app/intermediates/flutter/productionRelease/libs.jar. (See https://issuetracker.google.com/issues/158753935)
                                                                        
* Try:                                                                  
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
                                                                        
* Get more help at https://help.gradle.org                              
                                                                        
BUILD FAILED in 34s                                                     
Running Gradle task 'assembleRelease'...                                
Running Gradle task 'assembleRelease'... Done                      35.1s
Gradle task assembleRelease failed with exit code 1

Steps To Reproduce

  1. Run the command flutter build apk --target lib/main_production.dart
  2. See error

Expected Behavior
The build should be successful.

Additional Context
I noticed the warnings with flutter_secure_storage and local_auth so I went ahead and bootstrapped a flutter create . project with both packages. Running the flutter build command still displays the warning but then the build passes.

fix: AppBlocObserver has an error on onError method

Description
When upgrading the dependencies of bloc, and flutter_bloc, an error will occur on AppBlocObserver Line 20.

'AppBlocObserver.onError' ('void Function(Bloc<dynamic, dynamic>, Object, StackTrace)') isn't a valid override of 'BlocObserver.onError' ('void Function(BlocBase<dynamic>, Object, StackTrace)') .dart(invalid_override)

Steps To Reproduce

  1. Create project using very_good cli 0.1.5
  2. Update bloc: ^7.0.0-nullsafety.3 to bloc: ^7.0.0, and flutter_bloc: ^7.0.0-nullsafety.5 to flutter_bloc: ^7.0.0
  3. Run flutter pub get
  4. See error

Expected Behavior
No errors

Screenshots
Screen Shot 2021-03-18 at 8 58 41 PM

fix:

Description

  1. I used VeryGoodCli to create flutter app
  2. I connected the app with the firestore
  3. added the necessary dependencies

it works in production as the app-id or package name is same as in firestore

however, when running the main_development or main_staging, the following error occurs:

Launching lib\main_staging.dart on sdk gphone x86 in debug mode...
**_Running Gradle task 'assembleStagingDebug'...

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':app:processStagingDebugGoogleServices'.

No matching client found for package name 'com.techsolo.partydecoclient.stg'_**

same is the error when using the development except 'com.techsolo.partydecoclient.dev

This means that we have to create three apps with the package names .dev, .stg and the final one without any dot
OR
change the google.jason file and as long as we are doing the development we add .dev in the end of the app-id (i have not tried and i don't think this will work since the id on firestore is unique)

feat: Add support for fvm

Is your feature request related to a problem? Please describe.
When I have been creating projects I have been using fvm to keep the flutter version set on a project level rather than on an environment level

Describe the solution you'd like
I was thinking of adding a flag to support the version of flutter you require on the project. This would then create the required .fvm folder with the required version. e.g.,
very_good create my_app --fvm stable
very_good create my_app --fvm 2.0.1

it could also check if fvm is installed or check that the version specified is installed and install it.

Describe alternatives you've considered
The alternative is to manually do this step

Additional context
This may have been something already considered and not appropriate for this tool. i.e., not wanting to take a dependency on fvm. Or not within the scope of this CLI tool - setting up the environment.

This will have a knock-on effect on the other package dependencies, so maybe too much as we will always have the latest Flutter version. In which case it could just set up the fvm folder for the support version of flutter of the bloc version. Sorry that may have sounded more complicated

build: Update bundle with newest gradle plugin version

Description
The gradle version might be pumped to meet the current base Flutter project setup.

Steps To Reproduce

  1. Go to your_project\android\build.gradle
  2. See buildscript.dependencies and you will find that the current plugin version is 3.6.3.

Expected Behavior
At the moment, the flutter create command already sets the plugin version to 4.1.0.
No huge impact on builds but just for the sake of consistency.

Screenshots
image

Additional Context
very_good version: 0.1.7

Flutter 2.0.3 โ€ข channel stable โ€ข https://github.com/flutter/flutter.git
Framework โ€ข revision 4d7946a68d (3 weeks ago) โ€ข 2021-03-18 17:24:33 -0700
Engine โ€ข revision 3459eb2436
Tools โ€ข Dart 2.12.2

feat: Make `very_good packages get` recursive by default

I think running very_good packages get should be recursive by default, since we could just run flutter pub get or dart pub get if we wanted to get the packages for the project in the current directory.

Even shortening the command would be welcome, if possible: very_good get

how to build apk

how to build apk that create by this verygoodcli..?
can i build apk without keystore..?

very_good command not work

Successfully install

PS C:\Users\lkrja\AndroidStudioProjects> dart pub global activate very_good_cli
Package very_good_cli is currently active at version 0.3.0.
Resolving dependencies...
The package very_good_cli is already activated at newest available version.
To recompile executables, first run `global decativate very_good_cli`.
Installed executable very_good.
Warning: Pub installs executables into C:\Users\lkrja\AppData\Local\Pub\Cache\bin, which is not on your path.
You can fix that by adding that directory to your system's "Path" environment variable.
A web search for "configure windows path" will show you how.
Activated very_good_cli 0.3.0.

Show error

PS C:\Users\lkrja\AndroidStudioProjects> very_good
very_good : The term 'very_good' is not recognized as the name of a cmdlet, function, script file, or operable
program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ very_good
+ ~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (very_good:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

PS C:\Users\lkrja\AndroidStudioProjects>

Flutter doctor

Doctor summary (to see all details, run flutter doctor -v):
[โœ“] Flutter (Channel stable, 2.2.2, on Microsoft Windows [Version 10.0.22000.71], locale en-IN)
[โœ“] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
[โœ“] Chrome - develop for the web
[โœ“] Visual Studio - develop for Windows (Visual Studio Community 2019 16.9.3)
[โœ“] Android Studio (version 4.1.0)
[โœ“] VS Code (version 1.58.2)
[โœ“] Connected device (3 available)

โ€ข No issues found!

request: Flutter_Riverpod integration

Description
Is there anyway to use the great Very Good CLI to create a project using Riverpod?

Expected Behavior
Structure created with riverpod.

feat: Add flavor app name to Android

Description
As a developer, I would like to have specific app names according to my app's flavors.

With the current generated files, we are able to manually update the iOS FLAVOR_APP_NAME from within project.pbxproj.
This works very well!

For Android it takes a bit more work to set up that I think we could include in the template.

Proposed Changes
Update AndroidManifest.xml to include:

application android:label="@string/flavor_app_name"

Update app/build.gradle to include:

productFlavors {
    production {
        ...
        resValue "string", "flavor_app_name", "APP_NAME"
    }
    staging {
        ...
        resValue "string", "flavor_app_name", "APP_NAME"
    }
    development {
        ...
        resValue "string", "flavor_app_name", "APP_NAME"
    }
}

Additional Context
This prepares the project to go update the flavor names manually according to its flavor. It may be beneficial to append Dev & Stg to the flavor names by default.

feat: overwrite and keep existing file support

After running very_good create . I notice my pubspec has been deleted and replaced with a new one from the generator. For my other files, it just updated the file by adding its codes, so I guess this is an issue that needs to be fix

fix: Flags for desktop support are not working.

Description
Flags for desktop support are not working.

Steps To Reproduce

> very_good --version                                                                                                                                                         
0.4.11

I ran

very_good create --project-name=very_good_test --org-name=co.test --desc "Working to figure out everything involved in the very_good template" --android true --ios true --web true --macos true very_good_test

and Android, iOS, and Web were created but Macos, Windows and Linux were not. I had to subsequently run

flutter config --enable-macos-desktop

to get macos. Similarly,

very_good create --project-name=very_good_test --org-name=co.test --desc "Working to figure out everything involved in the very_good template" very_good_test2

did not give desktop support either.

Expected Behavior
All of the platforms should be created by default.

feat: Suggestion to add flag to generate firebase setup for each flavor

Description
Based on my own projects it is often required to add firebase to a project. I often faced the issue that this can become quite complex when running different environments based on flavors. That is why it could be a nice addition to add this as a feature.

What do you think about it? If so I would take a look at it as soon as I find some free time.

fix: Creating a project named "test" breaks bloc dependencies

Description
Creating a project with the package name "test":

C:\Users\Sonny>very_good create test

breaks the flutter pub get command and exits the command in an error state.

Steps To Reproduce

  1. Install very_good_cli.
  2. Run very_good create test.
  3. See error.

Expected Behavior
The program should print the following warning:

"test" is not a valid package name.

See https://dart.dev/tools/pub/pubspec#name for more information.

๐Ÿฆ„ A Very Good Command Line Interface

Usage: very_good <command> [arguments]

Global options:
-h, --help           Print this usage information.
    --version        Print the current version.
    --analytics      Toggle anonymous usage statistics.

          [false]    Disable anonymous usage statistics
          [true]     Enable anonymous usage statistics

Available commands:
  create   very_good create <output directory>
           Creates a new very good project in the specified directory.

Run "very_good help <command>" for more information about a command.

Screenshots
ApplicationFrameHost_WKrppZuVHp

Additional Context
Tried also on WSL(Windows Subsystem for Linux) and got the same results.

feat: elaborate on build flavors and different main.dart entry points

Description
As a developer, I want to have a clear explanation and ideally an example of how the different main.dart entry points can be used.

  • Improve documentation to explain the role of the different main.dart files
  • Integrate a real-world flavor-specific dependency to illustrate how this would look in practice

feat : Add new build app type

Description
As a developer, I would like to have specific app build / release type like android, web, or linux / windows with each flavor type

It is possible, sir ??

Proposed Changes
New CLI like this

# Build application type
very_good build --release-type --flavor-name

fix: Federated plugin: inter-package-dependencies should be version-based

Description
As I understand it, the main advantage of the federated plugin structure is uncoupling of packages so they can be spread across different repositories and maintained independently. They must also be published as separate plugins. This does not seem possible with the generated project because the packages are linked via file system.

Again, if this is the intended design, feel free to close this (I'm just learning Flutter).

Steps To Reproduce

  1. very_good create --org-name com.example --template flutter_plugin foo
  2. File foo/foo_android/pubspec.yaml contains:
dependencies:
  foo_platform_interface:
    path: ../foo_platform_interface

Expected Behavior

dependencies:
  foo_platform_interface: ^0.0.1

fix: AppLocalizations errors on pubspec update

Description
Every time I update a pubspec.yaml file, everything connected with AppLocalizations throws errors and the only solution to fix it is to restart IDE.

Steps To Reproduce

  1. Go to 'pubspec.yaml'
  2. Add dependency
  3. Save the file
  4. See error everywhere

Screenshots
Screenshot from 2021-06-03 10-15-32

Additional Context
Ubuntu 20.4 / Flutter 2.2.1

Unable to execute the newly created project using vgv_cli.

Description
I was able to successfully create a project using vgv cli. After opening the created project in Vs Code, I get 216 errors.

Steps To Reproduce

  1. Create a project using cli
  2. open it in vs code

Expected Behavior
The expected behaviour is to get an executable project without any errors and in an executable condition.

Screenshots
Error1
Error2
Error3
Error4

Additional Context
When I tried to run the pug upgrade command, I get the following message

[my_first_project_using_vgv_cli] flutter pub upgrade
Running "flutter pub upgrade" in my_first_project_using_vgv_cli...     
The current Dart SDK version is 2.10.5.



Because my_first_project_using_vgv_cli requires SDK version >=2.12.0-0 <3.0.0, version solving failed.
pub upgrade failed (1; Because my_first_project_using_vgv_cli requires SDK version >=2.12.0-0 <3.0.0, version solving failed.)
exit code 1

My Flutter Doctor is:

Doctor summary (to see all details, run flutter doctor -v):

[โœ“] Flutter (Channel stable, 1.22.6, on Mac OS X 10.15.7 19H2 darwin-x64, locale en-IN)
 
[โœ“] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[โœ“] Xcode - develop for iOS and macOS (Xcode 12.3)
[!] Android Studio (version 4.1)
    โœ— Flutter plugin not installed; this adds Flutter specific functionality.
    โœ— Dart plugin not installed; this adds Dart specific functionality.
[โœ“] VS Code (version 1.53.2)
[โœ“] Connected device (2 available)

! Doctor found issues in 1 category.

Please let me know what I'm missing here.

very_good command fail to run

I'm on Ubuntu 20.04.

When I run very_good from terminal I get:
/home/michal/.pub-cache/bin/very_good: 8: dart: not found

But if I run:
dart "/home/michal/.pub-cache/global_packages/very_good_cli/bin/very_good.dart-2.13.0-30.0.dev.snapshot"
I get proper output about using A Very Good Command Line Interface

Not sure what I'm doing wrong.

feat: expose command to install dependencies with recursive support

Description
As a developer, I want to be able to install dependencies for all packages within my current project. The command should ideally automatically determine whether to run flutter packages get or flutter pub get depending on the type of package and should be capable of recursively running the install command for each nested package.

Proposed Usage

# Install dependencies for the current package via `flutter packages get` or `flutter pub get`
very_good packages get

# Install dependencies recursively via `flutter packages get` or `flutter pub get`
very_good packages get --recursive
very_good packages get -r

Additional Context
very_good_cli already contains the functionality as part of

static Future<void> packagesGet({
and addressing this issue would require exposing that functionality via a new command.

Related Issue on Flutter: flutter/flutter#89180

very_good: command not found

Anyone knows why I'm having very_good: command not found even tho dart pub global activate very_good_cli returns a positive message?

Package very_good_cli is currently active at version 0.2.1.
Resolving dependencies... (1.4s)
The package very_good_cli is already activated at newest available version.
To recompile executables, first run `global decativate very_good_cli`.
Installed executable very_good.

OS: Ubuntu 20.4

Exception is thrown when the analytics option was opted out

Description
An exception is thrown when I opted for no analytics

Steps To Reproduce

  1. Go to Terminal
  2. Enter very_good --analytics
  3. Getting the below exception
Missing argument for "analytics".
#0      CommandRunner.usageException (package:args/command_runner.dart:95:7)
#1      CommandRunner.parse (package:args/command_runner.dart:123:35)
#2      VeryGoodCommandRunner.run (package:very_good_cli/src/command_runner.dart:63:27)
#3      main (file:///Users/xxxxxxxxxx/.pub-cache/hosted/pub.dartlang.org/very_good_cli-0.1.1/bin/very_good.dart:5:54)
#4      _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:299:32)
#5      _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:168:12)

Expected Behavior
In my opinion, instead of an exception message, a plain text saying "You have not opted for analytics. To enable it do xxx things"

Screenshots
Exception_on_no_analytics

Additional Context
I have just shared my opinion. If this is the expected message, please close this ticket.

How to generate a project with custom template?

I'm trying to generate a project with my own custom template using very_good create sample_ppp -t template command but it's always showing me is not an allowed value for option "template". error.

I tried to run very_good help -t to know more about the template commant but it's always showing me Could not find an option or flag "-t". error.

Also I tried to check on your website and github but I found nothing regarding the template command and how to use it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.