build_version 2.0.0

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • 70

Pub Build Status

Include the version of your package in our source code.

  1. Add build_version to pubspec.yaml. Also make sure there is a version field.

     name: my_pkg
     version: 1.2.3
     dev_dependencies:
       build_runner: ^1.0.0
       build_version: ^2.0.0
    
  2. Run a build.

     > pub run build_runner build
    

    lib/src/version.dart will be generated with content:

     // Generated code. Do not modify.
     const packageVersion = '1.2.3';
    

2.0.0 #

  • The builder now runs when build_version is a dependency. build.yaml changes are no longer required.

1.0.1 #

  • Support package:build_runner v1.0.0.

1.0.0 #

  • Initial version, created by Stagehand

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:


dependencies:
  build_version: ^2.0.0

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter packages get

Alternatively, your editor might support pub get or flutter packages get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:


import 'package:build_version/builder.dart';
  
Version Uploaded Documentation Archive
2.0.0 Sep 27, 2018 Go to the documentation of build_version 2.0.0 Download build_version 2.0.0 archive
1.0.1 Sep 27, 2018 Go to the documentation of build_version 1.0.1 Download build_version 1.0.1 archive
1.0.0 Sep 1, 2018 Go to the documentation of build_version 1.0.0 Download build_version 1.0.0 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
47
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
83
Overall:
Weighted score of the above. [more]
70
Learn more about scoring.

We analyzed this package on Apr 16, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.2.0
  • pana: 0.12.14

Platforms

Detected platforms: Flutter, other

Platform components identified in package: build, io.

Maintenance suggestions

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package.

Common filename patterns include main.dart, example.dart, and build_version.dart. Packages with multiple examples should provide example/README.md.

For more information see the pub package layout conventions.

The package description is too short. (-7 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0 <3.0.0
build >=0.12.1 <2.0.0 1.1.3
build_config ^0.3.0 0.3.2
pubspec_parse ^0.1.2+2 0.1.4
Transitive dependencies
analyzer 0.36.0
args 1.5.1
async 2.2.0
charcode 1.1.2
collection 1.14.11
convert 2.1.1
crypto 2.0.6
front_end 0.1.15
glob 1.1.7
json_annotation 2.2.0
kernel 0.3.15
logging 0.11.3+2
meta 1.1.7
package_config 1.0.5
path 1.6.2
pub_semver 1.4.2
source_span 1.5.5
string_scanner 1.0.4
term_glyph 1.1.0
typed_data 1.1.6
watcher 0.9.7+10
yaml 2.1.15
Dev dependencies
build_runner ^1.0.0
build_test ^0.10.3+1
build_verify ^1.0.0
test ^1.2.0