aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/tools/singlejar/options.h
blob: cc01cd8547a6231322b224225be423e92dd6a17a (plain)
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
55
56
57
58
// Copyright 2016 The Bazel Authors. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//    http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef THIRD_PARTY_BAZEL_SRC_TOOLS_SINGLEJAR_OPTIONS_H_
#define THIRD_PARTY_BAZEL_SRC_TOOLS_SINGLEJAR_OPTIONS_H_

#include <string>
#include <vector>

/* Command line options. */
class Options {
 public:
  Options()
      : exclude_build_data(false),
        force_compression(false),
        normalize_timestamps(false),
        no_duplicates(false),
        no_duplicate_classes(false),
        preserve_compression(false),
        verbose(false),
        warn_duplicate_resources(false) {}

  // Parses command line arguments into the fields of this instance.
  void ParseCommandLine(int argc, const char * const argv[]);

  std::string output_jar;
  std::string main_class;
  std::string java_launcher;
  std::vector<std::string> manifest_lines;
  std::vector<std::string> input_jars;
  std::vector<std::string> resources;
  std::vector<std::string> classpath_resources;
  std::vector<std::string> build_info_files;
  std::vector<std::string> build_info_lines;
  std::vector<std::string> include_prefixes;
  std::vector<std::string> nocompress_suffixes;
  bool exclude_build_data;
  bool force_compression;
  bool normalize_timestamps;
  bool no_duplicates;
  bool no_duplicate_classes;
  bool preserve_compression;
  bool verbose;
  bool warn_duplicate_resources;
};

#endif  // THIRD_PARTY_BAZEL_SRC_TOOLS_SINGLEJAR_OPTIONS_H_