Closed jvmlet closed 5 years ago
Hi @jvmlet
Thanks for reporting this
This should be fixed now in v6.1.0
This is a wrong move here.
Just because I use an annotation processor for my unit tests does not mean that I use it for my integration tests; in the exact same way that just because I use an annotation processor for my main source does not mean that I'll use it for my unit tests (the reason why testAnnotationProcessor
does not extend annotationProcessor
)
If you want Lombok on all your sourcesets, than configure it as such; but by the way, the io.freefair.lombok
Gradle plugin will setup all source sets' annotationProcessor
configuration to extend the lombok
configuration, so lombok is automatically enabled in all source sets, without this change (and it's always been that way: https://github.com/freefair/gradle-plugins/commit/74592f937d14bed3d69126df9fcb678db21a9793#diff-57c58553341173b0058fd8a40823e0b3R51-R53)
@tbroyer, I wonder what do you think about implementation dependency inheritance of integration test configuration. Is it wrong move as well?
testImplementation
extends implementation
(https://docs.gradle.org/current/userguide/java_plugin.html#tab:configurations), and there aren't much choices as there's no testApi
, only testImplementation
. To me, integTest
extends test
just like test
extends main
.
If you're asking about whether integTest
should somehow "extend" test
(as it is today) or not, that's another debate; and the new java-test-fixtures
plugin in Gradle 5.6 possibly reshuffles the cards. That being said, nebula.integtest
is a simple default configuration of nebula.facet
, so if one prefers integTest
to be entirely separate from test
, that's easy to do with nebula.facet
; and if one wants them to somehow share code through another facet, that's possible too (it might be easier to create a new facet instead of configuring test
to reuse the shared facet), and if you're not publishing the project you could also use java-test-fixtures
as the shared facet.
Bottom line: if integTest inherits test, then integTestAnnotationProcessor should inherit testAnnitationProcessor.
Counter argument: test inherits main yet testAnnotationProcessor does not inherit annotationProcessor.
And the argument invoked in favor of changing the plugin's behavior had no basis.
Please make
integTestAnnotationProcessor
to inherit fromtestAnnotationProcessor
to make lombok seamlessly available in integration test as well.