machine:
  environment:
    GRADLE_OPTS: '-Dorg.gradle.jvmargs="-Xmx2048m -XX:+HeapDumpOnOutOfMemoryError"'
dependencies:
  pre:
    - echo y | android update sdk --no-ui --all --filter build-tools-`grep 'buildToolsVersion' groupie/build.gradle | grep -o '[0-9].*[0-9]'`
    - echo y | android update sdk --no-ui --filter extra-android-m2repository
    - echo y | android update sdk --no-ui --filter android-`grep 'compileSdkVersion' groupie/build.gradle | grep -o '[0-9].*[0-9]'`

machine:
  environment:
    GRADLE_OPTS: '-Dorg.gradle.jvmargs="-Xmx2048m -XX:+HeapDumpOnOutOfMemoryError"'
dependencies:
  pre:
    - echo y | android update sdk --no-ui --all --filter android-`grep -oP '(?<=compileSdkVersion )[0-9].*[0-9]' groupie/build.gradle`,extra-android-m2repository,build-tools-`grep -oP "(?<=buildToolsVersion .)[0-9].*[0-9]" groupie/build.gradle`

Update gradle regexes and move installation to one line
Update gradle regexes and move installation to one line
