Hey!. I'm facing an issue while trying to work on ...
# kotest
h
Hey!. I'm facing an issue while trying to work on https://github.com/kotest/kotest/issues/2011 and honestly I thought someone here would be able to help. 😅 When opening
kotest
in Intellij, and adding a new module under
kotest-extensions
(e.g.
io.kotest.extensions.htmlreporter
), I can't for the life of me find a way to import
io.kotest.core
. I'm sure this is probably something obvious that I'm missing but I've tried a couple different ways and can't seem to understand what...if anyone has any idea, I'd be extremely thankful. You can see the code (2 files) I added here:https://github.com/caramelomartins/kotest/tree/master/kotest-extensions/kotest-extensions-htmlreporter. Thanks!
s
What do you mean by import
Like just add import io.kotest.core.TestCase or something
h
Yeah. I was trying to do
import io.kotest.core.listeners.TestListener
...somehow Intellij never recognizes it.
s
hmmm odd
what about if you compile via gradle
h
trying ✅
./gradlew compileKotlin
builds just fine
maybe I'm not importing the module correctly
s
so it's just intellij being weird
h
I've added the extension to
settings.gradle.kts
with
include("kotest-extensions:kotest-extensions-htmlreporter")
and it still compiles...
s
did you click the little resync button in intellij
h
doing it now
s
h
I did it once and it didn't work.
what is odd is that now it doesn't show reference errors for
TestListener
, but if I try to type the entire package it stops being able to reference at
core
...
now it can reference it...
oh god...
sorry about the hassle.
s
MPP builds in intellij can require a bit of patience
it's not fully mature imo
h
somehow I think what did the trick was your suggestion of building it manually...
s
right
h
brilliant. I can now use the
ProjectListener
which was what I need. thank you Sam! and I apologize for the hassle
s
no hassle at all, happy to help