Manuel Lorenzo
07/27/2023, 4:07 PMsonarqube
is taking almost 6 minutes to run, when it should just run androidVariant "devXXDebug"
, but I still see tasks such as compileProdXXDebugAndroidTestKotlin
being compiled - is this normal? should this task be compiled when according to the androidVariant
it should only compile devXXDebug
?Vampire
07/27/2023, 7:19 PMManuel Lorenzo
07/28/2023, 8:09 AMAdam S
07/28/2023, 9:19 AMManuel Lorenzo
07/28/2023, 9:20 AMAdam S
07/28/2023, 9:21 AMManuel Lorenzo
07/28/2023, 9:21 AMAdam S
07/28/2023, 9:21 AMAdam S
07/28/2023, 9:23 AMManuel Lorenzo
07/28/2023, 9:24 AMAdam S
07/28/2023, 9:24 AMAdam S
07/28/2023, 9:25 AMManuel Lorenzo
07/28/2023, 9:25 AMManuel Lorenzo
07/28/2023, 9:25 AMAdam S
07/28/2023, 9:25 AMAdam S
07/28/2023, 9:25 AMManuel Lorenzo
07/28/2023, 9:28 AMAdam S
07/28/2023, 9:30 AMAdam S
07/28/2023, 9:31 AMsonarTask.mustRunAfter(getJavaTestTasks(project));
sonarTask.dependsOn(getJavaCompileTasks(project));
sonarTask.mustRunAfter(getJacocoTasks(project));
sonarTask.dependsOn(getAndroidCompileTasks(project));
https://github.com/SonarSource/sonar-scanner-gradle/blob/81638cca447d6a68d51b47b83e99c1ea3cdb6801/src/main/java/org/sonarqube/gradle/SonarQubePlugin.java#L113-L116Adam S
07/28/2023, 9:32 AMgetAndroidCompileTasks(project)
is fetching all Android compilation tasksAdam S
07/28/2023, 9:32 AMAdam S
07/28/2023, 9:33 AMAdam S
07/28/2023, 9:35 AMAdam S
07/28/2023, 9:37 AMgetAllprojects()
and not using the Provider API), so it’s going to be really hard to try and get something working because you’ll be trying to workaround workarounds, which will probably require more workarounds….Adam S
07/28/2023, 9:41 AM./gradlew sonar -x compileProdXXDebugAndroidTestKotlin
It’s more manual, harder to maintain, but it’s easier to understand and implement!Vampire
07/28/2023, 9:49 AMdependsOn
to an empty list / the list of task you want as dependenciesManuel Lorenzo
07/28/2023, 9:57 AMManuel Lorenzo
07/28/2023, 9:58 AMManuel Lorenzo
07/28/2023, 9:59 AMManuel Lorenzo
07/28/2023, 11:16 AM