---

machine:
  java:
    version: oraclejdk8
  environment:
    TERM: dumb
    GRADLE_OPTS: -Xmx2g

checkout:
  post:
    - "if [ -e .git/shallow ]; then git fetch --unshallow; fi"
    - git fetch --tags
    - git submodule update --init --remote

dependencies:
  override:
    - ./gradlew --stacktrace --parallel client:dependencies plugins:dependencies

test:
  override:
    - >
      if [ -n "${BUILD_JAVADOC}" ]; then
        ./gradlew --stacktrace util:javadocJar packageJavadoc;
      elif [ -n "${BUILD_PMD}" ]; then
        ./gradlew --stacktrace pmdMain;
      else
        ./gradlew --stacktrace --parallel jar test client:fatjar;
      fi

general:
  artifacts:
    - plugins/dist-versioned
    - client/build/libs
    - util/build/libs
    - parser/irc/build/libs
    - parser/common/build/libs

    - build/libs/dmdirc-javadoc.jar

    - client/build/reports/pmd/*
    - plugins/pmd/*
    - util/build/reports/pmd/*
    - parser/build/reports/pmd/*


---

machine:
  java:
    version: oraclejdk8
  environment:
    TERM: dumb
    GRADLE_OPTS: -Xmx1024m

checkout:
  post:
    - "if [ -e .git/shallow ]; then git fetch --unshallow; fi"
    - git fetch --tags
    - git submodule update --init --remote

dependencies:
  override:
    - ./gradlew --stacktrace --parallel client:dependencies plugins:dependencies

test:
  override:
    - >
      if [ -n "${BUILD_JAVADOC}" ]; then
        ./gradlew --stacktrace util:javadocJar packageJavadoc;
      elif [ -n "${BUILD_PMD}" ]; then
        ./gradlew --stacktrace pmdMain;
      else
        ./gradlew --stacktrace --parallel jar test client:fatjar;
      fi

general:
  artifacts:
    - plugins/dist-versioned
    - client/build/libs
    - util/build/libs
    - parser/irc/build/libs
    - parser/common/build/libs

    - build/libs/dmdirc-javadoc.jar

    - client/build/reports/pmd/*
    - plugins/pmd/*
    - util/build/reports/pmd/*
    - parser/build/reports/pmd/*


Drop memory limit to 1g?
Drop memory limit to 1g?
