Skip to content

Commit

Permalink
Rearrange repositories and buildRepositories before using Grails profile
Browse files Browse the repository at this point in the history
  • Loading branch information
rainboyan committed Jan 15, 2024
1 parent 3aac6f6 commit d6856a5
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,7 @@ class CreateAppCommand extends ArgumentCompletingCommand implements ProfileRepos
repo.startsWith('http') ? "${' ' * spaces}maven { url \"${repo}\" }" : "${' ' * spaces}${repo}"
}

String repositories = profile.repositories.collect(repositoryUrl.curry(4)).unique().join(ln)
String repositories = profile.repositories.sort().reverse().collect(repositoryUrl.curry(4)).unique().join(ln)

List<Dependency> profileDependencies = profile.dependencies
List<Dependency> dependencies = profileDependencies.findAll { Dependency dep ->
Expand Down Expand Up @@ -458,7 +458,7 @@ class CreateAppCommand extends ArgumentCompletingCommand implements ProfileRepos
for (Feature f in features) {
buildRepositories.addAll(f.getBuildRepositories())
}
String buildRepositoriesString = buildRepositories.collect(repositoryUrl.curry(8)).unique().join(ln)
String buildRepositoriesString = buildRepositories.sort().reverse().collect(repositoryUrl.curry(8)).unique().join(ln)

String buildDependenciesString = buildDependencies.collect { Dependency dep ->
String artifactStr = resolveArtifactString(dep)
Expand Down

0 comments on commit d6856a5

Please sign in to comment.