I have a multiplatform library that I published to...
# multiplatform
m
I have a multiplatform library that I published to my private repository. My source set names are
common
server
and
browser
. When publishing I changed the artifact ID to
project
,
project-jvm
and
project-js
respectively so it would automatically pick them up for the platform. In the multiplatform project where I'm using the library I can access everything perfectly on the
common
and
server
(JVM) modules, but for some reason in the
browser
(JS) module I can't access the library at all. Has anyone else encountered this kind of thing? I can confirm that all 3 packages are published to the repository
a
When publishing I changed the artifact ID to
project
,
project-jvm
and
project-js
respectively so it would automatically pick them up for the platform.
Gradle doesn’t select the Kotlin variant based on the artifact suffix, it uses Gradle module metadata https://stackoverflow.com/q/73914158/4161471 Whether this is related to your problem or not, I don’t know…
m
I see! Good to know. I will change those back and see if it fixes anything and report back
So it does indeed work without the suffixes. However, the issue for the JS platform still persists. Any further insight you can think of?
a
what’s the error?
m
No error. My IDE just doesn't resolve any imports from the dependency on the JS platform
Okay I just realized this is something specifically wrong with my PC. For some reason with the IR compiler IntelliJ won't resolve any dependencies in the JS module of multiplatform. If I have the same project on my other PC it will resolve them. Do you have any insight on what I can reset/delete/invalidate to fix this? I've already completely uninstalled IntelliJ and invalidated all caches with the built-in tools, but the issue persists
Note: this happens for all multiplatform projects using the IR compiler on my PC. I appreciate your input, but it looks like that was the main issue for my original issue.
a
so running
./gradlew build
works fine, it’s just IntelliJ?
m
Correct
a
weird
try deleting the caches in
$HOME/.gradle/
maybe
m
Yeah I'll load the same project on another PC and everything resolves fine in IntelliJ too
a
sometimes IntelliJ stores caches in there
m
I did try that as well earlier with no luck
Deleted the %appdata% IntelliJ install locations too
a
are there any errors in the IntelliJ log?
m
Not sure. Where can I find that?
m
Yeah looks like there some griping about cache timeouts and the
fileHashes.lock
. Then farther down some AccessDeniedExceptions
Copy code
Lock file: C:\Users\mark.vogel\Projects\ntc-assets\.gradle\7.5\fileHashes\fileHashes.lock

2023-02-13 23:29:24,861 [48235676]   WARN - #c.i.o.v.i.l.LocalFileSystemBase - C:\Documents and Settings
java.nio.file.AccessDeniedException: C:\Documents and Settings
I can upload the whole file if that might help identify it
a
it’d probably better to make an issue on YouTrack, with the log
m
Sounds good. Thanks for the help!