We've had a few goes at using Gradle's configuration avoidance APIs, but https://github.com/spring-projects/spring-boot/pull/29762 shows that we've missed or regressed things in a few places. It would be good to try to prohibit the use of the APIs that prevent configuration avoidance. Checkstyle won't help as the necessary type information isn't available. Archunit is an option though as it has full type information available.