google-java-format-gradle-plugin icon indicating copy to clipboard operation
google-java-format-gradle-plugin copied to clipboard

Java 17 not working

Open SledgeHammer01 opened this issue 3 years ago • 1 comments

Hi, I am having the same issue as here:

https://github.com/sherter/google-java-format-gradle-plugin/issues/67

I created the system gradle.properties file as described, but the plugin is still failing and all files report syntax errors

  • Windows 10 Pro x64
  • IntelliJ 2021.3
  • Using gradle wrapper if that makes a difference
  • gradle.properties is in the root of my project

java 17.0.5 2022-10-18 LTS Java(TM) SE Runtime Environment (build 17.0.5+9-LTS-191) Java HotSpot(TM) 64-Bit Server VM (build 17.0.5+9-LTS-191, mixed mode, sharing)


Gradle 7.5

Build time: 2022-07-14 12:48:15 UTC Revision: c7db7b958189ad2b0c1472b6fe663e6d654a5103

Kotlin: 1.6.21 Groovy: 3.0.10 Ant: Apache Ant(TM) version 1.10.11 compiled on July 10 2021 JVM: 17.0.5 (Oracle Corporation 17.0.5+9-LTS-191) OS: Windows 10 10.0 amd64

SledgeHammer01 avatar Nov 13 '22 17:11 SledgeHammer01

Setting the proper google-java-format version (in build.gradle.kts) worked for me

googleJavaFormat {
    toolVersion = "1.1"
}

borisf avatar Feb 25 '23 21:02 borisf