gitsumu 0.6.0 copy "gitsumu: ^0.6.0" to clipboard
gitsumu: ^0.6.0 copied to clipboard

Dart package provides code about compile environment (git info, flutter version ...).

example/lib/example.dart

import 'package:gitsumu/annotation.dart';

part 'example.g.dart';

// Use this "part" statement if generated file is specified to be in "lib/generated"
// folder in build.yaml.
// part 'generated/example.g.dart';

void printInfo() {
  print('revision: $gitCommitRevisionShort ($gitCommitRevisionLong)');
  print(
      'git commit:    $gitCommitTimeYear-$gitCommitTimeMonth-$gitCommitTimeDay $gitCommitTimeHour:$gitCommitTimeMinute:$gitCommitTimeSecond $gitCommitTimeTimezone}');
  print(
      'built with flutter: $flutterVersion $flutterChannel (framework=$flutterFrameworkRevision engine=$flutterEngineRevision)');
  print('built with dart: $dartVersion');
  print('git commit count in repo: $gitCommitCountRepo');
  print('git commit count on current branch: $gitCommitCountCurrentBranch');
}

@CustomInfo('myCommandResult')
const aNotImportantName = ['dart', '--help'];

@CustomInfo('myCommandResult2', ignoreStderr: true)
const alsoNotImportantName = ['git', 'checkout', '123456789'];

@CustomInfo('myCommandFromStderr', useStderr: true)
const alsoNotImportantName2 = ['git', 'abc'];

@CustomInfo(
  'myCommandResult3',
  platforms: {
    CustomInfoPlatforms.linux,
    CustomInfoPlatforms.macos,
  },
)
const alsoNotImportantName3 = ['uname', '-m'];

@CustomInfo(
  'myCommandResult4',
  platforms: {
    CustomInfoPlatforms.windows,
  },
  platformDefaultValue: 'unknown',
)
const alsoNotImportantName4 = ['hostname'];
1
likes
150
points
792
downloads

Publisher

verified publisherkzs.moe

Weekly Downloads

Dart package provides code about compile environment (git info, flutter version ...).

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

analyzer, args, build, build_config, collection, path, source_gen, yaml

More

Packages that depend on gitsumu