parent
275d366bec
commit
d756bf4e86
|
|
@ -22,12 +22,12 @@ jobs:
|
||||||
- version: 17
|
- version: 17
|
||||||
toolchain: false
|
toolchain: false
|
||||||
- version: 21
|
- version: 21
|
||||||
toolchain: true
|
toolchain: false
|
||||||
- version: 22
|
- version: 22
|
||||||
toolchain: true
|
toolchain: false
|
||||||
- version: 23
|
- version: 23
|
||||||
early-access: true
|
early-access: true
|
||||||
toolchain: true
|
toolchain: false
|
||||||
exclude:
|
exclude:
|
||||||
- os:
|
- os:
|
||||||
name: Linux
|
name: Linux
|
||||||
|
|
|
||||||
|
|
@ -10,8 +10,11 @@ repositories {
|
||||||
gradlePluginPortal()
|
gradlePluginPortal()
|
||||||
}
|
}
|
||||||
|
|
||||||
sourceCompatibility = 17
|
java {
|
||||||
targetCompatibility = 17
|
sourceCompatibility = 17
|
||||||
|
targetCompatibility = 17
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
def versions = [:]
|
def versions = [:]
|
||||||
new File(projectDir.parentFile, "gradle.properties").withInputStream {
|
new File(projectDir.parentFile, "gradle.properties").withInputStream {
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,7 @@ class KotlinConventions {
|
||||||
void apply(Project project) {
|
void apply(Project project) {
|
||||||
project.getPlugins().withId("org.jetbrains.kotlin.jvm", (plugin) -> {
|
project.getPlugins().withId("org.jetbrains.kotlin.jvm", (plugin) -> {
|
||||||
project.getTasks().withType(KotlinCompile.class, this::configure);
|
project.getTasks().withType(KotlinCompile.class, this::configure);
|
||||||
configureDokkatoo(project);
|
project.getPlugins().withType(DokkatooHtmlPlugin.class, (dokkatooPlugin) -> configureDokkatoo(project));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -67,7 +67,6 @@ class KotlinConventions {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void configureDokkatoo(Project project) {
|
private void configureDokkatoo(Project project) {
|
||||||
project.getPlugins().apply(DokkatooHtmlPlugin.class);
|
|
||||||
DokkatooExtension dokkatoo = project.getExtensions().getByType(DokkatooExtension.class);
|
DokkatooExtension dokkatoo = project.getExtensions().getByType(DokkatooExtension.class);
|
||||||
dokkatoo.getDokkatooSourceSets().named(SourceSet.MAIN_SOURCE_SET_NAME).configure((sourceSet) -> {
|
dokkatoo.getDokkatooSourceSets().named(SourceSet.MAIN_SOURCE_SET_NAME).configure((sourceSet) -> {
|
||||||
sourceSet.getSourceRoots().setFrom(project.file("src/main/kotlin"));
|
sourceSet.getSourceRoots().setFrom(project.file("src/main/kotlin"));
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2012-2023 the original author or authors.
|
* Copyright 2012-2024 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|
@ -16,6 +16,7 @@
|
||||||
|
|
||||||
package org.springframework.boot.build.bom.bomr;
|
package org.springframework.boot.build.bom.bomr;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
@ -58,12 +59,17 @@ public final class InteractiveUpgradeResolver implements UpgradeResolver {
|
||||||
if (libraryWithVersionOptions.getVersionOptions().isEmpty()) {
|
if (libraryWithVersionOptions.getVersionOptions().isEmpty()) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
VersionOption current = new VersionOption(libraryWithVersionOptions.getLibrary().getVersion().getVersion());
|
VersionOption defaultOption = new VersionOption(
|
||||||
VersionOption selected = this.userInputHandler.selectOption(
|
libraryWithVersionOptions.getLibrary().getVersion().getVersion());
|
||||||
libraryWithVersionOptions.getLibrary().getName() + " "
|
VersionOption selected = this.userInputHandler.askUser((questions) -> {
|
||||||
+ libraryWithVersionOptions.getLibrary().getVersion().getVersion(),
|
String question = libraryWithVersionOptions.getLibrary().getName() + " "
|
||||||
libraryWithVersionOptions.getVersionOptions(), current);
|
+ libraryWithVersionOptions.getLibrary().getVersion().getVersion();
|
||||||
return (selected.equals(current)) ? null
|
List<VersionOption> options = new ArrayList<>();
|
||||||
|
options.add(defaultOption);
|
||||||
|
options.addAll(libraryWithVersionOptions.getVersionOptions());
|
||||||
|
return questions.selectOption(question, options, defaultOption);
|
||||||
|
}).get();
|
||||||
|
return (selected.equals(defaultOption)) ? null
|
||||||
: new Upgrade(libraryWithVersionOptions.getLibrary(), selected.getVersion());
|
: new Upgrade(libraryWithVersionOptions.getLibrary(), selected.getVersion());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -71,6 +71,8 @@ public class DockerTestPlugin implements Plugin<Project> {
|
||||||
.add(project.getConfigurations()
|
.add(project.getConfigurations()
|
||||||
.getByName(dockerTestSourceSet.getRuntimeClasspathConfigurationName())));
|
.getByName(dockerTestSourceSet.getRuntimeClasspathConfigurationName())));
|
||||||
});
|
});
|
||||||
|
project.getDependencies()
|
||||||
|
.add(dockerTestSourceSet.getRuntimeOnlyConfigurationName(), "org.junit.platform:junit-platform-launcher");
|
||||||
}
|
}
|
||||||
|
|
||||||
private SourceSet createSourceSet(Project project) {
|
private SourceSet createSourceSet(Project project) {
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright 2012-2023 the original author or authors.
|
* Copyright 2012-2024 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
|
|
@ -58,6 +58,8 @@ public class IntegrationTestPlugin implements Plugin<Project> {
|
||||||
eclipse.classpath((classpath) -> classpath.getPlusConfigurations()
|
eclipse.classpath((classpath) -> classpath.getPlusConfigurations()
|
||||||
.add(project.getConfigurations().getByName(intTestSourceSet.getRuntimeClasspathConfigurationName())));
|
.add(project.getConfigurations().getByName(intTestSourceSet.getRuntimeClasspathConfigurationName())));
|
||||||
});
|
});
|
||||||
|
project.getDependencies()
|
||||||
|
.add(intTestSourceSet.getRuntimeOnlyConfigurationName(), "org.junit.platform:junit-platform-launcher");
|
||||||
}
|
}
|
||||||
|
|
||||||
private SourceSet createSourceSet(Project project) {
|
private SourceSet createSourceSet(Project project) {
|
||||||
|
|
|
||||||
Binary file not shown.
|
|
@ -1,6 +1,6 @@
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.4-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.10-bin.zip
|
||||||
networkTimeout=10000
|
networkTimeout=10000
|
||||||
validateDistributionUrl=true
|
validateDistributionUrl=true
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,8 @@
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
#
|
#
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
#
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
#
|
#
|
||||||
|
|
@ -55,7 +57,7 @@
|
||||||
# Darwin, MinGW, and NonStop.
|
# Darwin, MinGW, and NonStop.
|
||||||
#
|
#
|
||||||
# (3) This script is generated from the Groovy template
|
# (3) This script is generated from the Groovy template
|
||||||
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||||
# within the Gradle project.
|
# within the Gradle project.
|
||||||
#
|
#
|
||||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||||
|
|
@ -84,7 +86,8 @@ done
|
||||||
# shellcheck disable=SC2034
|
# shellcheck disable=SC2034
|
||||||
APP_BASE_NAME=${0##*/}
|
APP_BASE_NAME=${0##*/}
|
||||||
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
||||||
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
|
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s
|
||||||
|
' "$PWD" ) || exit
|
||||||
|
|
||||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||||
MAX_FD=maximum
|
MAX_FD=maximum
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,8 @@
|
||||||
@rem See the License for the specific language governing permissions and
|
@rem See the License for the specific language governing permissions and
|
||||||
@rem limitations under the License.
|
@rem limitations under the License.
|
||||||
@rem
|
@rem
|
||||||
|
@rem SPDX-License-Identifier: Apache-2.0
|
||||||
|
@rem
|
||||||
|
|
||||||
@if "%DEBUG%"=="" @echo off
|
@if "%DEBUG%"=="" @echo off
|
||||||
@rem ##########################################################################
|
@rem ##########################################################################
|
||||||
|
|
|
||||||
|
|
@ -203,6 +203,8 @@ tasks.named("test") {
|
||||||
}
|
}
|
||||||
|
|
||||||
def documentationTest = tasks.register("documentationTest", Test) {
|
def documentationTest = tasks.register("documentationTest", Test) {
|
||||||
|
testClassesDirs = testing.suites.test.sources.output.classesDirs
|
||||||
|
classpath = testing.suites.test.sources.runtimeClasspath
|
||||||
jvmArgs += "--add-opens=java.base/java.net=ALL-UNNAMED"
|
jvmArgs += "--add-opens=java.base/java.net=ALL-UNNAMED"
|
||||||
filter {
|
filter {
|
||||||
includeTestsMatching("org.springframework.boot.actuate.autoconfigure.endpoint.web.documentation.*")
|
includeTestsMatching("org.springframework.boot.actuate.autoconfigure.endpoint.web.documentation.*")
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
plugins {
|
plugins {
|
||||||
|
id "dev.adamko.dokkatoo-html"
|
||||||
id "java"
|
id "java"
|
||||||
id "org.antora"
|
id "org.antora"
|
||||||
id "org.springframework.boot.conventions"
|
id "org.springframework.boot.conventions"
|
||||||
|
|
@ -43,7 +44,7 @@ sourcesJar {
|
||||||
}
|
}
|
||||||
|
|
||||||
plugins.withType(EclipsePlugin) {
|
plugins.withType(EclipsePlugin) {
|
||||||
extensions.getByType(org.gradle.plugins.ide.eclipse.model.EclipseModel).classpath { classpath ->
|
eclipse.classpath { classpath ->
|
||||||
classpath.plusConfigurations.add(configurations.getByName(sourceSets.main.runtimeClasspathConfigurationName))
|
classpath.plusConfigurations.add(configurations.getByName(sourceSets.main.runtimeClasspathConfigurationName))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
plugins {
|
plugins {
|
||||||
|
id "dev.adamko.dokkatoo-html"
|
||||||
id "java-library"
|
id "java-library"
|
||||||
id "org.jetbrains.kotlin.jvm"
|
id "org.jetbrains.kotlin.jvm"
|
||||||
id "org.springframework.boot.conventions"
|
id "org.springframework.boot.conventions"
|
||||||
|
|
|
||||||
|
|
@ -82,11 +82,11 @@ def configureArchive(archive) {
|
||||||
into "lib/"
|
into "lib/"
|
||||||
}
|
}
|
||||||
archive.from(file("src/main/content")) {
|
archive.from(file("src/main/content")) {
|
||||||
dirMode = 0755
|
dirPermissions { unix(0755) }
|
||||||
fileMode = 0644
|
filePermissions { unix(0644) }
|
||||||
}
|
}
|
||||||
archive.from(file("src/main/executablecontent")) {
|
archive.from(file("src/main/executablecontent")) {
|
||||||
fileMode = 0755
|
filePermissions { unix(0755) }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -140,10 +140,6 @@ artifacts {
|
||||||
antoraContent antoraGradlePluginCatalogContent
|
antoraContent antoraGradlePluginCatalogContent
|
||||||
}
|
}
|
||||||
|
|
||||||
toolchain {
|
|
||||||
maximumCompatibleJavaVersion = JavaLanguageVersion.of(20)
|
|
||||||
}
|
|
||||||
|
|
||||||
plugins.withType(EclipsePlugin) {
|
plugins.withType(EclipsePlugin) {
|
||||||
eclipse {
|
eclipse {
|
||||||
classpath.file { merger ->
|
classpath.file { merger ->
|
||||||
|
|
|
||||||
|
|
@ -19,10 +19,8 @@ package org.springframework.boot.gradle.plugin;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStreamReader;
|
import java.io.InputStreamReader;
|
||||||
import java.io.StringWriter;
|
import java.io.StringWriter;
|
||||||
import java.lang.reflect.Method;
|
|
||||||
import java.util.concurrent.Callable;
|
import java.util.concurrent.Callable;
|
||||||
|
|
||||||
import org.gradle.api.Action;
|
|
||||||
import org.gradle.api.GradleException;
|
import org.gradle.api.GradleException;
|
||||||
import org.gradle.api.Plugin;
|
import org.gradle.api.Plugin;
|
||||||
import org.gradle.api.Project;
|
import org.gradle.api.Project;
|
||||||
|
|
@ -128,32 +126,16 @@ final class ApplicationPluginAction implements PluginApplicationAction {
|
||||||
|
|
||||||
private void configureFilePermissions(CopySpec copySpec, int mode) {
|
private void configureFilePermissions(CopySpec copySpec, int mode) {
|
||||||
if (GradleVersion.current().compareTo(GradleVersion.version("8.3")) >= 0) {
|
if (GradleVersion.current().compareTo(GradleVersion.version("8.3")) >= 0) {
|
||||||
try {
|
copySpec.filePermissions((filePermissions) -> filePermissions.unix(Integer.toString(mode, 8)));
|
||||||
Method filePermissions = copySpec.getClass().getMethod("filePermissions", Action.class);
|
|
||||||
filePermissions.invoke(copySpec, new Action<>() {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void execute(Object filePermissions) {
|
|
||||||
String unixPermissions = Integer.toString(mode, 8);
|
|
||||||
try {
|
|
||||||
Method unix = filePermissions.getClass().getMethod("unix", String.class);
|
|
||||||
unix.invoke(filePermissions, unixPermissions);
|
|
||||||
}
|
|
||||||
catch (Exception ex) {
|
|
||||||
throw new GradleException("Failed to set file permissions to '" + unixPermissions + "'",
|
|
||||||
ex);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
});
|
|
||||||
}
|
|
||||||
catch (Exception ex) {
|
|
||||||
throw new GradleException("Failed to set file permissions", ex);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
copySpec.setFileMode(mode);
|
configureFileMode(copySpec, mode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
|
private void configureFileMode(CopySpec copySpec, int mode) {
|
||||||
|
copySpec.setFileMode(mode);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -26,9 +26,8 @@ import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.TreeMap;
|
import java.util.TreeMap;
|
||||||
import java.util.function.Function;
|
import java.util.function.Function;
|
||||||
import java.util.function.Supplier;
|
|
||||||
|
|
||||||
import org.gradle.api.GradleException;
|
import org.gradle.api.file.ConfigurableFilePermissions;
|
||||||
import org.gradle.api.file.CopySpec;
|
import org.gradle.api.file.CopySpec;
|
||||||
import org.gradle.api.file.FileCopyDetails;
|
import org.gradle.api.file.FileCopyDetails;
|
||||||
import org.gradle.api.file.FileTreeElement;
|
import org.gradle.api.file.FileTreeElement;
|
||||||
|
|
@ -133,8 +132,8 @@ class BootArchiveSupport {
|
||||||
File output = jar.getArchiveFile().get().getAsFile();
|
File output = jar.getArchiveFile().get().getAsFile();
|
||||||
Manifest manifest = jar.getManifest();
|
Manifest manifest = jar.getManifest();
|
||||||
boolean preserveFileTimestamps = jar.isPreserveFileTimestamps();
|
boolean preserveFileTimestamps = jar.isPreserveFileTimestamps();
|
||||||
Integer dirMode = getDirMode(jar);
|
Integer dirPermissions = getUnixNumericDirPermissions(jar);
|
||||||
Integer fileMode = getFileMode(jar);
|
Integer filePermissions = getUnixNumericFilePermissions(jar);
|
||||||
boolean includeDefaultLoader = isUsingDefaultLoader(jar);
|
boolean includeDefaultLoader = isUsingDefaultLoader(jar);
|
||||||
Spec<FileTreeElement> requiresUnpack = this.requiresUnpack.getAsSpec();
|
Spec<FileTreeElement> requiresUnpack = this.requiresUnpack.getAsSpec();
|
||||||
Spec<FileTreeElement> exclusions = this.exclusions.getAsExcludeSpec();
|
Spec<FileTreeElement> exclusions = this.exclusions.getAsExcludeSpec();
|
||||||
|
|
@ -142,35 +141,35 @@ class BootArchiveSupport {
|
||||||
Spec<FileCopyDetails> librarySpec = this.librarySpec;
|
Spec<FileCopyDetails> librarySpec = this.librarySpec;
|
||||||
Function<FileCopyDetails, ZipCompression> compressionResolver = this.compressionResolver;
|
Function<FileCopyDetails, ZipCompression> compressionResolver = this.compressionResolver;
|
||||||
String encoding = jar.getMetadataCharset();
|
String encoding = jar.getMetadataCharset();
|
||||||
CopyAction action = new BootZipCopyAction(output, manifest, preserveFileTimestamps, dirMode, fileMode,
|
CopyAction action = new BootZipCopyAction(output, manifest, preserveFileTimestamps, dirPermissions,
|
||||||
includeDefaultLoader, jarmodeToolsLocation, requiresUnpack, exclusions, launchScript, librarySpec,
|
filePermissions, includeDefaultLoader, jarmodeToolsLocation, requiresUnpack, exclusions, launchScript,
|
||||||
compressionResolver, encoding, resolvedDependencies, supportsSignatureFile, layerResolver,
|
librarySpec, compressionResolver, encoding, resolvedDependencies, supportsSignatureFile, layerResolver,
|
||||||
loaderImplementation);
|
loaderImplementation);
|
||||||
return jar.isReproducibleFileOrder() ? new ReproducibleOrderingCopyAction(action) : action;
|
return jar.isReproducibleFileOrder() ? new ReproducibleOrderingCopyAction(action) : action;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private Integer getUnixNumericDirPermissions(CopySpec copySpec) {
|
||||||
|
return (GradleVersion.current().compareTo(GradleVersion.version("8.3")) >= 0)
|
||||||
|
? asUnixNumeric(copySpec.getDirPermissions()) : getDirMode(copySpec);
|
||||||
|
}
|
||||||
|
|
||||||
|
private Integer getUnixNumericFilePermissions(CopySpec copySpec) {
|
||||||
|
return (GradleVersion.current().compareTo(GradleVersion.version("8.3")) >= 0)
|
||||||
|
? asUnixNumeric(copySpec.getFilePermissions()) : getFileMode(copySpec);
|
||||||
|
}
|
||||||
|
|
||||||
|
private Integer asUnixNumeric(Property<ConfigurableFilePermissions> permissions) {
|
||||||
|
return permissions.isPresent() ? permissions.get().toUnixNumeric() : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
private Integer getDirMode(CopySpec copySpec) {
|
private Integer getDirMode(CopySpec copySpec) {
|
||||||
return getMode(copySpec, "getDirPermissions", () -> copySpec.getDirMode());
|
return copySpec.getDirMode();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@SuppressWarnings("deprecation")
|
||||||
private Integer getFileMode(CopySpec copySpec) {
|
private Integer getFileMode(CopySpec copySpec) {
|
||||||
return getMode(copySpec, "getFilePermissions", () -> copySpec.getFileMode());
|
return copySpec.getFileMode();
|
||||||
}
|
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
|
||||||
private Integer getMode(CopySpec copySpec, String methodName, Supplier<Integer> fallback) {
|
|
||||||
if (GradleVersion.current().compareTo(GradleVersion.version("8.3")) >= 0) {
|
|
||||||
try {
|
|
||||||
Object filePermissions = ((Property<Object>) copySpec.getClass().getMethod(methodName).invoke(copySpec))
|
|
||||||
.getOrNull();
|
|
||||||
return (filePermissions != null)
|
|
||||||
? (int) filePermissions.getClass().getMethod("toUnixNumeric").invoke(filePermissions) : null;
|
|
||||||
}
|
|
||||||
catch (Exception ex) {
|
|
||||||
throw new GradleException("Failed to get permissions", ex);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return fallback.get();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean isUsingDefaultLoader(Jar jar) {
|
private boolean isUsingDefaultLoader(Jar jar) {
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,6 @@ import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
import java.io.OutputStreamWriter;
|
import java.io.OutputStreamWriter;
|
||||||
import java.lang.reflect.Method;
|
|
||||||
import java.time.OffsetDateTime;
|
import java.time.OffsetDateTime;
|
||||||
import java.time.ZoneOffset;
|
import java.time.ZoneOffset;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
|
@ -488,17 +487,12 @@ class BootZipCopyAction implements CopyAction {
|
||||||
}
|
}
|
||||||
|
|
||||||
private int getPermissions(FileCopyDetails details) {
|
private int getPermissions(FileCopyDetails details) {
|
||||||
if (GradleVersion.current().compareTo(GradleVersion.version("8.3")) >= 0) {
|
return (GradleVersion.current().compareTo(GradleVersion.version("8.3")) >= 0)
|
||||||
try {
|
? details.getPermissions().toUnixNumeric() : getMode(details);
|
||||||
Method getPermissionsMethod = details.getClass().getMethod("getPermissions");
|
}
|
||||||
getPermissionsMethod.setAccessible(true);
|
|
||||||
Object permissions = getPermissionsMethod.invoke(details);
|
@SuppressWarnings("deprecation")
|
||||||
return (int) permissions.getClass().getMethod("toUnixNumeric").invoke(permissions);
|
private int getMode(FileCopyDetails details) {
|
||||||
}
|
|
||||||
catch (Exception ex) {
|
|
||||||
throw new GradleException("Failed to get permissions", ex);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return details.getMode();
|
return details.getMode();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,7 @@ import java.io.File;
|
||||||
import org.gradle.api.JavaVersion;
|
import org.gradle.api.JavaVersion;
|
||||||
import org.gradle.api.Project;
|
import org.gradle.api.Project;
|
||||||
import org.gradle.internal.nativeintegration.services.NativeServices;
|
import org.gradle.internal.nativeintegration.services.NativeServices;
|
||||||
|
import org.gradle.internal.nativeintegration.services.NativeServices.NativeServicesMode;
|
||||||
import org.gradle.testfixtures.ProjectBuilder;
|
import org.gradle.testfixtures.ProjectBuilder;
|
||||||
import org.gradle.testfixtures.internal.ProjectBuilderImpl;
|
import org.gradle.testfixtures.internal.ProjectBuilderImpl;
|
||||||
|
|
||||||
|
|
@ -68,7 +69,7 @@ public final class GradleProjectBuilder {
|
||||||
builder.withName(this.name);
|
builder.withName(this.name);
|
||||||
}
|
}
|
||||||
if (JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_17)) {
|
if (JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_17)) {
|
||||||
NativeServices.initializeOnClient(userHome);
|
NativeServices.initializeOnClient(userHome, NativeServicesMode.ENABLED);
|
||||||
try {
|
try {
|
||||||
ProjectBuilderImpl.getGlobalServices();
|
ProjectBuilderImpl.getGlobalServices();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -82,7 +82,7 @@ class KotlinPluginActionIntegrationTests {
|
||||||
configured.add(line.substring("Configuring :".length()));
|
configured.add(line.substring("Configuring :".length()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
assertThat(configured).containsExactlyInAnyOrder("help", "clean");
|
assertThat(configured).containsExactlyInAnyOrder("help", "compileJava", "clean");
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -176,7 +176,7 @@ class BuildInfoTests {
|
||||||
Project project = GradleProjectBuilder.builder().withProjectDir(projectDir).withName(projectName).build();
|
Project project = GradleProjectBuilder.builder().withProjectDir(projectDir).withName(projectName).build();
|
||||||
((ProjectInternal) project).getServices()
|
((ProjectInternal) project).getServices()
|
||||||
.get(GradlePropertiesController.class)
|
.get(GradlePropertiesController.class)
|
||||||
.loadGradlePropertiesFrom(projectDir);
|
.loadGradlePropertiesFrom(projectDir, false);
|
||||||
return project;
|
return project;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -33,10 +33,16 @@ public final class GradleVersions {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static List<String> allCompatible() {
|
public static List<String> allCompatible() {
|
||||||
if (isJavaVersion(JavaVersion.VERSION_20)) {
|
if (isJavaVersion(JavaVersion.VERSION_23)) {
|
||||||
return Arrays.asList("8.3", "8.10");
|
return Arrays.asList(GradleVersion.current().getVersion());
|
||||||
}
|
}
|
||||||
return Arrays.asList(GradleVersion.current().getVersion(), "8.3", "8.10");
|
if (isJavaVersion(JavaVersion.VERSION_22)) {
|
||||||
|
return Arrays.asList("8.8", GradleVersion.current().getVersion());
|
||||||
|
}
|
||||||
|
if (isJavaVersion(JavaVersion.VERSION_21)) {
|
||||||
|
return Arrays.asList("8.5", GradleVersion.current().getVersion());
|
||||||
|
}
|
||||||
|
return Arrays.asList("7.6.4", "8.3", GradleVersion.current().getVersion());
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String minimumCompatible() {
|
public static String minimumCompatible() {
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
plugins {
|
plugins {
|
||||||
|
id "dev.adamko.dokkatoo-html"
|
||||||
id "java-library"
|
id "java-library"
|
||||||
id "org.jetbrains.kotlin.jvm"
|
id "org.jetbrains.kotlin.jvm"
|
||||||
id "org.springframework.boot.conventions"
|
id "org.springframework.boot.conventions"
|
||||||
|
|
|
||||||
|
|
@ -59,27 +59,32 @@ dependencies {
|
||||||
def testCaffeine = tasks.register("testCaffeine", Test) {
|
def testCaffeine = tasks.register("testCaffeine", Test) {
|
||||||
description = "Runs the tests against Caffeine"
|
description = "Runs the tests against Caffeine"
|
||||||
classpath = sourceSets.test.runtimeClasspath + configurations.caffeine
|
classpath = sourceSets.test.runtimeClasspath + configurations.caffeine
|
||||||
|
testClassesDirs = testing.suites.test.sources.output.classesDirs
|
||||||
}
|
}
|
||||||
|
|
||||||
def testCouchbase = tasks.register("testCouchbase", Test) {
|
def testCouchbase = tasks.register("testCouchbase", Test) {
|
||||||
description = "Runs the tests against Couchbase"
|
description = "Runs the tests against Couchbase"
|
||||||
classpath = sourceSets.test.runtimeClasspath + configurations.couchbase
|
classpath = sourceSets.test.runtimeClasspath + configurations.couchbase
|
||||||
|
testClassesDirs = testing.suites.test.sources.output.classesDirs
|
||||||
}
|
}
|
||||||
|
|
||||||
def testEhcache = tasks.register("testEhcache", Test) {
|
def testEhcache = tasks.register("testEhcache", Test) {
|
||||||
description = "Runs the tests against Ehcache"
|
description = "Runs the tests against Ehcache"
|
||||||
classpath = sourceSets.test.runtimeClasspath + configurations.ehcache
|
classpath = sourceSets.test.runtimeClasspath + configurations.ehcache
|
||||||
|
testClassesDirs = testing.suites.test.sources.output.classesDirs
|
||||||
systemProperties = ["spring.cache.jcache.config" : "classpath:ehcache3.xml"]
|
systemProperties = ["spring.cache.jcache.config" : "classpath:ehcache3.xml"]
|
||||||
}
|
}
|
||||||
|
|
||||||
def testHazelcast = tasks.register("testHazelcast", Test) {
|
def testHazelcast = tasks.register("testHazelcast", Test) {
|
||||||
description = "Runs the tests against Hazelcast"
|
description = "Runs the tests against Hazelcast"
|
||||||
classpath = sourceSets.test.runtimeClasspath + configurations.hazelcast
|
classpath = sourceSets.test.runtimeClasspath + configurations.hazelcast
|
||||||
|
testClassesDirs = testing.suites.test.sources.output.classesDirs
|
||||||
}
|
}
|
||||||
|
|
||||||
def testInfinispan = tasks.register("testInfinispan", Test) {
|
def testInfinispan = tasks.register("testInfinispan", Test) {
|
||||||
description = "Runs the tests against Infinispan"
|
description = "Runs the tests against Infinispan"
|
||||||
classpath = sourceSets.test.runtimeClasspath + configurations.infinispan
|
classpath = sourceSets.test.runtimeClasspath + configurations.infinispan
|
||||||
|
testClassesDirs = testing.suites.test.sources.output.classesDirs
|
||||||
systemProperties = ["spring.cache.jcache.config" : "classpath:infinispan.xml"]
|
systemProperties = ["spring.cache.jcache.config" : "classpath:infinispan.xml"]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue