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

Duplicate class org.reduxkotlin.threadsafe.CreateThreadSafeStoreKt #148

Closed
SylvainHocq opened this issue Jun 6, 2023 · 1 comment
Closed

Comments

@SylvainHocq
Copy link

SylvainHocq commented Jun 6, 2023

Hi i have an error during the buid of my app, when i try to migrate from version 0.5.5 to 0.6.0 (which it seem to be necessary to migrate from kotlin 1.7 to kotlin 1.8)

`Execution failed for task ':app:checkDebugDuplicateClasses'.

A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable
Duplicate class org.reduxkotlin.threadsafe.CreateThreadSafeStoreKt found in modules jetified-redux-kotlin-threadsafe-debug-runtime (org.reduxkotlin:redux-kotlin-threadsafe-android-debug:0.6.0) and jetified-redux-kotlin-threadsafe-jvm-0.6.0 (org.reduxkotlin:redux-kotlin-threadsafe-jvm:0.6.0)
Duplicate class org.reduxkotlin.threadsafe.CreateThreadSafeStoreKt$createTypedThreadSafeStore$$inlined$asTyped$1 found in modules jetified-redux-kotlin-threadsafe-debug-runtime (org.reduxkotlin:redux-kotlin-threadsafe-android-debug:0.6.0) and jetified-redux-kotlin-threadsafe-jvm-0.6.0 (org.reduxkotlin:redux-kotlin-threadsafe-jvm:0.6.0)`

in the build.gradle of my app :
dependencies { .... implementation "org.reduxkotlin:redux-kotlin-threadsafe-jvm:0.6.0" .... }

in the build.gradle of my shared module :
`kotlin {
android()

val xcf = XCFramework()
listOf(
    iosX64(),
    iosArm64(),
).forEach {
    it.binaries.framework {
        baseName = "shared"
        xcf.add(this)
    }
}

sourceSets {
    val commonMain by getting {
        dependencies {
            ...
            implementation("org.reduxkotlin:redux-kotlin-threadsafe:0.6.0")
            ...` 

I think the problem come from my configuration.
I would appreciate some help.
Thanks.

@mpetuska
Copy link
Contributor

Hi, sorry for late response - gh does not notify me on new issues for whatever reason...

Don't use -jvm suffix for android dependencies. Since version 0.6.0 we now publish proper android aar artifacts (-android suffix or no suffix at all)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants