Skip to content

Configure language for JavaDoc generation #36

Open
@henning-meinhardt

Description

Hi, i'm missing an option to specify the language code or locale to use when invoking XJC. The current behavior is that environment variable LANG decides which language is selected for generating the JavaDoc comments in the generated files. I would like to have this reproducible, so I'd like a way to define the language on my own.

You currently use
// Set encoding (work-around for https://github.com/gradle/gradle/issues/13843) forkOptions.environment("LANG", System.getenv("LANG") ?: "C.UTF-8")
which basically passes the LANG envionment variable down to the XJC worker. But unfortunately LANG is nothing you can control from within a gradle build script or the gradle.properties file. The environment variable can only be set outside of the gradle script, i.e. its value depends on the environment found when the script runs.

My suggestion is to provide a "language" or "locale" option in the XJCExtension that is honored in the forkOptions code above.

I'm using Gradle 8.5 by the way.

Kind regards
Henning

Activity

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

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions