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 /all | |
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 'all')
-rw-r--r-- | all/build.gradle | 42 |
1 files changed, 19 insertions, 23 deletions
diff --git a/all/build.gradle b/all/build.gradle index 95942b4dd..438ec1b22 100644 --- a/all/build.gradle +++ b/all/build.gradle @@ -4,27 +4,23 @@ description = "gRPC: All" buildscript { repositories { - maven { - // The google mirror is less flaky than mavenCentral() - url "https://maven-central.storage-download.googleapis.com/repos/central/data/" - } - } - dependencies { - classpath 'org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.0.1' + maven { // The google mirror is less flaky than mavenCentral() + url "https://maven-central.storage-download.googleapis.com/repos/central/data/" } } + dependencies { classpath 'org.kt3k.gradle.plugin:coveralls-gradle-plugin:2.0.1' } } def subprojects = [ - project(':grpc-auth'), - project(':grpc-core'), - project(':grpc-context'), - project(':grpc-netty'), - project(':grpc-okhttp'), - project(':grpc-protobuf'), - project(':grpc-protobuf-lite'), - project(':grpc-protobuf-nano'), - project(':grpc-stub'), - project(':grpc-testing'), + project(':grpc-auth'), + project(':grpc-core'), + project(':grpc-context'), + project(':grpc-netty'), + project(':grpc-okhttp'), + project(':grpc-protobuf'), + project(':grpc-protobuf-lite'), + project(':grpc-protobuf-nano'), + project(':grpc-stub'), + project(':grpc-testing'), ] for (subproject in rootProject.subprojects) { @@ -56,8 +52,8 @@ task jacocoMerge(type: JacocoMerge) { mustRunAfter(subprojects.jacocoTestReport.mustRunAfter) destinationFile = file("${buildDir}/jacoco/test.exec") executionData = files(subprojects.jacocoTestReport.executionData) - .plus(project(':grpc-interop-testing').jacocoTestReport.executionData) - .filter { f -> f.exists() } + .plus(project(':grpc-interop-testing').jacocoTestReport.executionData) + .filter { f -> f.exists() } } jacocoTestReport { @@ -72,7 +68,9 @@ jacocoTestReport { classDirectories = files(subprojects.sourceSets.main.output) classDirectories = files(classDirectories.files.collect { fileTree(dir: it, - exclude: ['**/io/grpc/okhttp/internal/**']) + exclude: [ + '**/io/grpc/okhttp/internal/**' + ]) }) } @@ -80,6 +78,4 @@ coveralls { sourceDirs = subprojects.sourceSets.main.allSource.srcDirs.flatten() } -tasks.coveralls { - dependsOn(jacocoTestReport) -} +tasks.coveralls { dependsOn(jacocoTestReport) } |