-
Notifications
You must be signed in to change notification settings - Fork 646
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Unix Domain Sockets support on NIO transport
Add multi-release jar support
- Loading branch information
Showing
28 changed files
with
460 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
/* | ||
* Copyright (c) 2024 VMware, Inc. or its affiliates, All Rights Reserved. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* https://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
/** | ||
* Copied from https://github.com/spring-projects/spring-framework/blob/main/gradle/toolchains.gradle | ||
*/ | ||
/** | ||
* Apply the JVM Toolchain conventions | ||
* See https://docs.gradle.org/current/userguide/toolchains.html | ||
* | ||
* One can choose the toolchain to use for compiling and running the TEST sources. | ||
* These options apply to Java, Kotlin and Groovy test sources when available. | ||
* {@code "./gradlew check -PtestToolchain=22"} will use a JDK22 | ||
* toolchain for compiling and running the test SourceSet. | ||
* | ||
* By default, the main build will fall back to using the a JDK 17 | ||
* toolchain (and 17 language level) for all main sourceSets. | ||
* See {@link org.springframework.build.JavaConventions}. | ||
* | ||
* Gradle will automatically detect JDK distributions in well-known locations. | ||
* The following command will list the detected JDKs on the host. | ||
* {@code | ||
* $ ./gradlew -q javaToolchains | ||
* } | ||
* | ||
* We can also configure ENV variables and let Gradle know about them: | ||
* {@code | ||
* $ echo JDK17 | ||
* /opt/openjdk/java17 | ||
* $ echo JDK22 | ||
* /opt/openjdk/java22 | ||
* $ ./gradlew -Porg.gradle.java.installations.fromEnv=JDK17,JDK22 check | ||
* } | ||
* | ||
* @author Brian Clozel | ||
* @author Sam Brannen | ||
*/ | ||
|
||
def testToolchainConfigured() { | ||
return project.hasProperty('testToolchain') && project.testToolchain | ||
} | ||
|
||
def testToolchainLanguageVersion() { | ||
if (testToolchainConfigured()) { | ||
return JavaLanguageVersion.of(project.testToolchain.toString()) | ||
} | ||
return JavaLanguageVersion.of(8) | ||
} | ||
|
||
plugins.withType(JavaPlugin).configureEach { | ||
// Configure a specific Java Toolchain for compiling and running tests if the 'testToolchain' property is defined | ||
if (testToolchainConfigured()) { | ||
def testLanguageVersion = testToolchainLanguageVersion() | ||
tasks.withType(JavaCompile).matching { it.name.contains("Test") }.configureEach { | ||
javaCompiler = javaToolchains.compilerFor { | ||
languageVersion = testLanguageVersion | ||
} | ||
} | ||
tasks.withType(Test).configureEach{ | ||
javaLauncher = javaToolchains.launcherFor { | ||
languageVersion = testLanguageVersion | ||
if (testLanguageVersion.canCompileOrRun(JavaLanguageVersion.of(17))) { | ||
jvmArgs = ["-XX:+AllowRedefinitionToAddDeleteMethods"] | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.