mirror of
https://github.com/spring-projects/spring-framework
synced 2026-06-08 17:33:33 +00:00
Polish contribution
See gh-36195
This commit is contained in:
@@ -28,8 +28,10 @@ dependencies {
|
||||
testRuntimeOnly("com.sun.xml.bind:jaxb-impl")
|
||||
}
|
||||
|
||||
// XJC plugin adds generated code to main source set, but we need it only for tests
|
||||
// The XJC plugin adds generated code to the main source set, but we need it only for tests.
|
||||
// 1) Reset main source sets to the standard directories only.
|
||||
sourceSets.main.java.setSrcDirs(["src/main/java"])
|
||||
sourceSets.main.resources.setSrcDirs(["src/main/resources"])
|
||||
// 2) Attach XJC output only to the test source sets via lazy providers.
|
||||
sourceSets.test.java.srcDir(tasks.named("xjc", XjcTask).flatMap { it.outputJavaDir })
|
||||
sourceSets.test.resources.srcDir(tasks.named("xjc", XjcTask).flatMap { it.outputResourcesDir })
|
||||
|
||||
Reference in New Issue
Block a user