Add module to support testing of generated code

Add a new unpublished `spring-core-test` module to support testing of
generated code. The module include a `TestCompiler` class which can be
used to dynamically compile generated Java code. It also include an
AssertJ friendly `SourceFile` class which uses qdox to provide targeted
assertions on specific parts of a generated source file.

See gh-28120
This commit is contained in:
Phillip Webb
2022-02-24 21:57:11 -08:00
committed by Stephane Nicoll
parent b5695b9248
commit 653dc5951d
34 changed files with 3163 additions and 1 deletions

View File

@@ -0,0 +1,13 @@
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
description = "Spring Core Test"
dependencies {
api(project(":spring-core"))
api("org.assertj:assertj-core")
api("com.thoughtworks.qdox:qdox")
}
tasks.withType(PublishToMavenRepository).configureEach {
it.enabled = false
}