Skip to content

Commit

Permalink
Apply consistent ordering to the Kotlin Gradle build customizer
Browse files Browse the repository at this point in the history
Closes gh-1559
  • Loading branch information
mhalbritter committed Aug 8, 2024
1 parent f5cdbd0 commit ec37fbf
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import io.spring.initializr.generator.buildsystem.gradle.GradleBuild;
import io.spring.initializr.generator.spring.build.BuildCustomizer;

import org.springframework.core.Ordered;
import org.springframework.util.CollectionUtils;

/**
Expand Down Expand Up @@ -61,4 +62,11 @@ private List<String> quote(List<String> compilerArgs) {
return compilerArgs.stream().map((element) -> this.quote + element + this.quote).toList();
}

@Override
public int getOrder() {
// See
// io.spring.initializr.generator.spring.build.gradle.GradleProjectGenerationConfiguration.LANGUAGE_PLUGINS_ORDER
return Ordered.HIGHEST_PRECEDENCE + 5;
}

}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
plugins {
id 'org.springframework.boot' version '2.4.1'
id 'io.spring.dependency-management' version '1.0.6.RELEASE'
id 'org.jetbrains.kotlin.jvm' version '1.1.1'
id 'org.jetbrains.kotlin.plugin.spring' version '1.1.1'
id 'org.springframework.boot' version '2.4.1'
id 'io.spring.dependency-management' version '1.0.6.RELEASE'
}

group = 'com.example'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
plugins {
id("org.springframework.boot") version "2.4.1"
id("io.spring.dependency-management") version "1.0.6.RELEASE"
kotlin("jvm") version "1.1.1"
kotlin("plugin.spring") version "1.1.1"
id("org.springframework.boot") version "2.4.1"
id("io.spring.dependency-management") version "1.0.6.RELEASE"
}

group = "com.example"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
plugins {
id 'org.springframework.boot' version '2.4.1'
id 'io.spring.dependency-management' version '1.0.6.RELEASE'
id 'org.jetbrains.kotlin.jvm' version '1.1.1'
id 'org.jetbrains.kotlin.plugin.spring' version '1.1.1'
id 'org.springframework.boot' version '2.4.1'
id 'io.spring.dependency-management' version '1.0.6.RELEASE'
}

group = 'com.example'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
plugins {
id("org.springframework.boot") version "2.4.1"
id("io.spring.dependency-management") version "1.0.6.RELEASE"
kotlin("jvm") version "1.1.1"
kotlin("plugin.spring") version "1.1.1"
id("org.springframework.boot") version "2.4.1"
id("io.spring.dependency-management") version "1.0.6.RELEASE"
}

group = "com.example"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
plugins {
id 'org.jetbrains.kotlin.jvm' version '1.1.1'
id 'org.jetbrains.kotlin.plugin.spring' version '1.1.1'
id 'war'
id 'org.springframework.boot' version '2.4.1'
id 'io.spring.dependency-management' version '1.0.6.RELEASE'
id 'org.jetbrains.kotlin.jvm' version '1.1.1'
id 'org.jetbrains.kotlin.plugin.spring' version '1.1.1'
}

group = 'com.example'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
plugins {
kotlin("jvm") version "1.1.1"
kotlin("plugin.spring") version "1.1.1"
war
id("org.springframework.boot") version "2.4.1"
id("io.spring.dependency-management") version "1.0.6.RELEASE"
kotlin("jvm") version "1.1.1"
kotlin("plugin.spring") version "1.1.1"
}

group = "com.example"
Expand Down

0 comments on commit ec37fbf

Please sign in to comment.