Skip to content

Move the Gradle plugin's sources out of src/main/groovy, so that Error Prone checks them #261

Closed

Description

@abashev

Upstream: palantir#1855 (draft)

What happens

Seven classes of the Gradle plugin live in gradle-open-java-format/src/main/groovy: ConfigureJavaFormatterXml.groovy, the only Groovy source in the repository, and six Java files, PalantirJavaFormatPlugin, PalantirJavaFormatIdeaPlugin, UpdatePalantirJavaFormatIdeaXmlFile, UpdateWorkspaceXmlFile, UpdateExternalDependenciesXmlFile and XmlUtils. compileGroovy compiles all of them, and net.ltgt.errorprone and net.ltgt.nullaway configure only JavaCompile tasks: Error Prone and NullAway never see these six Java files.

Why it is like this

Proposal

  1. Convert ConfigureJavaFormatterXml to Java, still on groovy.util.Node. ConfigureJavaFormatterXmlTest covers its three entry points.
  2. Move the seven files to src/main/java and drop apply plugin: 'groovy'.
  3. Fix what Error Prone and NullAway report in them.

Upstream's palantir#1855 is step 1, still a draft; its description calls it the prerequisite for the move. Its .palantir/revapi.yml part does not apply here, as we do not run revapi.

The Groovy XML classes (XmlParser, XmlNodePrinter, groovy.util.Node) stay: replacing them changes the text of the developer's .idea files and is #262.

Activity

  1. added
    enhancement
    on Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions