Update google-java-format to 1.8
@@ -43,7 +43,7 @@ buildscript {
classpath 'com.vanniktech:gradle-maven-publish-plugin:0.9.0'
classpath 'com.google.protobuf:protobuf-gradle-plugin:0.8.12'
classpath 'ru.vyarus:gradle-animalsniffer-plugin:1.5.0'
- classpath 'gradle.plugin.com.github.sherter.google-java-format:google-java-format-gradle-plugin:0.8'
+ classpath 'gradle.plugin.com.github.sherter.google-java-format:google-java-format-gradle-plugin:0.9'
}
repositories {
mavenCentral()
@@ -103,9 +103,11 @@ subprojects {
}
}
+ // google-java-format only works on JDK 11 or newer.
+ if (Jvm.current().javaVersion.isJava11Compatible()) {
project.apply plugin: 'com.github.sherter.google-java-format'
googleJavaFormat {
- toolVersion = '1.7'
+ toolVersion = '1.8'
// By default, the GJF plugin includes all Java folders inside the project directory. This
// does not work well with nested projects, especially when you want to exclude them.
@@ -125,6 +127,7 @@ subprojects {
verify.finalizedBy(prompt)
}
}
+ }
plugins.withType(com.android.build.gradle.BasePlugin).configureEach { plugin ->
plugin.extension.compileOptions {
