# Gradle
# Build your Java projects and run tests with Gradle using a Gradle wrapper script.
# Add steps that analyze code, save build artifacts, deploy, and more:
# https://docs.microsoft.com/vsts/pipelines/languages/java

pool:
  vmImage: 'Ubuntu 16.04'

steps:
- script: |
    apt-get --quiet update --yes
    apt-get --quiet install --yes wget tar unzip lib32stdc++6 lib32z1
    wget --quiet --output-document=android-sdk.zip https://dl.google.com/android/repository/sdk-tools-linux-$ANDROID_SDK_TOOLS.zip
    unzip -q android-sdk.zip -d android-sdk-linux
    export ANDROID_HOME=$PWD/android-sdk-linux
    export PATH=$PATH:$ANDROID_HOME/platform-tools/
    echo y | $ANDROID_HOME/tools/bin/sdkmanager --update
    echo y | $ANDROID_HOME/tools/bin/sdkmanager 'tools'
    echo y | $ANDROID_HOME/tools/bin/sdkmanager 'platform-tools'
    echo y | $ANDROID_HOME/tools/bin/sdkmanager 'build-tools;'$ANDROID_BUILD_TOOLS
    echo y | $ANDROID_HOME/tools/bin/sdkmanager 'platforms;android-'$ANDROID_COMPILE_SDK
    chmod +x ./gradlew
    ./gradlew assembleDebug
  displayName: 'Android build'

# - task: Gradle@2
#   inputs:
#     workingDirectory: ''
#     gradleWrapperFile: 'gradlew'
#     gradleOptions: '-Xmx3072m'
#     javaHomeOption: 'JDKVersion'
#     jdkVersionOption: '1.8'
#     jdkArchitectureOption: 'x64'
#     publishJUnitResults: false
#     testResultsFiles: '**/TEST-*.xml'
#     tasks: 'assembleDebug'

Set up CI with Azure Pipelines
Set up CI with Azure Pipelines