diff options
author | Sasha Smundak <asmundak@google.com> | 2016-07-20 09:11:34 +0000 |
---|---|---|
committer | Yun Peng <pcloudy@google.com> | 2016-07-20 10:01:59 +0000 |
commit | d3b0ede8c87f257451f9dfa8d9f0ea73798d6dc0 (patch) | |
tree | 7b849166999fa0f9f1816a07da91dc7e6f55d660 /src/tools/singlejar/options.h | |
parent | 56a665623471d58c9e0f0b9978a91b442997a397 (diff) |
Command line options processing.
--
MOS_MIGRATED_REVID=127924233
Diffstat (limited to 'src/tools/singlejar/options.h')
-rw-r--r-- | src/tools/singlejar/options.h | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/src/tools/singlejar/options.h b/src/tools/singlejar/options.h new file mode 100644 index 0000000000..74de3a4790 --- /dev/null +++ b/src/tools/singlejar/options.h @@ -0,0 +1,55 @@ +// 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), + 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 *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; + bool exclude_build_data; + bool force_compression; + bool normalize_timestamps; + bool no_duplicates; + bool preserve_compression; + bool verbose; + bool warn_duplicate_resources; +}; + +#endif // THIRD_PARTY_BAZEL_SRC_TOOLS_SINGLEJAR_OPTIONS_H_ |