mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-08-29 03:06:45 +08:00
Merge branch '2.3.x' into 2.4.x
Closes gh-26302
This commit is contained in:
commit
4abd6b1387
@ -30,6 +30,7 @@ import java.util.Set;
|
|||||||
import java.util.TreeMap;
|
import java.util.TreeMap;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
import io.spring.javaformat.gradle.CheckTask;
|
||||||
import io.spring.javaformat.gradle.FormatTask;
|
import io.spring.javaformat.gradle.FormatTask;
|
||||||
import io.spring.javaformat.gradle.SpringJavaFormatPlugin;
|
import io.spring.javaformat.gradle.SpringJavaFormatPlugin;
|
||||||
import org.gradle.api.Action;
|
import org.gradle.api.Action;
|
||||||
@ -42,6 +43,7 @@ import org.gradle.api.artifacts.Dependency;
|
|||||||
import org.gradle.api.artifacts.DependencySet;
|
import org.gradle.api.artifacts.DependencySet;
|
||||||
import org.gradle.api.plugins.JavaBasePlugin;
|
import org.gradle.api.plugins.JavaBasePlugin;
|
||||||
import org.gradle.api.plugins.JavaPlugin;
|
import org.gradle.api.plugins.JavaPlugin;
|
||||||
|
import org.gradle.api.plugins.quality.Checkstyle;
|
||||||
import org.gradle.api.plugins.quality.CheckstyleExtension;
|
import org.gradle.api.plugins.quality.CheckstyleExtension;
|
||||||
import org.gradle.api.plugins.quality.CheckstylePlugin;
|
import org.gradle.api.plugins.quality.CheckstylePlugin;
|
||||||
import org.gradle.api.tasks.SourceSet;
|
import org.gradle.api.tasks.SourceSet;
|
||||||
@ -66,7 +68,12 @@ import org.springframework.boot.build.toolchain.ToolchainPlugin;
|
|||||||
* <li>{@link SpringJavaFormatPlugin Spring Java Format}, {@link CheckstylePlugin
|
* <li>{@link SpringJavaFormatPlugin Spring Java Format}, {@link CheckstylePlugin
|
||||||
* Checkstyle}, {@link TestFailuresPlugin Test Failures}, and {@link TestRetryPlugin Test
|
* Checkstyle}, {@link TestFailuresPlugin Test Failures}, and {@link TestRetryPlugin Test
|
||||||
* Retry} plugins are applied
|
* Retry} plugins are applied
|
||||||
* <li>{@link Test} tasks are configured to use JUnit Platform and use a max heap of 1024M
|
* <li>{@link Test} tasks are configured:
|
||||||
|
* <ul>
|
||||||
|
* <li>to use JUnit Platform
|
||||||
|
* <li>with a max heap of 1024M
|
||||||
|
* <li>to run after any Checkstyle and format checking tasks
|
||||||
|
* </ul>
|
||||||
* <li>A {@code testRuntimeOnly} dependency upon
|
* <li>A {@code testRuntimeOnly} dependency upon
|
||||||
* {@code org.junit.platform:junit-platform-launcher} is added to projects with the
|
* {@code org.junit.platform:junit-platform-launcher} is added to projects with the
|
||||||
* {@link JavaPlugin} applied
|
* {@link JavaPlugin} applied
|
||||||
@ -162,6 +169,8 @@ class JavaConventions {
|
|||||||
"file:" + test.getWorkingDir().toPath().relativize(copyJdk8156584SecurityProperties.output));
|
"file:" + test.getWorkingDir().toPath().relativize(copyJdk8156584SecurityProperties.output));
|
||||||
test.doFirst(copyJdk8156584SecurityProperties);
|
test.doFirst(copyJdk8156584SecurityProperties);
|
||||||
}
|
}
|
||||||
|
project.getTasks().withType(Checkstyle.class, (checkstyle) -> test.mustRunAfter(checkstyle));
|
||||||
|
project.getTasks().withType(CheckTask.class, (checkFormat) -> test.mustRunAfter(checkFormat));
|
||||||
});
|
});
|
||||||
project.getPlugins().withType(JavaPlugin.class, (javaPlugin) -> project.getDependencies()
|
project.getPlugins().withType(JavaPlugin.class, (javaPlugin) -> project.getDependencies()
|
||||||
.add(JavaPlugin.TEST_RUNTIME_ONLY_CONFIGURATION_NAME, "org.junit.platform:junit-platform-launcher"));
|
.add(JavaPlugin.TEST_RUNTIME_ONLY_CONFIGURATION_NAME, "org.junit.platform:junit-platform-launcher"));
|
||||||
|
Loading…
Reference in New Issue
Block a user