From 197a9810b671c66db1b70c4df602400db7c15e39 Mon Sep 17 00:00:00 2001 From: AlexandrouR Date: Tue, 16 Feb 2021 20:27:19 +0000 Subject: [PATCH] Fixed generate and subcommands. --- .../org/web3j/console/GenerateCommand.java | 8 ++--- ...lidityFunctionWrapperGeneratorCommand.java | 36 ------------------- ...ruffleFunctionWrapperGeneratorCommand.java | 36 ------------------- .../subcommand/SolidityGenerateCommand.java | 2 +- .../subcommand/TruffleGenerateCommand.java | 2 +- 5 files changed, 6 insertions(+), 78 deletions(-) delete mode 100644 src/main/java/org/web3j/console/wrapper/SolidityFunctionWrapperGeneratorCommand.java delete mode 100644 src/main/java/org/web3j/console/wrapper/TruffleFunctionWrapperGeneratorCommand.java diff --git a/src/main/java/org/web3j/console/GenerateCommand.java b/src/main/java/org/web3j/console/GenerateCommand.java index 716f557..308f29c 100644 --- a/src/main/java/org/web3j/console/GenerateCommand.java +++ b/src/main/java/org/web3j/console/GenerateCommand.java @@ -16,15 +16,15 @@ import picocli.CommandLine.Command; import org.web3j.console.project.UnitTestCommand; -import org.web3j.console.wrapper.SolidityFunctionWrapperGeneratorCommand; -import org.web3j.console.wrapper.TruffleFunctionWrapperGeneratorCommand; +import org.web3j.console.wrapper.subcommand.SolidityGenerateCommand; +import org.web3j.console.wrapper.subcommand.TruffleGenerateCommand; @Command( name = "generate", subcommands = { CommandLine.HelpCommand.class, - SolidityFunctionWrapperGeneratorCommand.class, - TruffleFunctionWrapperGeneratorCommand.class, + SolidityGenerateCommand.class, + TruffleGenerateCommand.class, UnitTestCommand.class, }, showDefaultValues = true, diff --git a/src/main/java/org/web3j/console/wrapper/SolidityFunctionWrapperGeneratorCommand.java b/src/main/java/org/web3j/console/wrapper/SolidityFunctionWrapperGeneratorCommand.java deleted file mode 100644 index 8f2cd7a..0000000 --- a/src/main/java/org/web3j/console/wrapper/SolidityFunctionWrapperGeneratorCommand.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright 2020 Web3 Labs Ltd. - * - * 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. - */ -package org.web3j.console.wrapper; - -import picocli.CommandLine.Command; - -import org.web3j.console.SubCommand; -import org.web3j.console.Web3jVersionProvider; -import org.web3j.console.wrapper.subcommand.SolidityGenerateCommand; - -@Command( - name = "solidity", - description = "Generate wrappers from Solidity", - showDefaultValues = true, - abbreviateSynopsis = true, - mixinStandardHelpOptions = true, - subcommands = { - SolidityGenerateCommand.class, - }, - versionProvider = Web3jVersionProvider.class, - synopsisHeading = "%n", - descriptionHeading = "%nDescription:%n%n", - optionListHeading = "%nOptions:%n", - footerHeading = "%n", - footer = "Web3j CLI is licensed under the Apache License 2.0") -public class SolidityFunctionWrapperGeneratorCommand extends SubCommand {} diff --git a/src/main/java/org/web3j/console/wrapper/TruffleFunctionWrapperGeneratorCommand.java b/src/main/java/org/web3j/console/wrapper/TruffleFunctionWrapperGeneratorCommand.java deleted file mode 100644 index 94e8db0..0000000 --- a/src/main/java/org/web3j/console/wrapper/TruffleFunctionWrapperGeneratorCommand.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright 2020 Web3 Labs Ltd. - * - * 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. - */ -package org.web3j.console.wrapper; - -import picocli.CommandLine.Command; - -import org.web3j.console.SubCommand; -import org.web3j.console.Web3jVersionProvider; -import org.web3j.console.wrapper.subcommand.TruffleGenerateCommand; - -@Command( - name = "truffle", - description = "Generate wrappers from truffle json", - showDefaultValues = true, - abbreviateSynopsis = true, - mixinStandardHelpOptions = true, - subcommands = { - TruffleGenerateCommand.class, - }, - versionProvider = Web3jVersionProvider.class, - synopsisHeading = "%n", - descriptionHeading = "%nDescription:%n%n", - optionListHeading = "%nOptions:%n", - footerHeading = "%n", - footer = "Web3j CLI is licensed under the Apache License 2.0") -public class TruffleFunctionWrapperGeneratorCommand extends SubCommand {} diff --git a/src/main/java/org/web3j/console/wrapper/subcommand/SolidityGenerateCommand.java b/src/main/java/org/web3j/console/wrapper/subcommand/SolidityGenerateCommand.java index de3bd7c..f09b238 100644 --- a/src/main/java/org/web3j/console/wrapper/subcommand/SolidityGenerateCommand.java +++ b/src/main/java/org/web3j/console/wrapper/subcommand/SolidityGenerateCommand.java @@ -26,7 +26,7 @@ import static picocli.CommandLine.Help.Visibility.ALWAYS; @Command( - name = "generate", + name = "solidity", description = "Generate Java smart contract wrappers from Solidity", showDefaultValues = true, abbreviateSynopsis = true, diff --git a/src/main/java/org/web3j/console/wrapper/subcommand/TruffleGenerateCommand.java b/src/main/java/org/web3j/console/wrapper/subcommand/TruffleGenerateCommand.java index 6d9544e..b843aaf 100644 --- a/src/main/java/org/web3j/console/wrapper/subcommand/TruffleGenerateCommand.java +++ b/src/main/java/org/web3j/console/wrapper/subcommand/TruffleGenerateCommand.java @@ -24,7 +24,7 @@ import static picocli.CommandLine.Help.Visibility.ALWAYS; @Command( - name = "generate", + name = "truffle", description = "Generate Java smart contract wrappers from truffle json", showDefaultValues = true, abbreviateSynopsis = true,