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
Multiplatform ArtifactNotFouundException #34
Comments
It seems to be looking for an artifact with a |
Something else to note, what targets have you specified for your mpp build? |
I have been getting similar issue with one of my own projects... as best I can tell this is an issue when the Multiplatform project has a target for |
I have the same issue in my MPP. Sometimes when I add a library to commonMain {} it gives me this error (sample sources.jar not found)... Do you guys have some solution for this problem? |
I don't know what |
I wonder would this be solved by simply adding the |
We've now got released automatically building artifacts for the JS targets, so maybe it's worth just trying the android ones too and seeing if that fixes this problem for people |
So I had a little investigation into adding the android target. Basically it would mean we could output an aar artifact (android library) that can contain android sdk specific code and resources. Unfortunately to do it seems like a real pita as you have to add a whole bunch of android sdk configuration to get it to work (due to requiring the android plugin to be added to the build which doesnt exactly play nice with the mpp plugin). Still skeptical as to whether this would solve the issue documented here - baffled as to why the jvm target we already provide wouldn't be enough. Also why I'm now reluctant to go down the route of adding this target for all this overhead/boilerplate. Could someone who has experienced the issue post a link to their affected project? If it is only happening when you are depending on the kotlin-result lib in an mpp project with an Any projects you can point to here would be a great help @mattmook @TomWayne98 @andb3 |
just to back up this issue. I'm also seeing this. I have tried to import my library as
I tried changing
I'm currently trying to make this work using the gradle task of any suggestions? |
@toomanyeduardos as posted by @Munzey, providing an example repository in which you depend on |
also we havent published the iOS artifact yet (see #23 ) so trying to use kotlin-result in common dependencies in a kmm project where you have iOS target defined is going to fail. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@michaelbull Hey as I said earlier , I was facing same issue with my library and today I fixed it , So I tried to test your project too as I hoped I could maybe help. But after adding a dependency on this Lib it compiled successfully. If Anybody could share a reproducer , I am more than happy to help and even create a PR if i could fix the issue PS: if you want to add an Android Target too , I can do that and then maybe those who are facing the issue can test again, adding android target in my project fixed the Issue too |
Thanks @Shabinder - knowing that you can depend on this library from an android project without problems is very useful to know 👍. I am tempted to close this issue going forward until somebody submits a reproducible case, as I still can't exactly diagnose the issue reported in the OP on my own computer nor can I find any information as to what this "sourcesjar" thing is. |
I can confirm one more thing sourcesjar issue happens if the lib doesn't have all targets which your projects targets. |
I ran into this issue with mockk also. FYI, I created https://youtrack.jetbrains.com/issue/KTIJ-10769. |
Anyone found a solution for this problem? I'm having the same problem trying to import my kmm library into my android project! |
@moeindev this is a general Kotlin MPP problem, see: https://youtrack.jetbrains.com/issue/KTIJ-10769 |
I'm trying to import
com.michael-bull.kotlin-result:kotlin-result:1.1.8
in thecommonMain
source set in a multiplatform project, but the gradle build is failing with this stacktrace:Gradle import errors
project ':web': Unable to build Kotlin project configuration
Details: org.gradle.internal.operations.BuildOperationQueueFailure: There was a failure while populating the build operation queue: Could not find kotlin-result-1.1.8-samplessources.jar (com.michael-bull.kotlin-result:kotlin-result:1.1.8).
Searched in the following locations:
https://repo.maven.apache.org/maven2/com/michael-bull/kotlin-result/kotlin-result/1.1.8/kotlin-result-1.1.8-samplessources.jar
Caused by: org.gradle.internal.resolve.ArtifactNotFoundException: Could not find kotlin-result-1.1.8-samplessources.jar (com.michael-bull.kotlin-result:kotlin-result:1.1.8).Searched in the following locations:
https://repo.maven.apache.org/maven2/com/michael-bull/kotlin-result/kotlin-result/1.1.8/kotlin-result-1.1.8-samplessources.jar
I'm using the same dependency in another (JVM-only) project and it works perfectly. Is there something I'm missing with multiplatform configuration that will solve this? Thanks!
The text was updated successfully, but these errors were encountered: