sergeshustoff / dikt

Simple and powerful DI for kotlin multiplatform
MIT License
141 stars 4 forks source link

Support android and ios targets #4

Closed RezMike closed 3 years ago

RezMike commented 3 years ago

I'm trying to use dikt in Kotlin Multiplatform Mobile project. But gradle shows this error during sync when I add dikt-runtime library:

Failed building KotlinMPPGradleModel
org.gradle.internal.resolve.ArtifactNotFoundException: Could not find dikt-runtime-1.0.0-alpha2-samplessources.jar (com.github.sergeshustoff.dikt:dikt-runtime:1.0.0-alpha2).
Searched in the following locations:
    https://jitpack.io/com/github/sergeshustoff/dikt/dikt-runtime/1.0.0-alpha2/dikt-runtime-1.0.0-alpha2-samplessources.jar
    at org.gradle.internal.resolve.result.DefaultBuildableArtifactResolveResult.notFound
    ...

I suppose it's because of the lack of support for android and ios targets.

sergeshustoff commented 3 years ago

I think it's because jitpack builds artifacts only for Linux+js+jvm, but not for mac and windows. It will be fixed when I move to maven central or something similar and build for all platforms

sergeshustoff commented 3 years ago

But you can build it yourself to maven local for all needed platforms

sergeshustoff commented 3 years ago

@RezMike It should be fixed in 1.0.0-alpha5. It's now published to maven central (gradle plugin published to gradle plugin repo). Check release notes, there're a lot of changes since alpha2 Please let me know if it works

RezMike commented 3 years ago

@sergeshustoff thank you for the information, I will try new version when I have time

sergeshustoff commented 3 years ago

Tried to use in iOS sample, seems it works