I think I prefer --foo=bar to --foo-bar because it is less ambiguous. --foo-bar might be just a two-word option or might be setting value 'bar'. --word-word-... syntax can stay for longer options.
However, if we like we can make gradle smart and support both ways :) >Deprecate the use of '--OPTION <space> argument' I think we should deprecate that. I don't consider it as a blocker for 1.0. Hope that helps! On Thu, Mar 1, 2012 at 4:32 PM, Daz DeBoer <[email protected]>wrote: > Hi guys > > Following our discussion from yesterday, I was thinking that maybe a > review of the gradle CLI might be good for RC1. > > A: The main issue is the '--refresh dependencies' option looks bad when > combined with the 'dependencies' task. But this would equally apply to > 'gradle --cache rebuild rebuild' (if rebuild was a task name). > - These are the only 2 options we have that take 'multi-choice' > arguments. All others take user-supplied arguments (like file names) or no > arguments. > - Actually '--exclude integTest' only avoids this issue since you > never want explicitly execute the task you're excluding ("--exclude > integTest integTest" doesn't make sense!) > Options: > 1) Keep things as they are. > 2) Deprecate the use of '--OPTION <space> argument' and encourage > '--OPTION = argument'. We could keep the ability to do '-O argument', but > force the '=' when using the --long-option format. > - This would allow us to eventually make the argument optional: eg > '--refresh', '--refresh=dependencies', '--refresh=task-uptodate' > 3) Add a new pattern for a 'multi-choice' option, and switch to the syntax > of: '--refresh-dependencies', '--cache-rebuild' > - We could add these individually to start with, but later add a > better way to describe these in the CLI help (when we have more than a > couple of choices). > > B: I'd also like to see is consolidation of the '--cache rebuild' and > '--refresh dependencies' options. (I really don't like --cache rebuild) > Options: > 1) Keep things as they are: (--refresh=dependencies & --cache=rebuild) > 2) Deprecate --cache=rebuild and reuse '--refresh': > --refresh=task-cache > --refresh=task-state > --refresh=cached-task-state > --refresh=uptodate-state > --refresh=uptodate-cache > 3) A new option entirely > ???? > > My vote would be for A3 and B2, so we'd have '--refresh-dependencies' and > '--refresh-task-cache' as separate options to start with, later adding the > concept of a '--refresh' option with different '-switch' sub-options. > > Thoughts? > Daz > > -- Szczepan Faber Principal engineer@gradleware Lead@mockito
