machine:
  java:
    version: oraclejdk8
  post:
    - rm -f jce_policy-8.zip
    - "curl -o jce_policy-8.zip -v -j -k -L -H 'Cookie: oraclelicense=accept-securebackup-cookie' http://download.oracle.com/otn-pub/java/jce/8/jce_policy-8.zip"
    - unzip -j -o -d $JAVA_HOME/jre/lib/security jce_policy-8.zip
dependencies:
  override:
    - ./gradlew dependencies
test:
  override:
    - ./gradlew check
  post:
    - mkdir -p $CIRCLE_TEST_REPORTS/junit/
    - find . -type f -regex ".*/build/test-results/.*xml" -exec cp {} $CIRCLE_TEST_REPORTS/junit/ \;
    - find . -type f -regex ".*/build/integrationTest-results/.*xml" -exec cp {} $CIRCLE_TEST_REPORTS/junit/ \;

machine:
  java:
    version: oraclejdk8
dependencies:
  pre:
    - rm -f jce_policy-8.zip
    - "curl -o jce_policy-8.zip -v -j -k -L -H 'Cookie: oraclelicense=accept-securebackup-cookie' http://download.oracle.com/otn-pub/java/jce/8/jce_policy-8.zip"
    - unzip -j -o -d $JAVA_HOME/jre/lib/security jce_policy-8.zip
  override:
    - ./gradlew dependencies
test:
  override:
    - ./gradlew check
  post:
    - mkdir -p $CIRCLE_TEST_REPORTS/junit/
    - find . -type f -regex ".*/build/test-results/.*xml" -exec cp {} $CIRCLE_TEST_REPORTS/junit/ \;
    - find . -type f -regex ".*/build/integrationTest-results/.*xml" -exec cp {} $CIRCLE_TEST_REPORTS/junit/ \;

Move JCE policy override to dependency stage
Move JCE policy override to dependency stage
