jobs:
  - job: production_build_2018_2
    steps:
      - task: CmdLine@1
        displayName: Run printenv
        inputs:
          filename: printenv

      - task: Gradle@1
        displayName: Gradle build (zip)
        inputs:
          options: '--info --scan'
          tasks: clean build zip
          testResultsFiles: '**/TEST-*.xml'
          jdkVersionOption: 1.8

      - task: PublishPipelineArtifact@1
        displayName: "Publish Artifact: $(build.buildNumber)"
        condition: and(succeeded(), eq(variables['system.pullrequest.isfork'], false))
        inputs:
          path: 'plugin/build/distributions'
          artifact: '$(build.buildNumber)'

      - task: PublishPipelineArtifact@1
        displayName: "Publish Artifact: $(build.buildNumber)-reports"
        condition: and(succeeded(), eq(variables['system.pullrequest.isfork'], false))
        inputs:
          path: 'plugin/build/reports'
          artifact: '$(build.buildNumber)-reports'

  - job: test_build_2019_3
    steps:
      - task: CmdLine@1
        displayName: Run printenv
        inputs:
          filename: printenv

      - task: Gradle@1
        displayName: Gradle build (zip)
        inputs:
          options: '--info --scan -PideaVersion=2019.3'
          tasks: clean :plugin:compileJava
          testResultsFiles: '**/TEST-*.xml'
          jdkVersionOption: 1.8
jobs:
  - job: production_build_2018_2
    steps:
      - task: CmdLine@1
        displayName: Run printenv
        inputs:
          filename: printenv

      - task: Gradle@2
        displayName: Gradle build (zip)
        inputs:
          options: '--info --scan'
          tasks: clean build zip
          testResultsFiles: '**/TEST-*.xml'
          jdkVersionOption: 1.8

      - task: PublishPipelineArtifact@1
        displayName: "Publish Artifact: $(build.buildNumber)"
        condition: and(succeeded(), eq(variables['system.pullrequest.isfork'], false))
        inputs:
          path: 'plugin/build/distributions'
          artifact: '$(build.buildNumber)'

      - task: PublishPipelineArtifact@1
        displayName: "Publish Artifact: $(build.buildNumber)-reports"
        condition: and(succeeded(), eq(variables['system.pullrequest.isfork'], false))
        inputs:
          path: 'plugin/build/reports'
          artifact: '$(build.buildNumber)-reports'

  - job: test_build_2019_3
    steps:
      - task: CmdLine@1
        displayName: Run printenv
        inputs:
          filename: printenv

      - task: Gradle@2
        displayName: Gradle build (zip)
        inputs:
          options: '--info --scan -PideaVersion=2019.3'
          tasks: clean :plugin:compileJava
          testResultsFiles: '**/TEST-*.xml'
          jdkVersionOption: 1.8
Update the Gradle task version to fix warnings
Update the Gradle task version to fix warnings
