Merge branch '3.3.x'
Closes gh-43649 in 3.4.x Closes gh-43651
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
maven { url 'https://repo.spring.io/libs-snapshot' }
|
||||
maven {
|
||||
url = 'https://repo.spring.io/libs-snapshot'
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
pluginManagement {
|
||||
repositories {
|
||||
maven { url 'https://repo.spring.io/milestone' }
|
||||
maven {
|
||||
url = 'https://repo.spring.io/milestone'
|
||||
}
|
||||
gradlePluginPortal()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
pluginManagement {
|
||||
repositories {
|
||||
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'
|
||||
}
|
||||
gradlePluginPortal()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,8 +8,9 @@ apply(plugin = "io.spring.dependency-management")
|
||||
// end::apply[]
|
||||
|
||||
tasks.register("verify") {
|
||||
val plugins = project.plugins
|
||||
doLast {
|
||||
project.plugins.getPlugin(JavaPlugin::class)
|
||||
project.plugins.getPlugin(io.spring.gradle.dependencymanagement.DependencyManagementPlugin::class)
|
||||
plugins.getPlugin(JavaPlugin::class)
|
||||
plugins.getPlugin(io.spring.gradle.dependencymanagement.DependencyManagementPlugin::class)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,5 +24,7 @@ dependencyManagement {
|
||||
}
|
||||
|
||||
repositories {
|
||||
maven { url 'repository' }
|
||||
maven {
|
||||
url = 'repository'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,9 @@ dependencies {
|
||||
}
|
||||
|
||||
repositories {
|
||||
maven { url 'repository' }
|
||||
maven {
|
||||
url = 'repository'
|
||||
}
|
||||
}
|
||||
|
||||
configurations.all {
|
||||
|
||||
@@ -9,7 +9,9 @@ dependencies {
|
||||
}
|
||||
|
||||
repositories {
|
||||
maven { url 'repository' }
|
||||
maven {
|
||||
url = 'repository'
|
||||
}
|
||||
}
|
||||
|
||||
configurations.all {
|
||||
|
||||
@@ -19,7 +19,9 @@ ext['slf4j.version'] = '1.7.20'
|
||||
// end::custom-version[]
|
||||
|
||||
repositories {
|
||||
maven { url 'repository' }
|
||||
maven {
|
||||
url = 'repository'
|
||||
}
|
||||
}
|
||||
|
||||
task slf4jVersion {
|
||||
|
||||
@@ -27,7 +27,8 @@ the<DependencyManagementExtension>().apply {
|
||||
}
|
||||
|
||||
tasks.register("slf4jVersion") {
|
||||
val dependencyManagement = project.the<DependencyManagementExtension>()
|
||||
doLast {
|
||||
println(project.the<DependencyManagementExtension>().managedVersions["org.slf4j:slf4j-api"])
|
||||
println(dependencyManagement.managedVersions["org.slf4j:slf4j-api"])
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
maven { url 'https://repo.spring.io/libs-milestone' }
|
||||
maven {
|
||||
url = 'https://repo.spring.io/libs-milestone'
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
buildscript {
|
||||
repositories {
|
||||
maven { url 'https://repo.spring.io/libs-snapshot' }
|
||||
maven {
|
||||
url = 'https://repo.spring.io/libs-snapshot'
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
@@ -13,7 +13,7 @@ publishing {
|
||||
}
|
||||
repositories {
|
||||
maven {
|
||||
url 'https://repo.example.com'
|
||||
url = 'https://repo.example.com'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2024 the original author or authors.
|
||||
* Copyright 2012-2025 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -181,7 +181,7 @@ class BuildInfoTests {
|
||||
}
|
||||
|
||||
private BuildInfo createTask(Project project) {
|
||||
return project.getTasks().create("testBuildInfo", BuildInfo.class);
|
||||
return project.getTasks().register("testBuildInfo", BuildInfo.class).get();
|
||||
}
|
||||
|
||||
private Properties buildInfoProperties(BuildInfo task) {
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2024 the original author or authors.
|
||||
* Copyright 2012-2025 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -116,7 +116,7 @@ abstract class AbstractBootArchiveTests<T extends Jar & BootArchive> {
|
||||
projectDir.mkdirs();
|
||||
this.project = GradleProjectBuilder.builder().withProjectDir(projectDir).build();
|
||||
this.project.setDescription("Test project for " + this.taskClass.getSimpleName());
|
||||
this.task = configure(this.project.getTasks().create("testArchive", this.taskClass));
|
||||
this.task = this.project.getTasks().register("testArchive", this.taskClass, this::configure).get();
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2024 the original author or authors.
|
||||
* Copyright 2012-2025 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -58,7 +58,7 @@ class BootBuildImageTests {
|
||||
projectDir.mkdirs();
|
||||
this.project = GradleProjectBuilder.builder().withProjectDir(projectDir).withName("build-image-test").build();
|
||||
this.project.setDescription("Test project for BootBuildImage");
|
||||
this.buildImage = this.project.getTasks().create("buildImage", BootBuildImage.class);
|
||||
this.buildImage = this.project.getTasks().register("buildImage", BootBuildImage.class).get();
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
@@ -16,9 +16,9 @@ task('taskExists') {
|
||||
}
|
||||
|
||||
task('distributionExists') {
|
||||
def distributions = project.extensions.findByType(DistributionContainer)
|
||||
doFirst {
|
||||
boolean found = project.hasProperty('distributions') &&
|
||||
distributions.findByName(distributionName) != null
|
||||
boolean found = distributions != null && distributions.findByName(distributionName) != null
|
||||
println "${distributionName} exists = ${found}"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,12 +17,15 @@ if (project.hasProperty('applyDependencyManagementPlugin')) {
|
||||
}
|
||||
|
||||
repositories {
|
||||
maven { url 'repository' }
|
||||
maven {
|
||||
url = 'repository'
|
||||
}
|
||||
}
|
||||
|
||||
task doesNotHaveDependencyManagement {
|
||||
def extensions = project.extensions
|
||||
doLast {
|
||||
if (project.extensions.findByName('dependencyManagement') != null) {
|
||||
if (extensions.findByName('dependencyManagement') != null) {
|
||||
throw new GradleException('Found dependency management extension')
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,9 @@ dependencyManagement {
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven { url 'repository' }
|
||||
maven {
|
||||
url = 'repository'
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
@@ -25,8 +27,9 @@ dependencies {
|
||||
}
|
||||
|
||||
task kotlinVersion {
|
||||
def properties = project.properties
|
||||
doLast {
|
||||
def kotlinVersion = project.hasProperty('kotlin.version') ? project.getProperty('kotlin.version') : 'none'
|
||||
def kotlinVersion = properties.getOrDefault('kotlin.version', 'none')
|
||||
println "Kotlin version: ${kotlinVersion}"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,8 +3,9 @@ plugins {
|
||||
}
|
||||
|
||||
task kotlinVersion {
|
||||
def properties = project.properties
|
||||
doLast {
|
||||
def kotlinVersion = project.hasProperty('kotlin.version') ? project.getProperty('kotlin.version') : 'none'
|
||||
def kotlinVersion = properties.getOrDefault('kotlin.version', 'none')
|
||||
println "Kotlin version: ${kotlinVersion}"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,7 +6,9 @@ plugins {
|
||||
apply plugin: 'io.spring.dependency-management'
|
||||
|
||||
repositories {
|
||||
maven { url 'repository' }
|
||||
maven {
|
||||
url = 'repository'
|
||||
}
|
||||
}
|
||||
|
||||
dependencyManagement {
|
||||
|
||||
@@ -7,7 +7,9 @@ apply plugin: 'org.springframework.boot.aot'
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven { url 'repository' }
|
||||
maven {
|
||||
url = 'repository'
|
||||
}
|
||||
}
|
||||
|
||||
configurations.all {
|
||||
|
||||
@@ -6,7 +6,9 @@ plugins {
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven { url 'repository' }
|
||||
maven {
|
||||
url = 'repository'
|
||||
}
|
||||
}
|
||||
|
||||
configurations.all {
|
||||
|
||||
@@ -7,7 +7,9 @@ apply plugin: 'org.springframework.boot.aot'
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven { url 'repository' }
|
||||
maven {
|
||||
url = 'repository'
|
||||
}
|
||||
}
|
||||
|
||||
configurations.all {
|
||||
|
||||
@@ -6,7 +6,9 @@ plugins {
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven { url 'repository' }
|
||||
maven {
|
||||
url = 'repository'
|
||||
}
|
||||
}
|
||||
|
||||
configurations.all {
|
||||
|
||||
@@ -27,7 +27,9 @@ bootJar {
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven { url 'repository' }
|
||||
maven {
|
||||
url = 'repository'
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
@@ -5,7 +5,9 @@ plugins {
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven { url 'repository' }
|
||||
maven {
|
||||
url = 'repository'
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
@@ -9,7 +9,9 @@ bootJar {
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven { url 'repository' }
|
||||
maven {
|
||||
url = 'repository'
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
@@ -13,7 +13,9 @@ bootJar {
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven { url 'repository' }
|
||||
maven {
|
||||
url = 'repository'
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
@@ -42,7 +42,9 @@ bootJar {
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven { url 'repository' }
|
||||
maven {
|
||||
url = 'repository'
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
@@ -20,7 +20,9 @@ bootJar {
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven { url 'repository' }
|
||||
maven {
|
||||
url = 'repository'
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
@@ -10,7 +10,9 @@ task launch(type: JavaExec) {
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven { url 'repository' }
|
||||
maven {
|
||||
url = 'repository'
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
@@ -9,7 +9,9 @@ bootJar {
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven { url 'repository' }
|
||||
maven {
|
||||
url = 'repository'
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
@@ -28,7 +28,9 @@ bootWar {
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven { url 'repository' }
|
||||
maven {
|
||||
url = 'repository'
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
@@ -10,7 +10,9 @@ bootWar {
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven { url 'repository' }
|
||||
maven {
|
||||
url = 'repository'
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
@@ -14,7 +14,9 @@ bootWar {
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven { url 'repository' }
|
||||
maven {
|
||||
url = 'repository'
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
@@ -43,7 +43,9 @@ bootWar {
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven { url 'repository' }
|
||||
maven {
|
||||
url = 'repository'
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
@@ -21,7 +21,9 @@ bootWar {
|
||||
|
||||
repositories {
|
||||
mavenCentral()
|
||||
maven { url 'repository' }
|
||||
maven {
|
||||
url = 'repository'
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
Reference in New Issue
Block a user