build_version 1.0.0 copy "build_version: ^1.0.0" to clipboard
build_version: ^1.0.0 copied to clipboard

outdated

A builder for extracting a package version into code.

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';
    
23
likes
0
pub points
95%
popularity

Publisher

verified publisherj832.com

A builder for extracting a package version into code.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

build, build_config, pubspec_parse

More

Packages that depend on build_version