https://kotlinlang.org logo
#getting-started
Title
# getting-started
d

Dan Storm

10/23/2023, 10:36 AM
Hi. I'm quite new with Kotlin and everything that revolves around it and I'm trying to create a small Ktor project. I want to try another OpenAPI plugin. I'm trying to go with one that is recommended multiple times. To achieve that, I added the following line to my
build.gradle.kts
file_
Copy code
implementation("guru.zoroark.tegral:tegral-openapi-ktor:$tegral_openapi_version")
    implementation("guru.zoroark.tegral:tegral-openapi-ktorui:$tegral_openapi_version")
I don't get any errors from this, when running my application, but I can't seem to get the packages installed. I tried with
./gradlew build --refresh-dependencies
which seems to execute without any errors. Might anyone know why they don't get installed?
s

Sam

10/23/2023, 10:48 AM
Can you say more about what problem you see when you actually try to run the application or use these packages? Did you already try to add
install(TegralOpenApiKtor)
in the appropriate place in your code, as mentioned in the docs?
d

Dan Storm

10/23/2023, 10:50 AM
Well, if I add
install(TegralOpenApiKtor)
IntelliJ tells me the following:
Copy code
Unresolved reference: TegralOpenApiKtor
Manually adding
import guru.zoroark.tegral.openapi.ktor.*
tells me that
guru
is an unresolved reference.
Looking into my "External Libraries", I can't find it either.
s

Sam

10/23/2023, 10:51 AM
As well as running the Gradle build, did you run the 🔃 "Reload all Gradle Projects" action? That's important any time you modify the build script. IntelliJ will normally prompt you by showing a floating button at the top of the build script file too.
d

Dan Storm

10/23/2023, 10:53 AM
I did not. I saw no prompts after editing my build script, but rinning the "Reload all Gradle Projects" action seems to have fixed the problem. Thank you.
🍻 1
c

CLOVIS

10/23/2023, 12:13 PM
@Dan Storm in "File | Settings | Build, Execution, Deployment | Build Tools", you can configure IntelliJ to always reload Gradle when you edit the build scripts
2 Views