Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

BitBucket pipelines Gradle Task not found in root project

Dan Jones
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 30, 2024

I have just received the following error:

FAILURE: Build failed with an exception.
* What went wrong:
Task 'mytask' not found in root project 'myproject' and its subprojects.

 This is the relevant bitbucket-pipelines.yml code:

image: mingc/android-build-box:latest

pipelines
:

branches:

master:

- parallel:

- step:

name: Build Debug

caches:

- gradle

script:

- bash ./gradlew assembleMyAppDebug

artifacts:

- app/build/outputs/**

I have made 2 changes to my build.config, which are:

 ndk {
abiFilters "armeabi-v7a", "armeabi" // includes ARM SO files only, so no x86 SO file
}

and adding += to flavourDimensons and changing the name, i.e. it was

    flavorDimensions "default"

and is now

flavorDimensions += "base_url"

Could either of those changes cause an issue? And if not, any advice on what may be happening here or on how I may be able to get more information?

1 answer

2 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 31, 2024

Hi Dan and welcome to the community!

I'm not familiar with Gradle, but I wanted to suggest that you may get better help if you post your question to a Gradle-specific forum, e.g. https://discuss.gradle.org/.

Pipelines builds run in Docker containers. For every step of your build, a Docker container starts (the build container) using the image you have specified in your bitbucket-pipelines.yml file. The repo is cloned in the build container, and then the commands of the step's script are executed. When the step finishes the Docker container gets destroyed.

You can narrow down whether this is a Pipelines-specific issue by reproducing the build locally with Docker, using the following guide:

If the build fails when you rerproduce locally with Docker as well, this is not a Pipelines-specific error. You can also make changes to your files and run additional commands when debugging locally until you have a build that runs successfully. This way, you debug the build without consuming Pipelines minutes.

Kind regards,
Theodora

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events