-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathproguard_command.dart
More file actions
54 lines (49 loc) · 1.17 KB
/
proguard_command.dart
File metadata and controls
54 lines (49 loc) · 1.17 KB
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
44
45
46
47
48
49
50
51
52
53
54
import 'dart:io';
import 'package:args/args.dart';
import 'package:raygun_cli/proguard/proguard.dart';
const kProguardCommand = 'proguard';
ArgParser buildParserProguard() {
return ArgParser()
..addFlag(
'help',
abbr: 'h',
negatable: false,
help: 'Print proguard usage information',
)
..addOption(
'app-id',
mandatory: true,
help: 'Raygun application ID',
)
..addOption(
'external-access-token',
mandatory: true,
help: 'Raygun external access token',
)
..addOption(
'path',
mandatory: true,
help: 'Path to the ProGuard/R8 mapping file',
)
..addOption(
'version',
mandatory: true,
help: 'Version of the app this mapping file is for',
)
..addFlag(
'overwrite',
defaultsTo: false,
help: 'Overwrite existing mapping file if one exists for this version',
);
}
void parseProguardCommand(ArgResults command, bool verbose) {
if (command.wasParsed('help')) {
print('Usage: raygun-cli proguard <arguments>');
print(buildParserProguard().usage);
exit(0);
}
Proguard(
command: command,
verbose: verbose,
).upload();
}