add hided timestamp option to swfit codegen

This commit is contained in:
wing328
2016-08-31 16:45:12 +08:00
parent da45cb7ff5
commit 322862c4b6
5 changed files with 113 additions and 105 deletions

View File

@@ -154,11 +154,18 @@ public class SwiftCodegen extends DefaultCodegen implements CodegenConfig {
cliOptions.add(new CliOption(POD_SCREENSHOTS, "Screenshots used for Podspec"));
cliOptions.add(new CliOption(POD_DOCUMENTATION_URL, "Documentation URL used for Podspec"));
cliOptions.add(new CliOption(SWIFT_USE_API_NAMESPACE, "Flag to make all the API classes inner-class of {{projectName}}API"));
cliOptions.add(new CliOption(CodegenConstants.HIDE_GENERATION_TIMESTAMP, "hides the timestamp when files were generated")
.defaultValue(Boolean.TRUE.toString()));
}
@Override
public void processOpts() {
super.processOpts();
// default HIDE_GENERATION_TIMESTAMP to true
if (!additionalProperties.containsKey(CodegenConstants.HIDE_GENERATION_TIMESTAMP)) {
additionalProperties.put(CodegenConstants.HIDE_GENERATION_TIMESTAMP, Boolean.TRUE.toString());
}
// Setup project name
if (additionalProperties.containsKey(PROJECT_NAME)) {