Skip to content

Build error when adding mockmp to my project #83

@hantsy

Description

@hantsy

I followed the readme and docs/setup to add mockmp to my project, when run ./gradlew build -x test and got the following errors.

> Task :composeApp:compileDebugUnitTestKotlinAndroid FAILED
e: ..../composeApp/build/mockmp/commonTest/kotlin/mockmp.expect.kt:8:10 Expected mock has no actual declaration in module <composeApp_debugUnitTest> for JVM
e: ..../composeApp/build/mockmp/commonTest/kotlin/mockmp.expect.kt:11:10 Expected fake has no actual declaration in module <composeApp_debugUnitTest> for JVM
e: ..../composeApp/build/mockmp/commonTest/kotlin/mockmp.expect.kt:14:10 Expected injectMocks has no actual declaration in module <composeApp_debugUnitTest> for JVM

> Task :composeApp:compileReleaseUnitTestKotlinAndroid FAILED
e: ..../composeApp/build/mockmp/commonTest/kotlin/mockmp.expect.kt:8:10 Expected mock has no actual declaration in module <composeApp_releaseUnitTest> for JVM
e: ..../composeApp/build/mockmp/commonTest/kotlin/mockmp.expect.kt:11:10 Expected fake has no actual declaration in module <composeApp_releaseUnitTest> for JVM
e: ..../composeApp/build/mockmp/commonTest/kotlin/mockmp.expect.kt:14:10 Expected injectMocks has no actual declaration in module <composeApp_releaseUnitTest> for JVM

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':composeApp:compileDebugUnitTestKotlinAndroid'.
> A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
   > Compilation error. See log for more details

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.
==============================================================================

2: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':composeApp:compileReleaseUnitTestKotlinAndroid'.
> A failure occurred while executing org.jetbrains.kotlin.compilerRunner.GradleCompilerRunnerWithWorkers$GradleKotlinCompilerWorkAction
   > Compilation error. See log for more details

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions