mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-17 08:24:13 +00:00
Upgrade XJC Gradle plugin
This commit is contained in:
+1
-1
@@ -3,7 +3,7 @@ plugins {
|
||||
// kotlinVersion is managed in gradle.properties
|
||||
id 'org.jetbrains.kotlin.plugin.serialization' version "${kotlinVersion}" apply false
|
||||
id 'org.jetbrains.dokka'
|
||||
id 'com.github.bjornvester.xjc' version '1.8.2' apply false
|
||||
id 'com.github.bjornvester.xjc' version '1.9.1' apply false
|
||||
id 'com.gradleup.shadow' version "9.2.2" apply false
|
||||
id 'me.champeau.jmh' version '0.7.2' apply false
|
||||
id 'io.spring.nullability' version '0.0.15' apply false
|
||||
|
||||
@@ -29,9 +29,10 @@ dependencies {
|
||||
}
|
||||
|
||||
// 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"])
|
||||
tasks.named("xjc", XjcTask).configure {
|
||||
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