Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
johann-beleites-sonarsource opened this issue Jun 8, 2023 · 0 comments

Comments

@johann-beleites-sonarsource

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant