Unable to configure pipeline for android project

Hi I am using the bitbucket pipelines for deploying my code to sonarcloud and I am currently facing difficulties in configuring the bitbucket pipeline template which was generated from sonarcloud even after adding the line

plugins {
id “org.sonarqube” version “3.0”
}
the gradelw is present in /android/android
in both the project level and app level build.gradle file the build is failing with this error
Task 'sonarqube' not found in root project 'build'.
this is my pipeline code :
image: openjdk:8
options:
docker: true
size: 2x
clone:
depth: full

definitions:
services:
docker:
memory: 4096
caches:
sonar: ~/.sonar/cache # Caching SonarCloud artifacts will speed up your build
steps:
- step: &build-test-sonarcloud
name: Build, test and analyze on SonarCloud
caches:
- gradle
- sonar
script:
- chmod 755 ./android/gradlew
- ./android/gradlew build sonarqube
artifacts:
- build/libs/**

pipelines:
branches:
feature/*: #runs on any feature branch created
- step: *build-test-sonarcloud
pull-requests:
“**”: #runs on all pull requests done
- step: *build-test-sonarcloud

I am unable to understand how to rectify this and what should I do to fix this . Any help is appreciated I may be missing the obvious here I dont know the android projects by atom I am just configuring a pipeline for the repository to analyse the code in sonar cloud

Hi @Ali_Hussaini

he gradelw is present in /android/android
in both the project level and app level build.gradle file the build is failing with this error
Task 'sonarqube' not found in root project 'build'.

Maybe you didn’t apply the plugin in the Gradle builds?
In other projects I see a Gradle configuration like this

plugins {
  id 'org.sonarqube' version '3.0'
}

...

apply plugin: 'org.sonarqube'
sonarqube {
    properties {
      ...
    }
}

Cheers,
Mark

Hi i added the plugins in both the project level and app level for plugins and apply plugin but I notice I dont have any sonarqube properties in the build.gradle files as It was not mentioned in the sonarcloud website but it still does not work