# Copyright (c) Microsoft Corporation.
# Licensed under the MIT license.

steps:
- checkout: self
  clean: true
  persistCredentials: true

- task: UseNode@1
  inputs:
    version: '11.x'

- task: Npm@1
  displayName: Run npm install
  inputs:
    command: 'install'
    workingDir: 'importer'

- task: Npm@1
  displayName: Run generate script
  inputs:
    command: 'custom'
    workingDir: 'importer'
    customCommand: 'run deploy:android'
    
- task: Gradle@2
  displayName: Build Android
  inputs:
    gradleWrapperFile: 'android/gradlew'
    workingDirectory: 'android'
    options: '-DversionName=$(Build.BuildNumber) -DvstsAccessToken=$(System.AccessToken)'
    tasks: 'assembleRelease'
    publishJUnitResults: false
    javaHomeOption: 'JDKVersion'
    sonarQubeRunAnalysis: false
