Add testAndDevelopmentOnly configuration

Closes gh-35436
This commit is contained in:
Andy Wilkinson
2023-09-28 13:23:48 +01:00
parent b52a781f7b
commit bebca55a8f
33 changed files with 587 additions and 24 deletions

View File

@@ -18,9 +18,10 @@ When Gradle's {java-plugin}[`java` plugin] is applied to a project, the Spring B
6. Creates a {boot-run-javadoc}['BootRun`] task named `bootTestRun` that can be used to run your application using the `test` source set to find its main method and provide its runtime classpath.
7. Creates a configuration named `bootArchives` that contains the artifact produced by the `bootJar` task.
8. Creates a configuration named `developmentOnly` for dependencies that are only required at development time, such as Spring Boot's Devtools, and should not be packaged in executable jars and wars.
9. Creates a configuration named `productionRuntimeClasspath`. It is equivalent to `runtimeClasspath` minus any dependencies that only appear in the `developmentOnly` configuration.
10. Configures any `JavaCompile` tasks with no configured encoding to use `UTF-8`.
11. Configures any `JavaCompile` tasks to use the `-parameters` compiler argument.
9. Creats a configuration named `testAndDevelopmentOnly` for dependencies that are only required at development time and when writing and running tests and that should not be packaged in executable jars and wars.
10. Creates a configuration named `productionRuntimeClasspath`. It is equivalent to `runtimeClasspath` minus any dependencies that only appear in the `developmentOnly` or `testDevelopmentOnly` configurations.
11. Configures any `JavaCompile` tasks with no configured encoding to use `UTF-8`.
12. Configures any `JavaCompile` tasks to use the `-parameters` compiler argument.