Skip to content

Support plugins in java_package_configuration #366

Description

@joca-bt

Would it make sense for either java_package_configuration to support `plugins?

What am I trying to do?

I have a big monorepo and want to add support for NullAway incrementally and centrally. I was thinking of the following approach:

  1. Define a package_group with the packages where NullAway should be enabled.
  2. Define a java_package_configuration with the relevant plugin and javacopts. Something like:
java_plugin(name = "nullaway", deps = [ artifact("com.uber.nullaway:nullaway") ])
package_group(name = "nullaway_packages", packages = [ ... ])
java_package_configuration(name = "nullaway_packages_configuration", plugins = [ ":nullaway" ], javacopts = [ "-Xep:NullAway:ERROR", ... ])
  1. Registering the configuration via toolchain.

Currently I am doing it via another approach (macro) but though this could be a useful feature.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions