diff options
author | ZHANG Dapeng <zdapeng@google.com> | 2018-06-11 18:35:18 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-11 18:35:18 -0700 |
commit | 5ce10f0146ddce96bc1e6884fe55d8623880b528 (patch) | |
tree | 74dd7fcfff4f3dcc5e9de108d7cfa385bce564ec /protobuf-lite | |
parent | 9d26c5c40596693bb643d267ab2f3d25b15ed36b (diff) | |
download | grpc-grpc-java-5ce10f0146ddce96bc1e6884fe55d8623880b528.tar.gz |
all: add gradle format checker
This PR adds an automatic gradle format checker and reformats all the *.gradle files. After this, new changes to *.gradle files will fail to build if not in good format, just like checkStyle failure.
Diffstat (limited to 'protobuf-lite')
-rw-r--r-- | protobuf-lite/build.gradle | 62 |
1 files changed, 29 insertions, 33 deletions
diff --git a/protobuf-lite/build.gradle b/protobuf-lite/build.gradle index ff777fdac..24fa3d960 100644 --- a/protobuf-lite/build.gradle +++ b/protobuf-lite/build.gradle @@ -1,14 +1,10 @@ buildscript { repositories { - maven { - // The google mirror is less flaky than mavenCentral() - url "https://maven-central.storage-download.googleapis.com/repos/central/data/" - } + maven { // The google mirror is less flaky than mavenCentral() + url "https://maven-central.storage-download.googleapis.com/repos/central/data/" } mavenLocal() } - dependencies { - classpath libraries.protobuf_plugin - } + dependencies { classpath libraries.protobuf_plugin } } apply plugin: 'com.google.protobuf' @@ -26,36 +22,36 @@ dependencies { } compileTestJava { - // Protobuf-generated Lite produces quite a few warnings. - options.compilerArgs += ["-Xlint:-rawtypes", "-Xlint:-unchecked", "-Xlint:-fallthrough", - "-XepExcludedPaths:.*/build/generated/source/proto/.*"] + // Protobuf-generated Lite produces quite a few warnings. + options.compilerArgs += [ + "-Xlint:-rawtypes", + "-Xlint:-unchecked", + "-Xlint:-fallthrough", + "-XepExcludedPaths:.*/build/generated/source/proto/.*" + ] } protobuf { - protoc { - if (project.hasProperty('protoc')) { - path = project.protoc - } else { - artifact = "com.google.protobuf:protoc:${protocVersion}" + protoc { + if (project.hasProperty('protoc')) { + path = project.protoc + } else { + artifact = "com.google.protobuf:protoc:${protocVersion}" + } } - } - plugins { - javalite { - if (project.hasProperty('protoc-gen-javalite')) { - path = project['protoc-gen-javalite'] - } else { - artifact = libraries.protoc_lite - } + plugins { + javalite { + if (project.hasProperty('protoc-gen-javalite')) { + path = project['protoc-gen-javalite'] + } else { + artifact = libraries.protoc_lite + } + } } - } - generateProtoTasks { - ofSourceSet('test')*.each { task -> - task.builtins { - remove java - } - task.plugins { - javalite {} - } + generateProtoTasks { + ofSourceSet('test')*.each { task -> + task.builtins { remove java } + task.plugins { javalite {} } + } } - } } |