spring-projects / spring-boot

Spring Boot helps you to create Spring-powered, production-grade applications and services with absolute minimum fuss.
https://spring.io/projects/spring-boot
Apache License 2.0
75.17k stars 40.68k forks source link

Add a testAndDevelopmentOnly Gradle configuration #35436

Closed philwebb closed 1 year ago

philwebb commented 1 year ago

@RestartScope is useful when working with testcontainers but with gradle we usually recommend that devtools is added to the developmentOnly configuration. It looks like this means it isn't available for tests.

We can add a new testAndDevelopmentOnly configuration similar to JavaPluginAction.configureDevelopmentOnlyConfiguration where JavaPlugin.TEST_RUNTIME_CLASSPATH_CONFIGURATION_NAME extends from developmentOnly?

mhalbritter commented 1 year ago

When we change this, we have to update the documentation, too.

candrews commented 11 months ago

When we change this, we have to update the documentation, too.

This change hasn't yet been made: https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#features.testcontainers.at-development-time.devtools

wilkinsona commented 11 months ago

Thanks, @candrews. I've opened https://github.com/spring-projects/spring-boot/issues/38571.