message: travis: Use envvars in Java script.
diff: @@ -78,6 +78,7 @@ before_script:
  - if [ "$FLAVOR" == "cs" ]; then travis_retry nuget restore cs/cs.sln; fi
  script:
  + - BOND_ROOT=$TRAVIS_BUILD_DIR
  - mkdir build && cd build
  - if [ "$FLAVOR" == "cs" ]; then cmake -DBOND_SKIP_GBC_TESTS=TRUE -DBOND_SKIP_CORE_TESTS=TRUE -DBOND_ENABLE_GRPC=FALSE ..; fi
  @@ -103,19 +104,21 @@ script:
  - if [ "$FLAVOR" == "hs" ]; then cd ../compiler; fi
  - if [ "$FLAVOR" == "hs" ]; then ../build/compiler/build/gbc-tests/gbc-tests; fi
  +
  + - if [ "$FLAVOR" == "java" ]; then BOND_JAVA=$BOND_ROOT/java; fi
  - if [ "$FLAVOR" == "java" ]; then cmake -DBOND_SKIP_GBC_TESTS=TRUE -DBOND_SKIP_CORE_TESTS=TRUE -DBOND_ENABLE_GRPC=FALSE ..; fi
  - if [ "$FLAVOR" == "java" ]; then make gbc; fi
  - - if [ "$FLAVOR" == "java" ]; then export PATH=`pwd`/compiler/build/gbc:$PATH; fi
  - - if [ "$FLAVOR" == "java" ]; then cd ../java/gradle-plugin; gradle build; fi
  - - if [ "$FLAVOR" == "java" ]; then PLUGIN_VERSION=`sed -n "s/version ['\"]\(.*\)['\"]/\1/p" java/gradle-plugin/build.gradle`; fi
  + - if [ "$FLAVOR" == "java" ]; then export PATH=$BOND_ROOT/build/compiler/build/gbc:$PATH; fi
  + - if [ "$FLAVOR" == "java" ]; then cd $BOND_JAVA/gradle-plugin; gradle build; fi
  + - if [ "$FLAVOR" == "java" ]; then PLUGIN_VERSION=`sed -n "s/version ['\"]\(.*\)['\"]/\1/p" build.gradle`; fi
  - if [ "$FLAVOR" == "java" ]; then mvn install:install-file -Dfile=build/libs/bond-gradle-$PLUGIN_VERSION.jar -DgroupId=org.bondlib -DartifactId=gradle -Dversion=$PLUGIN_VERSION -Dpackaging=jar; fi
  - - if [ "$FLAVOR" == "java" ]; then cd ../core; gradle build; fi
  - - if [ "$FLAVOR" == "java" ]; then cd ../compat; gradle build; fi
  - - if [ "$FLAVOR" == "java" ]; then cd ../../build; fi
  + - if [ "$FLAVOR" == "java" ]; then cd $BOND_JAVA/core; gradle build; fi
  + - if [ "$FLAVOR" == "java" ]; then cd $BOND_JAVA/compat; gradle build; fi
  + - if [ "$FLAVOR" == "java" ]; then cd $BOND_ROOT/build; fi
  - if [ "$FLAVOR" == "java" ]; then cmake -DBOND_SKIP_GBC_TESTS=TRUE -DBOND_SKIP_CORE_TESTS=TRUE -DBOND_ENABLE_GRPC=FALSE ..; fi
  - if [ "$FLAVOR" == "java" ]; then make --jobs 2 check; fi
  # Run Java examples.
  - - if [ "$FLAVOR" == "java" ]; then cd ../examples/java/core; fi
  + - if [ "$FLAVOR" == "java" ]; then cd $BOND_ROOT/examples/java/core; fi
  # set -e will cause the entire travis script to immediately return nonzero
  # if any command returns nonzero. Be aware that this behavior will apply to
  # any lines after this one.
  