Hi,
Fail to get pipeline to run but it is working locally on our laptops without an issue.
Repo : Bitbucket
CI : Bitbucket Pipeline
Language : Gradle + Kotlin
It spits out this error in Bitbucket pipline :-
And if I were to trace it to the source code
boolean unitTestTaskDepAdded = addTaskByName(p, "compile" + capitalize(variant.getName()) + "UnitTestJavaWithJavac", allCompileTasks);
We are returning something in variant but it looks like it’s not getting pickup in the pipeline.
Here is a snippet of our build.gradle
plugins {
id "jacoco"
id "java"
id "application"
id "org.sonarqube" version "2.8"
}
sonarqube {
androidVariant 'deviceDebug'
properties {
/**
* Enable Sonarcloud to run from gradle
* */
property "sonar.host.url", "https://sonarcloud.io"
property "sonar.login", "xx"
property "sonar.organization", "xx"
property "sonar.projectKey", "xx"
}
}
Here is a snippet of bitbucket-pipelines.yml
image: java:8
clone:
depth: full # SonarCloud scanner needs the full history to assign issues properly
definitions:
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:
- ./gradlew sonarqube --stacktrace
artifacts:
- build/libs/**
pipelines:
default:
- step: *build-test-sonarcloud
pull-requests:
'**':
- step: *build-test-sonarcloud
Thank you and let me know where I got it wrong.