Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Object 'MR' has several compatible declarations in modules MyLib_iosArm64, MyLib_iosX64Main #58

Closed
xrofa opened this issue Apr 13, 2020 · 2 comments · Fixed by #63
Closed
Assignees
Labels
bug Something isn't working
Milestone

Comments

@xrofa
Copy link

xrofa commented Apr 13, 2020

I'm using the latest version of the lib "0.9.1".

My build gradle is as follows:

kotlin {
    iosX64() {
        binaries.framework {
            baseName = "MyLib"
            isStatic = false
        }
    }
    iosArm64() {
        binaries.framework {
            baseName = "MyLib"
            isStatic = false
        }
    }
    sourceSets {
        ...
        val iosX64Main by getting
        val iosX64Test by getting
        val iosArm64Main by getting {
            dependsOn(iosX64Main)
        }
        val iosArm64Test by getting {
            dependsOn(iosX64Test)
        }

        configure(
            listOf(
                iosArm64Main,
                iosX64Main
            )
        ) {
            dependencies {
                implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core-native:$coroutines_version")
                implementation("org.jetbrains.kotlinx:kotlinx-serialization-runtime-native:$serialization_version")
                implementation("org.jetbrains.kotlinx:kotlinx-serialization-properties-native:$serialization_version")
                implementation("io.ktor:ktor-client-ios:$ktor_version")
                implementation("io.ktor:ktor-client-core-native:$ktor_version")
                implementation("io.ktor:ktor-client-serialization-native:$ktor_version")
            }
        }
    }
}

After that I updated to (the target def remains the same, only renamed the folder to iosMain from iosX64Main):

val iosMain by creating {
            dependencies {
                implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core-native:$coroutines_version")
                implementation("org.jetbrains.kotlinx:kotlinx-serialization-runtime-native:$serialization_version")
                implementation("org.jetbrains.kotlinx:kotlinx-serialization-properties-native:$serialization_version")
                implementation("io.ktor:ktor-client-ios:$ktor_version")
                implementation("io.ktor:ktor-client-core-native:$ktor_version")
                implementation("io.ktor:ktor-client-serialization-native:$ktor_version")
            }
        }

        val iosX64Main by getting {
            dependsOn(iosMain)
        }

        val iosArm64Main by getting {
            dependsOn(iosMain)
        }
        val iosX64Test by getting
        val iosArm64Test by getting

And now when building I'm getting:
Expected object 'MR' has no actual declaration in module <MyLib_test> for Native

@Alex009 Alex009 added the bug Something isn't working label Apr 19, 2020
@Alex009 Alex009 self-assigned this Apr 19, 2020
@Alex009
Copy link
Member

Alex009 commented Apr 19, 2020

hi! thanks for report. i will fix this bug soon

@Alex009 Alex009 added this to the 0.10.0 milestone Apr 19, 2020
Alex009 added a commit that referenced this issue May 1, 2020
@Alex009 Alex009 linked a pull request May 1, 2020 that will close this issue
Alex009 added a commit that referenced this issue May 1, 2020
Alex009 added a commit that referenced this issue May 1, 2020
@Alex009
Copy link
Member

Alex009 commented May 1, 2020

fix merged in develop. will be released in 0.10.0

@Alex009 Alex009 closed this as completed May 1, 2020
@Alex009 Alex009 mentioned this issue May 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants