When run with --debug, the debug logger is enabled in Gradle. In the plugin, this is used to pass configuration to xjc - specifically debugMode is turned on -
This causes xjc to generate slightly different code - notably the class JAXBDebug is generated by xjc.
Because the configuration of the debug logger is not treated as a task input, the generated source is cached and reused - so that the output from xjc with debugMode turned on is reused even what Gradle is later run without --debug.
A workaround for this is to force the task to rerun with --rerun-tasks.
When run with
--debug, the debug logger is enabled in Gradle. In the plugin, this is used to pass configuration toxjc- specificallydebugModeis turned on -xjc-gradle-plugin/src/main/kotlin/com/github/bjornvester/xjc/XjcWorker.kt
Line 51 in b1baacc
This causes
xjcto generate slightly different code - notably the classJAXBDebugis generated byxjc.Because the configuration of the debug logger is not treated as a task input, the generated source is cached and reused - so that the output from
xjcwithdebugModeturned on is reused even what Gradle is later run without--debug.A workaround for this is to force the task to rerun with
--rerun-tasks.