Skip to content

Commit

Permalink
Improves CreateAppCommand: Use explicit assignment instead of "spac…
Browse files Browse the repository at this point in the history
…e-assignment"

Closes gh-865
  • Loading branch information
rainboyan committed Jan 2, 2025
1 parent 90c9d5a commit 50bc595
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -909,7 +909,7 @@ class CreateAppCommand extends ArgumentCompletingCommand implements ProfileRepos
}
List<String> repositoryUrls = profile.repositories.sort().reverse()
if (GrailsVersion.isGraceSnapshotVersion(grailsVersion)) {
repositoryUrls.add(0, 'maven { url "https://s01.oss.sonatype.org/content/repositories/snapshots/" }')
repositoryUrls.add(0, "maven { url = 'https://s01.oss.sonatype.org/content/repositories/snapshots/' }")
}
if (isSnapshotVersion) {
repositoryUrls.add(0, 'mavenLocal()')
Expand Down Expand Up @@ -949,7 +949,7 @@ class CreateAppCommand extends ArgumentCompletingCommand implements ProfileRepos
List<String> buildRepositoryUrls = buildRepositories.sort().reverse()

if (GrailsVersion.isGraceSnapshotVersion(grailsVersion)) {
buildRepositoryUrls.add(0, 'maven { url "https://s01.oss.sonatype.org/content/repositories/snapshots/" }')
buildRepositoryUrls.add(0, "maven { url = 'https://s01.oss.sonatype.org/content/repositories/snapshots/' }")
}
if (isSnapshotVersion) {
buildRepositoryUrls.add(0, 'mavenLocal()')
Expand Down Expand Up @@ -1038,26 +1038,26 @@ group """
replace(file: 'buildSrc/build.gradle') {
replacetoken 'mavenCentral()'
replacevalue '''mavenCentral()
maven { url 'https://repo.spring.io/milestone' }'''
maven { url = 'https://repo.spring.io/milestone' }'''
}
replace(file: 'build.gradle') {
replacetoken 'mavenCentral()'
replacevalue '''mavenCentral()
maven { url 'https://repo.spring.io/milestone' }'''
maven { url = 'https://repo.spring.io/milestone' }'''
}
}
else if (isSnapshotVersion) {
replace(file: 'buildSrc/build.gradle') {
replacetoken 'mavenCentral()'
replacevalue '''mavenCentral()
maven { url 'https://repo.spring.io/milestone' }
maven { url 'https://repo.spring.io/snapshot' }'''
maven { url = 'https://repo.spring.io/milestone' }
maven { url = 'https://repo.spring.io/snapshot' }'''
}
replace(file: 'build.gradle') {
replacetoken 'mavenCentral()'
replacevalue '''mavenCentral()
maven { url 'https://repo.spring.io/milestone' }
maven { url 'https://repo.spring.io/snapshot' }'''
maven { url = 'https://repo.spring.io/milestone' }
maven { url = 'https://repo.spring.io/snapshot' }'''
}
}

Expand Down

0 comments on commit 50bc595

Please sign in to comment.