androidgradlebuild.gradleartifactoryjfrog-cli

Artifactory Gradle build getting failed in Azure DevOps pipeline


We have an Azure DevOps pipeline to build android package using an Artifactory Gradle task as below. We are using self hosted agent and installed Gradle along with Gradle home directory.

ENV variable configured as

GRADLE_HOME=/opt/gradle-8.0.2
PATH=/opt/gradle-8.0.2/bin 

Pipeline task is below

- task: JFrogGradle@1
  inputs:
    gradleBuildFile: 'build.gradle'
    workDir: 'Android'
    tasks: 'artifactoryPublish'
    artifactoryResolverService: 'artifactory-central'
    collectBuildInfo: true
    buildName: '$(Build.DefinitionName)'
    buildNumber: '$(Build.BuildNumber)'
    usesPlugin: true
    useWrapper: true

But the builds are not getting executed, as it couldn't find Gradle

Error

##[error]No agent found in pool which satisfies the following demand: gradle. All demands: agent.name -equals azdevops, java, gradle, Agent.Version -gtVersion 2.170.


Solution

  • This issue was fixed as part of version 2.4.2 of the extension.

    You are welcome to open issues directly through the project's GitHub in the future.