From 34d42d5cdd09db037df68407ea185d062859f914 Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Tue, 23 Apr 2019 12:41:02 -0700 Subject: [PATCH 1/3] Update maven-checkstyle-plugin and puppycrawl checkstyle --- google-cloud-clients/pom.xml | 4 ++-- google-cloud-util/google-cloud-compat-checker/pom.xml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/google-cloud-clients/pom.xml b/google-cloud-clients/pom.xml index a11be7329860..a94ec5c6b722 100644 --- a/google-cloud-clients/pom.xml +++ b/google-cloud-clients/pom.xml @@ -663,12 +663,12 @@ org.apache.maven.plugins maven-checkstyle-plugin - 2.17 + 3.0.0 com.puppycrawl.tools checkstyle - 6.16 + 8.19 diff --git a/google-cloud-util/google-cloud-compat-checker/pom.xml b/google-cloud-util/google-cloud-compat-checker/pom.xml index b39ec2371bc0..2f7ca9670386 100644 --- a/google-cloud-util/google-cloud-compat-checker/pom.xml +++ b/google-cloud-util/google-cloud-compat-checker/pom.xml @@ -95,7 +95,7 @@ org.apache.maven.plugins maven-checkstyle-plugin - 2.17 + 3.0.0 checkstyle From 7b0ffc304050cefcecd037afd2f7bb41a74729c0 Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Fri, 26 Apr 2019 10:34:36 -0700 Subject: [PATCH 2/3] try to skip checkstyle on Java 7 --- .kokoro/build.sh | 6 +++--- google-cloud-clients/pom.xml | 10 ++++++++++ 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/.kokoro/build.sh b/.kokoro/build.sh index a3ce28669510..ae5755dbf435 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -54,14 +54,14 @@ fi mvn install -DskipTests=true -Dmaven.javadoc.skip=true -Dgcloud.download.skip=true -B -V # prepend Kokoro root directory onto GOOGLE_APPLICATION_CREDENTIALS path -if [[ ! -z "$GOOGLE_APPLICATION_CREDENTIALS" ]]; then +if [[ ! -z "${GOOGLE_APPLICATION_CREDENTIALS}" ]]; then export GOOGLE_APPLICATION_CREDENTIALS=$(realpath ${KOKORO_ROOT}/src/${GOOGLE_APPLICATION_CREDENTIALS}) fi -case $JOB_TYPE in +case ${JOB_TYPE} in test) mvn test -B - bash $KOKORO_GFILE_DIR/codecov.sh + bash ${KOKORO_GFILE_DIR}/codecov.sh ;; lint) mvn com.coveo:fmt-maven-plugin:check diff --git a/google-cloud-clients/pom.xml b/google-cloud-clients/pom.xml index a94ec5c6b722..264c1695abc0 100644 --- a/google-cloud-clients/pom.xml +++ b/google-cloud-clients/pom.xml @@ -928,5 +928,15 @@ + + + java7-tests + + true + + + 1.7 + + From 819da469cbfa3ebca6730d7ad04303a7d66fa91a Mon Sep 17 00:00:00 2001 From: Jeff Ching Date: Fri, 26 Apr 2019 11:18:31 -0700 Subject: [PATCH 3/3] Reverse the condition - only run checkstyle on Java 8+ --- google-cloud-clients/pom.xml | 74 ++++++++++++++++++------------------ 1 file changed, 38 insertions(+), 36 deletions(-) diff --git a/google-cloud-clients/pom.xml b/google-cloud-clients/pom.xml index 264c1695abc0..4e7ddcb5f935 100644 --- a/google-cloud-clients/pom.xml +++ b/google-cloud-clients/pom.xml @@ -660,37 +660,6 @@ - - org.apache.maven.plugins - maven-checkstyle-plugin - 3.0.0 - - - com.puppycrawl.tools - checkstyle - 8.19 - - - - - checkstyle - validate - - check - - - java.header - license-checks.xml - true - true - error - true - true - com/google/cloud/*/v*/** - - - - org.apache.maven.plugins maven-site-plugin @@ -930,13 +899,46 @@ - java7-tests - - true - + + checkstyle-tests - 1.7 + [1.8,) + + + + org.apache.maven.plugins + maven-checkstyle-plugin + 3.0.0 + + + com.puppycrawl.tools + checkstyle + 8.19 + + + + + checkstyle + validate + + check + + + java.header + license-checks.xml + true + true + error + true + true + com/google/cloud/*/v*/** + + + + + +