Filing this as a feature request as it's related to using J2CL outside of the Bazel tooling (testing isn't supported with Bazel either anyway), although it really looks like an oversight in the Open Source version.
Is your feature request related to a problem? Please describe.bazel-bin/junit/generator/java/com/google/j2cl/junit/apt/libjunit_processor.jar (from //junit/generator/java/com/google/j2cl/junit/apt:junit_processor) doesn't contain a META-INF/services/javax.annotation.processing.Processor so non-Bazel tooling cannot rely on processor discovery in the processor path.
This isn't a problem in Bazel as it doesn't use discovery and instead relies on java_plugin rules.
Describe the solution you'd like
Add the auto-service processor to the build (as an exported plugin or auto-service-annotations) so thatMETA-INF/services` is generated.
Filing this as a feature request as it's related to using J2CL outside of the Bazel tooling (testing isn't supported with Bazel either anyway), although it really looks like an oversight in the Open Source version.
Is your feature request related to a problem? Please describe.
bazel-bin/junit/generator/java/com/google/j2cl/junit/apt/libjunit_processor.jar
(from//junit/generator/java/com/google/j2cl/junit/apt:junit_processor
) doesn't contain aMETA-INF/services/javax.annotation.processing.Processor
so non-Bazel tooling cannot rely on processor discovery in the processor path. This isn't a problem in Bazel as it doesn't use discovery and instead relies onjava_plugin
rules.The
J2clTestingProcessor
is annotated with@AutoService
though, so it looks like it was expected that this file would be generated https://github.com/google/j2cl/blob/f4420bf330be0c475dc66836c38393ceede9d143/junit/generator/java/com/google/j2cl/junit/apt/J2clTestingProcessor.java#L29-L30 but the//third_party:auto_service
doesn't haveexported_plugins
(for itself? though annotations have been split into a separate Maven artifact since 1.0-rc5; J2CL uses 1.0-rc2), so the annotation isn't processed.Describe the solution you'd like Add the auto-service processor to the build (as an exported plugin or
auto-service-annotations) so that
META-INF/services` is generated.