Skip to content

File type argument used in compilerArgs where String is expected #1189

Description

In the root project's build.gradle, the compileJava task is configured as follows:

    compileJava {
        options.getGeneratedSourceOutputDirectory().set((File) project.generatedSourcesJavaDir)
        options.compilerArgs += [
            "-Xlint:unchecked",
            "-Xlint:deprecation",
            "-s",
            project.generatedSourcesJavaDir
        ]
    }

In the ext block, generatedSourcesJavaDir is assigned a file. However, the compilerArgs in the compileJava task expect a list of Strings.

Is there a particular reason to use a File type in the args list here or could this be changed to get the String path from the file?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions