Merge branch '3.0.x' into 3.1.x
This commit is contained in:
@@ -20,7 +20,7 @@ buildscript {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath "org.springframework.boot:spring-boot-gradle-plugin:$springBootVersion"
|
||||
classpath libs.org.springframework.boot.spring.boot.gradle.plugin
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
package io.spring.gradle.convention;
|
||||
|
||||
import org.gradle.api.Project
|
||||
import org.gradle.api.artifacts.VersionCatalogsExtension
|
||||
import org.sonarqube.gradle.SonarQubePlugin;
|
||||
|
||||
/**
|
||||
@@ -33,16 +34,16 @@ public class SpringSamplePlugin extends AbstractSpringJavaPlugin {
|
||||
|
||||
@Override
|
||||
protected void initialPlugins(Project project) {
|
||||
if (project.hasProperty('springBootVersion')) {
|
||||
String springBootVersion = project.springBootVersion
|
||||
|
||||
def versionCatalog = project.rootProject.extensions.getByType(VersionCatalogsExtension.class)
|
||||
.named("libs")
|
||||
def version = versionCatalog.findVersion("org-springframework-boot")
|
||||
version.ifPresent {
|
||||
def springBootVersion = it.displayName
|
||||
if (Utils.isSnapshot(springBootVersion)) {
|
||||
project.ext.forceMavenRepositories = 'snapshot'
|
||||
}
|
||||
else if (Utils.isMilestone(springBootVersion)) {
|
||||
} else if (Utils.isMilestone(springBootVersion)) {
|
||||
project.ext.forceMavenRepositories = 'milestone'
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
org.gradle.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
|
||||
org.gradle.parallel=true
|
||||
version=3.1.4-SNAPSHOT
|
||||
springBootVersion=3.0.7
|
||||
|
||||
@@ -7,6 +7,7 @@ org-gretty = "4.1.1"
|
||||
org-mongodb = "4.8.2"
|
||||
org-slf4j = "2.0.9"
|
||||
org-testcontainers = "1.17.6"
|
||||
org-springframework-boot = "3.1.6"
|
||||
|
||||
[libraries]
|
||||
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
|
||||
org-springframework-data-spring-data-bom = "org.springframework.data:spring-data-bom:2022.0.12"
|
||||
org-springframework-security-spring-security-bom = "org.springframework.security:spring-security-bom:6.1.5"
|
||||
org-springframework-spring-framework-bom = "org.springframework:spring-framework-bom:6.0.14"
|
||||
org-springframework-boot-spring-boot-dependencies = { module = "org.springframework.boot:spring-boot-dependencies", version.ref = "org-springframework-boot" }
|
||||
org-springframework-boot-spring-boot-gradle-plugin = { module = "org.springframework.boot:spring-boot-gradle-plugin", version.ref = "org-springframework-boot" }
|
||||
org-testcontainers-testcontainers-bom = { module = "org.testcontainers:testcontainers-bom", version.ref = "org-testcontainers" }
|
||||
org-thymeleaf-extras-thymeleaf-extras-springsecurity6 = "org.thymeleaf.extras:thymeleaf-extras-springsecurity6:3.1.2.RELEASE"
|
||||
org-webjars-bootstrap = "org.webjars:bootstrap:2.3.2"
|
||||
|
||||
@@ -49,6 +49,10 @@ tasks.named("generateAntoraYml") {
|
||||
|
||||
|
||||
def generateAttributes() {
|
||||
def springBootVersion = libs.versions.org.springframework.boot.get()
|
||||
springBootVersion = springBootVersion.contains("-")
|
||||
? springBootVersion.substring(0, springBootVersion.indexOf("-"))
|
||||
: springBootVersion
|
||||
def ghTag = snapshotBuild ? 'main' : project.version
|
||||
def springBootRefDocs = "https://docs.spring.io/spring-boot/docs/${springBootVersion}/reference/html"
|
||||
return ['gh-tag':ghTag,
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
def versionCatalog = extensions.getByType(VersionCatalogsExtension).named("libs")
|
||||
def springBootVersion = versionCatalog.findVersion("org-springframework-boot").get().displayName
|
||||
|
||||
dependencyManagement {
|
||||
imports {
|
||||
mavenBom "org.springframework.boot:spring-boot-dependencies:$springBootVersion"
|
||||
|
||||
Reference in New Issue
Block a user