https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
t

Thomas Flad

03/23/2021, 9:51 AM
Hi everyone, I have troubles with the setup for sonarqube. As soon I have expect/actual classes in my test packages I got this error from the sonarqube gradle task:
Copy code
> Task :common:compileDebugAndroidTestKotlinAndroid FAILED
e: /common/BaseTest.kt: (5, 23): Expected class 'BaseTest' has no actual declaration in module <common_debug> for JVM
I’m a little lost because I have no JVM target only Android and iOS.
k

Kris Wong

03/23/2021, 1:16 PM
so the task that's producing the error is actually
:common:compileDebugAndroidTestKotlinAndroid
. but you say it succeeds if you're not running the sonarqube task?
t

Thomas Flad

03/24/2021, 6:09 PM
It‘s not succeeds when I run it independently as well. But I don‘t understand yet why this task exists in the first place. @Kris Wong Do you have a running Jacoco/Sonar setup? I saw that you asked a question in direction of Sonarqube compatibility
Currently I just avoid using expect/actual in the test srcsets and it’s working fine but it would be nice to use it for mocking the db connection
k

Kris Wong

03/24/2021, 6:18 PM
i don't have this setup for any of my KMM projects yet
but my point is that it seems unrelated to Sonarqube?
m

magnumrocha

08/24/2021, 11:53 AM
I am having this Issue and I think this is related to the source folder configuration for android unit test (
androidTest)
the gradle plugin doesn’t recognise it as the JVM test folder…
27 Views