How to pass -parameters javac flag to Java compiler via Gradle?

后端 未结 4 2166
小鲜肉
小鲜肉 2021-02-07 00:48

I have a Gradle-managed multi-project setup that relies on the new Java 8 -parameters compiler flag. I need 2 ways of including the compiler flag:

  • To
4条回答
  •  庸人自扰
    2021-02-07 01:04

    You should use standard way of configuring Java compile plugin:

    apply plugin: 'java'
    
    compileJava {
        options.compilerArgs << '-parameters'
    }
    

提交回复
热议问题