Hamamas / Kotlin-Wasm-Html-Interop

jetpack compose wasm interop with html
Apache License 2.0
30 stars 2 forks source link

Unable to import the library in Compose Multiplatform (Jitpack build failed) #1

Open ShreyashKore opened 4 months ago

ShreyashKore commented 4 months ago

Getting the following error when trying to import the dependency in Compose Multiplatform

Could not find com.github.Hamamas:Kotlin-Wasm-Html-Interop:0.0.4-alpha.
  Searched in the following locations:

Build on Jitpack seems to have failed with the following error:

FAILURE: Build failed with an exception.

* What went wrong:
Task 'publishToMavenLocal' not found in root project 'KotlinWasmHtmlInterop' and its subprojects.

https://jitpack.io/com/github/Hamamas/Kotlin-Wasm-Html-Interop/0.0.4-alpha/build.log.

Hamamas commented 4 months ago

try to add this dependencyResolutionManagement { repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) repositories { mavenCentral() maven { url 'https://jitpack.io' } } }

ShreyashKore commented 4 months ago

I should have mentioned that I'm trying to use it in a Multiplatform project. So I've added this block in my setting.gradle.kts like this

dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        mavenCentral()
        maven("https://jitpack.io")
    }
}

And then I'm importing it in my wasmJsMain dependency block

wasmJsMain.dependencies {
    // ....
    implementation("com.github.Hamamas:Kotlin-Wasm-Html-Interop:0.0.5-alpha")
}

BTW, thanks for this project and I've pushed the code in the branch test/Kotlin-Wasm-Html-Interop for reference.

realityexpander commented 3 months ago

Im having the same issue.

@ShreyashKore It looks like you did not import the jit library in your project, and simply copied the code from this repo. Is this accurate?

I alsp have a project showing how to use google maps in a KMP Compose project for iOS and Android.

ShreyashKore commented 3 months ago

@realityexpander Yes that's correct. I've copied this project in composeWebInterop folder.

realityexpander commented 2 months ago

OK, sounds good!