-
Notifications
You must be signed in to change notification settings - Fork 0
/
example.dart
43 lines (35 loc) · 1.26 KB
/
example.dart
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
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');
}
@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 = ['arch'];
@CustomInfo(
'myCommandResult4',
platforms: {
CustomInfoPlatforms.windows,
},
platformDefaultValue: 'unknown',
)
const alsoNotImportantName4 = ['hostname'];