[cli][gradle] Adds package name as a global option (#2557)

* [cli] Support packageName as global option

CLI supports other package-related options (--api-package,
--model-package, --invoker-package). This aligns those options with
--package-name to avoid confusion about how to configure these options
where those are supported.

This intentionally does not apply a packageName getter/setter to
DefaultCodegen to reduce the footprint of this change.

* [gradle] Add packagName as global option

This makes packageName available as a global option, beside apiPackage,
modelPackage, and invokerPackage to reduce potential confusion about how
to configure the four of these options by generators which support them.
This commit is contained in:
Jim Schubert
2019-04-30 12:46:48 -04:00
committed by William Cheng
parent a5235f25b4
commit 5ea4391af5
9 changed files with 54 additions and 6 deletions

View File

@@ -137,6 +137,8 @@ public class CodegenConstants {
public static final String PROJECT_NAME = "projectName";
public static final String PACKAGE_NAME = "packageName";
public static final String PACKAGE_NAME_DESC = "package for generated classes (where supported)";
public static final String PACKAGE_VERSION = "packageVersion";
public static final String PACKAGE_TITLE = "packageTitle";