Skip to content

Commit c02e663

Browse files
committed
Improve create-app command for Spring Boot versions
Closes gh-753
1 parent 99c01c0 commit c02e663

File tree

1 file changed

+3
-16
lines changed

1 file changed

+3
-16
lines changed

grace-shell/src/main/groovy/org/grails/cli/profile/commands/CreateAppCommand.groovy

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ class CreateAppCommand extends ArgumentCompletingCommand implements ProfileRepos
9494
public static final String BOOT_VERSION_FLAG = 'boot-version'
9595

9696
public static final String[] SUPPORT_GRACE_VERSIONS = ['2023', '2022', '6', '5', '4', '3']
97-
public static final String[] SUPPORT_SPRING_BOOT_VERSIONS = ['3.1', '3.2', '3.3', '3.4']
97+
public static final String[] SUPPORT_SPRING_BOOT_VERSIONS = ['3.2', '3.3', '3.4']
9898

9999
public static final String UNZIP_PROFILE_TEMP_DIR = 'grails-profile-'
100100
public static final String UNZIP_TEMPLATE_TEMP_DIR = 'grails-template-'
@@ -1009,21 +1009,8 @@ class CreateAppCommand extends ArgumentCompletingCommand implements ProfileRepos
10091009

10101010
@CompileDynamic
10111011
protected void updateSpringDependencies(GrailsConsoleAntBuilder ant, String grailsVersion, String springBootVersion, File targetDirectory) {
1012-
if (grailsVersion.startsWith('2023.1') && !springBootVersion) {
1013-
ant.sequential {
1014-
replace(file: 'build.gradle') {
1015-
replacetoken 'group '
1016-
replacevalue """ext['spring-framework.version'] = '6.0.23'
1017-
1018-
group """
1019-
}
1020-
}
1021-
return
1022-
}
1023-
1024-
if (!grailsVersion.startsWith('2023.1') ||
1025-
!(springBootVersion.substring(0, springBootVersion.lastIndexOf('.')) in SUPPORT_SPRING_BOOT_VERSIONS)) {
1026-
// Currently already upgraded to Spring Boot 3.1.12
1012+
if (!springBootVersion || !(springBootVersion.substring(0, springBootVersion.lastIndexOf('.')) in SUPPORT_SPRING_BOOT_VERSIONS)) {
1013+
// Currently already upgraded to Spring Boot 3.2
10271014
return
10281015
}
10291016

0 commit comments

Comments
 (0)