license_generator

Last updated:

0 purchases

license_generator Image
license_generator Images
Add to Cart

Description:

license generator

flutter license_generator #
A dart package to download the licenses for al the packages used.



Setup #
Add dependency to pubspec #

dev-dependencies:
license_generator: <latest-version>
copied to clipboard
Basic options #
license_generator:
fail_fast: true/false #(optional) Errors are not ignored and the generator will fail with an error
copied to clipboard
All options #
license_generator:
fail_fast: boolean #(optional) if true the `check` command will fail at the first version missmatch. If false you will receive a list at the end of the command. -> Default: false
check_before_generate: boolean #(optional) If true the `generate` command will check if your pubspec.yaml & pubspec.lock are in sync before generating the code -> Default: false
output_path: String #(optional) Override the default output path to generate the license file somewhere else -> Default: lib/util/license.dart
download_pub_dev_details: bool #(optional) If ture the `generate` command will download the pubdev details (homepage/repository) -> Default: false
pub_dev_base_url: String #(optional) This will override the default pubdev base url for downloading the pubdev details (homepage/repository) -> Default: https://pub.dev
licenses: #(optional) This will accept key value pairs (String/String) -> (package name/raw license url)
#license_generator: https://raw.githubusercontent.com/icapps/flutter-icapps-license/master/LICENSE (example)
extra_licenses: #(optional) this will allow you to add extra licenses that are not added in your pubspec.yaml
something_something: #the name of your package will be used if `name` is not specified
name: String #(optional) This will override your package name
version: String #(optional) The version of this specific package/license
homepage: String #(optional) The url of the homepage of this package
repository: String #(optional) The url where the repository is located
license: String #(required) This can be an http/https url or a path to a specific file. The content of that url/path will be used to generate code.
dev_dependency: boolean #(optional) This is used internally
part_of_flutter_sdk: boolean #(optional) This will use the flutter license instead of the license specified in this map
copied to clipboard
Run package with Flutter #
flutter packages pub run license_generator
copied to clipboard
Run package with Dart #
Check if all versions in your pubspec.yaml match your pubspec.lock #
pub run license_generator check
copied to clipboard
Generate the license file
pub run license_generator generate
copied to clipboard
Logs #
Info is the default and is not required to pass.
pub run license_generator generate

is the same as

pub run license_generator generate info
copied to clipboard
Debug will log more info te find out why the license_generator is failing. Stacktraces & errors will be shown. Info logs will also be shown.
pub run license_generator generate debug
copied to clipboard
Verbose will log everything. Downloading files & their status. Debug & info will also be shown.
pub run license_generator generate verbose
copied to clipboard
Working on mac? #
add this to you .bash_profile
flutterlicensecheck(){
flutter packages get && flutter packages pub run license_generator check
}
copied to clipboard
flutterlicense(){
flutter packages get && flutter packages pub run license_generator generate
}
copied to clipboard
now you can use the license_generate with a single command.
flutterlicense
copied to clipboard
And to check if everything is up to date use:
flutterlicensecheck
copied to clipboard

License:

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files In This Product:

Customer Reviews

There are no reviews.