aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/travis_script
diff options
context:
space:
mode:
authorKristen Kozak <sebright@google.com>2018-03-20 19:01:05 -0700
committerKristen Kozak <sebright@google.com>2018-03-20 20:14:20 -0700
commite6003ff06947ca1821b4cee4ace7137f7aac199c (patch)
tree86f41ab90044a09c20cf2a4654a933d08f2f6845 /scripts/travis_script
parentcd131566ed13af2dc9814fb73096a741dcdf867a (diff)
downloadplatform_external_opencensus-java-e6003ff06947ca1821b4cee4ace7137f7aac199c.tar.gz
platform_external_opencensus-java-e6003ff06947ca1821b4cee4ace7137f7aac199c.tar.bz2
platform_external_opencensus-java-e6003ff06947ca1821b4cee4ace7137f7aac199c.zip
Move the examples/ format check from the build file to the Travis script.
This change simplifies the example build file by removing plugins not necessary to build the project. The new Travis job is under allow_failures, so that contributors aren't required to download and run the tool.
Diffstat (limited to 'scripts/travis_script')
-rwxr-xr-xscripts/travis_script4
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/travis_script b/scripts/travis_script
index 68af080a..12fa7acd 100755
--- a/scripts/travis_script
+++ b/scripts/travis_script
@@ -58,6 +58,10 @@ case "$TASK" in
curl -L -o checkstyle-8.0-all.jar https://sourceforge.net/projects/checkstyle/files/checkstyle/8.0/checkstyle-8.0-all.jar/download
java -DrootDir=. -jar checkstyle-8.0-all.jar -c buildscripts/checkstyle.xml examples/src/
;;
+ "CHECK_EXAMPLES_FORMAT")
+ curl -L -o google-java-format-1.5-all-deps.jar https://github.com/google/google-java-format/releases/download/google-java-format-1.5/google-java-format-1.5-all-deps.jar
+ java -jar google-java-format-1.5-all-deps.jar --set-exit-if-changed --dry-run `find examples/src/ -name '*.java'`
+ ;;
"BUILD_EXAMPLES_GRADLE")
pushd examples && ./gradlew clean assemble --stacktrace && popd
;;