build_version 1.0.0

  • README.md
  • CHANGELOG.md
  • Installing
  • Versions
  • new60

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:
       build_version: ^1.0.0
    
  2. Configure build_version in build.yaml.

     targets:
       $default:
         builders:
           build_version:
             enabled: true
    
  3. 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';
    

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: ^1.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
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]
31
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
70
Overall:
Weighted score of the above. [more]
60
Learn more about scoring.

We analyzed this package on Sep 18, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.0.0
  • pana: 0.12.3

Platforms

Detected platforms: Flutter, other

Platform components identified in package: build, io, isolate.

Suggestions

The description is too short.

Add more detail about the package, what it does and what is its target use case. Try to write at least 60 characters.

Maintain an example.

Create a short demo in the example/ directory to show how to use this package. Common file name patterns include: main.dart, example.dart or you could also use build_version.dart.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0 <3.0.0
build ^0.12.1 0.12.7+3
build_config ^0.3.0 0.3.1+2
pubspec_parse ^0.1.2+2 0.1.2+2
Transitive dependencies
analyzer 0.32.5 0.33.0-alpha.0
args 1.5.0
async 2.0.8
charcode 1.1.2
collection 1.14.11
convert 2.0.2
crypto 2.0.6
csslib 0.14.5
front_end 0.1.4+1 0.1.5
glob 1.1.7
html 0.13.3+3
json_annotation 1.1.0
kernel 0.3.4+1 0.3.5
logging 0.11.3+2
meta 1.1.6
package_config 1.0.5
path 1.6.2
plugin 0.2.0+3
pub_semver 1.4.2
source_span 1.4.1
string_scanner 1.0.4
typed_data 1.1.6
utf 0.9.0+5
watcher 0.9.7+10
yaml 2.1.15
Dev dependencies
build_runner ^0.10.0
build_test ^0.10.3+1
test ^1.2.0