Skip to main content
All CollectionsAppSweep Integrations
Automating your Android AppSweep Scans in Azure Pipelines
Automating your Android AppSweep Scans in Azure Pipelines
Updated over a week ago

Automizing using the AppSweep Gradle Plugin

To automate the scan in an Azure Pipeline, you first need to add the AppSweep Gradle plugin to your Android app project.

If you have not done so yet, you can follow our help article on how to use the plugin.

The next step is to add the AppSweep Gradle task to your Azure DevOps pipeline by simply adding it as a stage of your existing build pipeline.

To do this, edit your azure-pipelines.yml file, and add the following after your build stage(s), replacing gs_appsweep_**** with your own AppSweep API key:

- task: Gradle@3
inputs:
tasks: 'uploadToAppSweepDebug'
env:
APPSWEEP_API_KEY: gs_appsweep_****

This will upload your debug app to AppSweep as the final stage of your pipeline, after which you can check the build status in AppSweep’s web UI. You can access the URL of your AppSweep build directly from the logs of the Gradle task in Azure.

To select a different build configuration from debug, you can replace uploadToAppSweepDebug with any of the task names automatically generated by the AppSweep Gradle plugin. You can run ./gradlew tasks locally or in an Azure pipeline to obtain a list of these task names.

Next steps:

Hardcoding your API key in your pipeline is not ideal. As the next step, you should replace this with a secret variable. Please refer to this Azure help article on how to do this conveniently.

Did this answer your question?