Skip to content

Update gradle to 8.6 #1535

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 9 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions buildSrc/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@ plugins {
id "groovy"
}

sourceCompatibility = JavaVersion.VERSION_17
java {
sourceCompatibility = JavaVersion.VERSION_17
}

repositories {
gradlePluginPortal()
Expand All @@ -14,14 +16,14 @@ repositories {

dependencies {
implementation "com.github.ben-manes:gradle-versions-plugin:0.38.0"
implementation "io.github.gradle-nexus:publish-plugin:1.1.0"
implementation "io.spring.javaformat:spring-javaformat-gradle-plugin:0.0.31"
implementation "io.spring.nohttp:nohttp-gradle:0.0.10"
implementation "io.github.gradle-nexus:publish-plugin:2.0.0-rc-2"
implementation "io.spring.javaformat:spring-javaformat-gradle-plugin:0.0.41"
implementation "io.spring.nohttp:nohttp-gradle:0.0.11"
implementation "org.asciidoctor:asciidoctor-gradle-jvm:3.3.2"
implementation "org.asciidoctor:asciidoctor-gradle-jvm-pdf:3.3.2"
implementation "org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.10"
implementation "org.hidetake:gradle-ssh-plugin:2.10.1"
implementation "org.jfrog.buildinfo:build-info-extractor-gradle:4.29.0"
implementation "org.jfrog.buildinfo:build-info-extractor-gradle:5.2.0"
implementation "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.7.1"
implementation "org.springframework:spring-core:6.0.11"
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@
public class SpringJavaCheckstylePlugin implements Plugin<Project> {
private static final String CHECKSTYLE_DIR = "etc/checkstyle";
private static final String SPRING_JAVAFORMAT_VERSION_PROPERTY = "springJavaformatVersion";
private static final String DEFAULT_SPRING_JAVAFORMAT_VERSION = "0.0.31";
private static final String DEFAULT_SPRING_JAVAFORMAT_VERSION = "0.0.41";
private static final String NOHTTP_CHECKSTYLE_VERSION_PROPERTY = "nohttpCheckstyleVersion";
private static final String DEFAULT_NOHTTP_CHECKSTYLE_VERSION = "0.0.10";
private static final String DEFAULT_NOHTTP_CHECKSTYLE_VERSION = "0.0.11";
private static final String CHECKSTYLE_TOOL_VERSION_PROPERTY = "checkstyleToolVersion";
private static final String DEFAULT_CHECKSTYLE_TOOL_VERSION = "8.34";
private static final String SPRING_JAVAFORMAT_EXCLUDE_PACKAGES_PROPERTY = "springJavaformatExcludePackages";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,25 +36,22 @@ public void apply(Project project) {
// Apply artifactory repository configuration
boolean isSnapshot = ProjectUtils.isSnapshot(project);
boolean isMilestone = ProjectUtils.isMilestone(project);
String artifactoryUsername = (String) project.findProperty("artifactoryUsername");
String artifactoryPassword = (String) project.findProperty("artifactoryPassword");

@SuppressWarnings("deprecation")
ArtifactoryPluginConvention artifactoryExtension = project.getConvention().getPlugin(ArtifactoryPluginConvention.class);
artifactoryExtension.artifactory((artifactory) -> {
artifactory.setContextUrl("https://repo.spring.io");
artifactory.publish((publish) -> {
publish.repository((repository) -> {
String repoKey = isSnapshot ? "libs-snapshot-local" : isMilestone ? "libs-milestone-local" : "libs-release-local";
repository.setRepoKey(repoKey);
if (project.hasProperty("artifactoryUsername")) {
repository.setUsername(project.findProperty("artifactoryUsername"));
repository.setPassword(project.findProperty("artifactoryPassword"));
}
});
// Would fail if maven publish is not applied, i.e. in root project (SpringRootProjectPlugin)
project.getPlugins().withType(MavenPublishPlugin.class, mavenPublish -> {
publish.defaults((defaults) -> defaults.publications("mavenJava"));
});
ArtifactoryPluginConvention artifactoryExtension = project.getExtensions().getByType(ArtifactoryPluginConvention.class);
artifactoryExtension.publish((publish) -> {
publish.setContextUrl("https://repo.spring.io");
publish.repository((repository) -> {
String repoKey = isSnapshot ? "libs-snapshot-local" : isMilestone ? "libs-milestone-local" : "libs-release-local";
repository.setRepoKey(repoKey);
if (project.hasProperty("artifactoryUsername")) {
repository.setUsername(artifactoryUsername);
repository.setPassword(artifactoryPassword);
}
});
// Would fail if maven publish is not applied, i.e. in root project (SpringRootProjectPlugin)
project.getPlugins().withType(MavenPublishPlugin.class, mavenPublish -> publish.defaults((defaults) -> defaults.publications("mavenJava")));
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public void apply(Project project) {
PublishingExtension publishing = project.getExtensions().getByType(PublishingExtension.class);
publishing.getRepositories().maven((maven) -> {
maven.setName("local");
maven.setUrl(new File(project.getRootProject().getBuildDir(), "publications/repos"));
maven.setUrl(new File(project.getRootProject().getLayout().getBuildDirectory().getAsFile().get(), "publications/repos"));
});
});
}
Expand Down
5 changes: 4 additions & 1 deletion docs/spring-authorization-server-docs.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ plugins {

group = project.rootProject.group
version = project.rootProject.version
sourceCompatibility = "17"

java {
sourceCompatibility = JavaVersion.VERSION_17
}

antora {
playbook = "cached-antora-playbook.yml"
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ org.gradle.parallel=true
org.gradle.caching=true
springFrameworkVersion=6.1.3
springSecurityVersion=6.3.0-M1
springJavaformatVersion=0.0.38
springJavaformatVersion=0.0.41
springJavaformatExcludePackages=org/springframework/security/config org/springframework/security/oauth2
checkstyleToolVersion=8.34
nohttpCheckstyleVersion=0.0.11
Expand Down
Binary file modified gradle/wrapper/gradle-wrapper.jar
Binary file not shown.
4 changes: 3 additions & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading