@@ -637,7 +637,9 @@ public void processOpts() {
637637 }
638638 }
639639 if (SPRING_DECLARATIVE_HTTP_INTERFACE_LIBRARY .equals (library )) {
640- this .setUseSpringBoot3 (true );
640+ if (!isUseSpringBoot4 ()) {
641+ this .setUseSpringBoot3 (true );
642+ }
641643 this .setInterfaceOnly (true );
642644 this .setUseFeignClient (false );
643645 this .setSkipDefaultInterface (true );
@@ -759,14 +761,18 @@ public void processOpts() {
759761 supportingFiles .add (new SupportingFile ("apiUtil.mustache" ,
760762 (sourceFolder + File .separator + apiPackage ).replace ("." , java .io .File .separator ), "ApiUtil.kt" ));
761763
762- if (isUseSpringBoot3 ()) {
764+ if (isUseSpringBoot4 ()) {
765+ supportingFiles .add (new SupportingFile ("pom-sb4.mustache" , "" , "pom.xml" ));
766+ } else if (isUseSpringBoot3 ()) {
763767 supportingFiles .add (new SupportingFile ("pom-sb3.mustache" , "" , "pom.xml" ));
764768 } else {
765769 supportingFiles .add (new SupportingFile ("pom.mustache" , "" , "pom.xml" ));
766770 }
767771
768772 if (this .gradleBuildFile ) {
769- if (isUseSpringBoot3 ()) {
773+ if (isUseSpringBoot4 ()) {
774+ supportingFiles .add (new SupportingFile ("buildGradle-sb4-Kts.mustache" , "" , "build.gradle.kts" ));
775+ } else if (isUseSpringBoot3 ()) {
770776 supportingFiles .add (new SupportingFile ("buildGradle-sb3-Kts.mustache" , "" , "build.gradle.kts" ));
771777 } else {
772778 supportingFiles .add (new SupportingFile ("buildGradleKts.mustache" , "" , "build.gradle.kts" ));
@@ -805,14 +811,18 @@ public void processOpts() {
805811 if (library .equals (SPRING_CLOUD_LIBRARY )) {
806812 LOGGER .info ("Setup code generator for Kotlin Spring Cloud Client" );
807813
808- if (isUseSpringBoot3 ()) {
814+ if (isUseSpringBoot4 ()) {
815+ supportingFiles .add (new SupportingFile ("pom-sb4.mustache" , "pom.xml" ));
816+ } else if (isUseSpringBoot3 ()) {
809817 supportingFiles .add (new SupportingFile ("pom-sb3.mustache" , "pom.xml" ));
810818 } else {
811819 supportingFiles .add (new SupportingFile ("pom.mustache" , "pom.xml" ));
812820 }
813821
814822 if (this .gradleBuildFile ) {
815- if (isUseSpringBoot3 ()) {
823+ if (isUseSpringBoot4 ()) {
824+ supportingFiles .add (new SupportingFile ("buildGradle-sb4-Kts.mustache" , "build.gradle.kts" ));
825+ } else if (isUseSpringBoot3 ()) {
816826 supportingFiles .add (new SupportingFile ("buildGradle-sb3-Kts.mustache" , "build.gradle.kts" ));
817827 } else {
818828 supportingFiles .add (new SupportingFile ("buildGradleKts.mustache" , "build.gradle.kts" ));
@@ -844,10 +854,18 @@ public void processOpts() {
844854 if (library .equals (SPRING_DECLARATIVE_HTTP_INTERFACE_LIBRARY )) {
845855 LOGGER .info ("Setup code generator for Kotlin Spring Declarative Http interface" );
846856
847- supportingFiles .add (new SupportingFile ("pom-sb3.mustache" , "pom.xml" ));
857+ if (isUseSpringBoot4 ()) {
858+ supportingFiles .add (new SupportingFile ("pom-sb4.mustache" , "pom.xml" ));
859+ } else {
860+ supportingFiles .add (new SupportingFile ("pom-sb3.mustache" , "pom.xml" ));
861+ }
848862
849863 if (this .gradleBuildFile ) {
850- supportingFiles .add (new SupportingFile ("buildGradle-sb3-Kts.mustache" , "build.gradle.kts" ));
864+ if (isUseSpringBoot4 ()) {
865+ supportingFiles .add (new SupportingFile ("buildGradle-sb4-Kts.mustache" , "build.gradle.kts" ));
866+ } else {
867+ supportingFiles .add (new SupportingFile ("buildGradle-sb3-Kts.mustache" , "build.gradle.kts" ));
868+ }
851869 supportingFiles .add (new SupportingFile ("settingsGradle.mustache" , "settings.gradle" ));
852870
853871 String gradleWrapperPackage = "gradle.wrapper" ;
0 commit comments