@@ -272,21 +272,21 @@ public void processOpts() {
272
272
273
273
supportingFiles .add (new SupportingFile ("README.mustache" , "" , "README.md" ));
274
274
275
- if (library . equals ( Constants . KTOR )) {
275
+ if (isKtor ( )) {
276
276
supportingFiles .add (new SupportingFile ("Dockerfile.mustache" , "" , "Dockerfile" ));
277
277
}
278
278
279
279
String gradleBuildFile = "build.gradle" ;
280
280
281
- if (isJavalin ()) {
281
+ if (isJavalin () || isKtor () ) {
282
282
gradleBuildFile = "build.gradle.kts" ;
283
283
}
284
284
285
285
supportingFiles .add (new SupportingFile (gradleBuildFile + ".mustache" , "" , gradleBuildFile ));
286
286
supportingFiles .add (new SupportingFile ("settings.gradle.mustache" , "" , "settings.gradle" ));
287
287
supportingFiles .add (new SupportingFile ("gradle.properties" , "" , "gradle.properties" ));
288
288
289
- if (library . equals ( Constants . KTOR )) {
289
+ if (isKtor ( )) {
290
290
supportingFiles .add (new SupportingFile ("AppMain.kt.mustache" , packageFolder , "AppMain.kt" ));
291
291
supportingFiles .add (new SupportingFile ("Configuration.kt.mustache" , packageFolder , "Configuration.kt" ));
292
292
@@ -300,6 +300,11 @@ public void processOpts() {
300
300
final String infrastructureFolder = (sourceFolder + File .separator + packageName + File .separator + "infrastructure" ).replace ("." , File .separator );
301
301
302
302
supportingFiles .add (new SupportingFile ("ApiKeyAuth.kt.mustache" , infrastructureFolder , "ApiKeyAuth.kt" ));
303
+
304
+ if (!getOmitGradleWrapper ()) {
305
+ supportingFiles .add (new SupportingFile ("gradle-wrapper.properties" , "gradle" + File .separator + "wrapper" , "gradle-wrapper.properties" ));
306
+ }
307
+
303
308
} else if (isJavalin ()) {
304
309
supportingFiles .add (new SupportingFile ("Main.kt.mustache" , packageFolder , "Main.kt" ));
305
310
apiTemplateFiles .put ("service.mustache" , "Service.kt" );
@@ -412,4 +417,8 @@ public void setReturnContainer(final String returnContainer) {
412
417
private boolean isJavalin () {
413
418
return Constants .JAVALIN5 .equals (library ) || Constants .JAVALIN6 .equals (library );
414
419
}
420
+
421
+ private boolean isKtor () {
422
+ return Constants .KTOR .equals (library );
423
+ }
415
424
}
0 commit comments