1

Currently trying to set up a Bitbucket pipeline for an Android project. We are using a private Maven repository in the project and need to apply a settings.xml.

Locally it works fine when building the project in Android Studio, but I'm not sure how to apply this in the pipeline .yml file.

I saw some places mentioning that I need to run a mvn command in the pipeline to apply the settings.xml file, but Bitbucket returns an error saying that mvn is not recognized.

Current .yml file:

image: androidsdk/android-30
pipelines:
  branches:
    main:
      - step:
          name: Android Debug Application
          caches:
            - gradle
          script:
            - ./gradlew assembleDebug
          artifacts:
            - app/build/outputs/**

The settings.xml file is in the root of the project, and username and password are stored as repository variables.

What should I add to the yml file to apply the settings.xml?

Thanks!

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
sjohansson
  • 119
  • 1
  • 7

1 Answers1

0

Generally how to specify a settings file for maven has already been answered elswhere (like here). The build step you have defined is using gradle though.. Not sure exactly what you want to accomplish