"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "buildSrc/src/main/java/org/springframework/boot/build/toolchain/ToolchainPlugin.java" between
spring-boot-2.7.3.tar.gz and spring-boot-2.7.4.tar.gz

About: Spring Boot helps to create Spring-powered, production-grade applications and services.

ToolchainPlugin.java  (spring-boot-2.7.3):ToolchainPlugin.java  (spring-boot-2.7.4)
skipping to change at line 26 skipping to change at line 26
package org.springframework.boot.build.toolchain; package org.springframework.boot.build.toolchain;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;
import org.gradle.api.Plugin; import org.gradle.api.Plugin;
import org.gradle.api.Project; import org.gradle.api.Project;
import org.gradle.api.plugins.JavaPluginExtension; import org.gradle.api.plugins.JavaPluginExtension;
import org.gradle.api.tasks.compile.JavaCompile;
import org.gradle.api.tasks.javadoc.Javadoc;
import org.gradle.api.tasks.testing.Test; import org.gradle.api.tasks.testing.Test;
import org.gradle.jvm.toolchain.JavaLanguageVersion; import org.gradle.jvm.toolchain.JavaLanguageVersion;
import org.gradle.jvm.toolchain.JavaToolchainSpec; import org.gradle.jvm.toolchain.JavaToolchainSpec;
/** /**
* {@link Plugin} for customizing Gradle's toolchain support. * {@link Plugin} for customizing Gradle's toolchain support.
* *
* @author Christoph Dreis * @author Christoph Dreis
*/ */
public class ToolchainPlugin implements Plugin<Project> { public class ToolchainPlugin implements Plugin<Project> {
skipping to change at line 70 skipping to change at line 68
configureTestToolchain(project, toolchain); configureTestToolchain(project, toolchain);
} }
} }
private boolean isJavaVersionSupported(ToolchainExtension toolchain, Java LanguageVersion toolchainVersion) { private boolean isJavaVersionSupported(ToolchainExtension toolchain, Java LanguageVersion toolchainVersion) {
return toolchain.getMaximumCompatibleJavaVersion().map((version) -> version.canCompileOrRun(toolchainVersion)) return toolchain.getMaximumCompatibleJavaVersion().map((version) -> version.canCompileOrRun(toolchainVersion))
.getOrElse(true); .getOrElse(true);
} }
private void disableToolchainTasks(Project project) { private void disableToolchainTasks(Project project) {
project.getTasks().withType(JavaCompile.class, (task) -> task.set
Enabled(false));
project.getTasks().withType(Javadoc.class, (task) -> task.setEnab
led(false));
project.getTasks().withType(Test.class, (task) -> task.setEnabled (false)); project.getTasks().withType(Test.class, (task) -> task.setEnabled (false));
} }
private void configureTestToolchain(Project project, ToolchainExtension t oolchain) { private void configureTestToolchain(Project project, ToolchainExtension t oolchain) {
List<String> jvmArgs = new ArrayList<>(); List<String> jvmArgs = new ArrayList<>();
jvmArgs.addAll(toolchain.getTestJvmArgs().getOrElse(Collections.e mptyList())); jvmArgs.addAll(toolchain.getTestJvmArgs().getOrElse(Collections.e mptyList()));
project.getTasks().withType(Test.class, (test) -> test.jvmArgs(jv mArgs)); project.getTasks().withType(Test.class, (test) -> test.jvmArgs(jv mArgs));
} }
} }
 End of changes. 2 change blocks. 
6 lines changed or deleted 0 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)