Is it possible to pass null
or an empty String
as command line argument?
Having:
private String destination = new File(getProject().getBuildDir(), "generated/schema.graphql").getPath();
@Optional
@OutputFile
public String getDestination() {
return destination;
}
@Option(description = "The destination file where to output the schema. If no path is specified, the schema will be printed to the log.", option = "destination")
public void setDestination(String destination) {
this.destination = destination;
}
When I call this taks like:
./gradlew generateSchema --destination=
I get the following error:
> An empty argument was provided for command-line option '--destination'.
I also tried with ./gradlew generateSchema --no-destination
but that gives:
> Unknown command-line option '--no-destination'.