Skip to content

Commit 69ed207

Browse files
Merge branch '3.0.x' into 3.1.x
2 parents 2cf39d3 + aa9e18f commit 69ed207

File tree

6 files changed

+18
-8
lines changed

6 files changed

+18
-8
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ buildscript {
2020
}
2121

2222
dependencies {
23-
classpath "org.springframework.boot:spring-boot-gradle-plugin:$springBootVersion"
23+
classpath libs.org.springframework.boot.spring.boot.gradle.plugin
2424
}
2525
}
2626

buildSrc/src/main/groovy/io/spring/gradle/convention/SpringSamplePlugin.groovy

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
package io.spring.gradle.convention;
1818

1919
import org.gradle.api.Project
20+
import org.gradle.api.artifacts.VersionCatalogsExtension
2021
import org.sonarqube.gradle.SonarQubePlugin;
2122

2223
/**
@@ -33,16 +34,16 @@ public class SpringSamplePlugin extends AbstractSpringJavaPlugin {
3334

3435
@Override
3536
protected void initialPlugins(Project project) {
36-
if (project.hasProperty('springBootVersion')) {
37-
String springBootVersion = project.springBootVersion
38-
37+
def versionCatalog = project.rootProject.extensions.getByType(VersionCatalogsExtension.class)
38+
.named("libs")
39+
def version = versionCatalog.findVersion("org-springframework-boot")
40+
version.ifPresent {
41+
def springBootVersion = it.displayName
3942
if (Utils.isSnapshot(springBootVersion)) {
4043
project.ext.forceMavenRepositories = 'snapshot'
41-
}
42-
else if (Utils.isMilestone(springBootVersion)) {
44+
} else if (Utils.isMilestone(springBootVersion)) {
4345
project.ext.forceMavenRepositories = 'milestone'
4446
}
4547
}
46-
4748
}
4849
}

gradle.properties

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
org.gradle.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
22
org.gradle.parallel=true
33
version=3.1.4-SNAPSHOT
4-
springBootVersion=3.0.7

gradle/libs.versions.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ org-gretty = "4.1.1"
77
org-mongodb = "4.8.2"
88
org-slf4j = "2.0.9"
99
org-testcontainers = "1.17.6"
10+
org-springframework-boot = "3.1.6"
1011

1112
[libraries]
1213
ch-qos-logback-logback-classic = { module = "ch.qos.logback:logback-classic", version.ref = "ch-qos-logback" }
@@ -63,6 +64,8 @@ org-slf4j-slf4j-api = { module = "org.slf4j:slf4j-api", version.ref = "org-slf4j
6364
org-springframework-data-spring-data-bom = "org.springframework.data:spring-data-bom:2022.0.12"
6465
org-springframework-security-spring-security-bom = "org.springframework.security:spring-security-bom:6.1.5"
6566
org-springframework-spring-framework-bom = "org.springframework:spring-framework-bom:6.0.14"
67+
org-springframework-boot-spring-boot-dependencies = { module = "org.springframework.boot:spring-boot-dependencies", version.ref = "org-springframework-boot" }
68+
org-springframework-boot-spring-boot-gradle-plugin = { module = "org.springframework.boot:spring-boot-gradle-plugin", version.ref = "org-springframework-boot" }
6669
org-testcontainers-testcontainers-bom = { module = "org.testcontainers:testcontainers-bom", version.ref = "org-testcontainers" }
6770
org-thymeleaf-extras-thymeleaf-extras-springsecurity6 = "org.thymeleaf.extras:thymeleaf-extras-springsecurity6:3.1.2.RELEASE"
6871
org-webjars-bootstrap = "org.webjars:bootstrap:2.3.2"

spring-session-docs/spring-session-docs.gradle

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,10 @@ tasks.named("generateAntoraYml") {
4949

5050

5151
def generateAttributes() {
52+
def springBootVersion = libs.versions.org.springframework.boot.get()
53+
springBootVersion = springBootVersion.contains("-")
54+
? springBootVersion.substring(0, springBootVersion.indexOf("-"))
55+
: springBootVersion
5256
def ghTag = snapshotBuild ? 'main' : project.version
5357
def springBootRefDocs = "https://docs.spring.io/spring-boot/docs/${springBootVersion}/reference/html"
5458
return ['gh-tag':ghTag,

spring-session-samples/gradle/dependency-management.gradle

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
def versionCatalog = extensions.getByType(VersionCatalogsExtension).named("libs")
2+
def springBootVersion = versionCatalog.findVersion("org-springframework-boot").get().displayName
3+
14
dependencyManagement {
25
imports {
36
mavenBom "org.springframework.boot:spring-boot-dependencies:$springBootVersion"

0 commit comments

Comments
 (0)