machine:
  java:
    version: openjdk7

dependencies:
  # manually provision some crypto libraries such that we will not blow up with an SSL error
  # as soon as gradle tries to fetch dependencies
  pre:
    - sudo wget "https://bouncycastle.org/download/bcprov-ext-jdk15on-158.jar" -O "${JAVA_HOME}"/jre/lib/ext/bcprov-ext-jdk15on-158.jar
    - sudo perl -pi.bak -e 's/^(security\.provider\.)([0-9]+)/$1.($2+1)/ge' /etc/java-7-openjdk/security/java.security
    - echo "security.provider.1=org.bouncycastle.jce.provider.BouncyCastleProvider" | sudo tee -a /etc/java-7-openjdk/security/java.security
  cache_directories:
    - ~/.gradle
    - .gradle

test:
  override:
    - ./gradlew test
  post:
    - cp build/test-results/*.xml $CIRCLE_TEST_REPORTS

deployment:
  git:
    branch: master
    commands:
      - ./gradlew javadoc
      - git config user.name "Circle CI"
      - git config user.email "robot+circleci@gocardless.com"
      - git checkout gh-pages
      - rm -rf com resources
      - mv build/docs/javadoc/* .
      - git add .
      - git commit -m "[ci skip] Generate Javadoc"
      - git push origin gh-pages

machine:
  java:
    version: openjdk7

dependencies:
  # manually provision some crypto libraries such that we will not blow up with an SSL error
  # as soon as gradle tries to fetch dependencies
  pre:
    - sudo wget "https://bouncycastle.org/download/bcprov-ext-jdk15on-158.jar" -O "${JAVA_HOME}"/jre/lib/ext/bcprov-ext-jdk15on-158.jar
    - sudo perl -pi.bak -e 's/^(security\.provider\.)([0-9]+)/$1.($2+1)/ge' /etc/java-7-openjdk/security/java.security
    - echo "security.provider.1=org.bouncycastle.jce.provider.BouncyCastleProvider" | sudo tee -a /etc/java-7-openjdk/security/java.security
  cache_directories:
    - ~/.gradle
    - .gradle

test:
  override:
    - ./gradlew test
  post:
    - cp build/test-results/*.xml $CIRCLE_TEST_REPORTS

deployment:
  git:
    branch: master
    commands:
      - ./gradlew javadoc
      - git config user.name "Circle CI"
      - git config user.email "robot+circleci@gocardless.com"
      - git checkout gh-pages
      - rm -rf com resources
      - mv build/docs/javadoc/* .
      - git add .
      - git diff-index --quiet HEAD || git commit -m "[ci skip] Generate Javadoc"
      - git push origin gh-pages

Update CircleCI configuration so amended commits don't break builds
Update CircleCI configuration so amended commits don't break builds
