0

I'm following a guide for using the WebClient class in my kotlin project. I'm using gradle as my build tool, so per the "Building with Gradle" section:

gradle instructions

I added the compile line to my dependencies:

dependencies {
    compile("org.springframework.boot:spring-boot-starter-webflux")
}

I'm using the kotlin dsl instead of the groovy dsl

When I do it wants me to import the compile function. Makes sense, though I don't know which compile function it's expecting.

compile function imports

My assumption was that it was the fourth one down coming from the gradle package, but considering it's for use with a JSON pointer it seems wrong (plus I tried importing it to see and it didn't build correctly).

Which compile is gradle expecting? It seems like it should be a simple question that's easy to find the answer for, but searching through the docs and the internet for specifics on a function named compile, even with the context of use within the gradle build tool, is an apparent wild goose chase.

Chris Schmitz
  • 20,160
  • 30
  • 81
  • 137
  • 1
    [The `compile()` dependency container was removed in Gradle 7](https://docs.gradle.org/current/userguide/upgrading_version_6.html#sec:configuration_removal). `compile()` should usually be replaced with `implementation()`, but it can also be replaced with `api()` https://stackoverflow.com/q/44493378/4161471 – aSemy Mar 15 '23 at 15:04
  • Aaaah ok awesome. Thanks for letting me know. I'm new to gradle (and still a bit new to java/kotlin) so I def appreciate the head's up and additional context. Thanks! – Chris Schmitz Mar 15 '23 at 17:50

0 Answers0