Home > front end >  How do you log all the compiler options being used by Gradle?
How do you log all the compiler options being used by Gradle?

Time:12-10

I'm using Gradle 7.4.2. I'm trying to see what it uses for generatedSourceOutputDirectory (among other CompileOptions.

I've tried:

tasks.compileJava {
    println(options.generatedSourceOutputDirectory.toString())
}

but this prints an unhelpful:

task ':lib:compileJava' property 'options.generatedSourceOutputDirectory'

Sleuthing around the code itself on Github, I see that's its defaults are (seemingly) mangaged via XML code here.

How can I see what the current compile options are?

CodePudding user response:

The option generatedSourceOutputDirectory is of type DirectoryProperty; therefore, to get the value that it holds, you need to call get().

  • Related