Everett Corvid
11/29/2023, 1:11 AMdependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
...
}
The above just gives the error "Unexpected tokens (use ';' to separate expressions on the same line)" and I cant find anything about using or not using that online and it doesn't seem to exist. ive tried with and without ( ), ive tried looking up every combination of the above I could think of, I don't even know where to look.Jeff Lockhart
11/29/2023, 1:16 AMJeff Lockhart
11/29/2023, 1:19 AMShawn
11/29/2023, 1:19 AMJeff Lockhart
11/29/2023, 1:22 AMdependencies {
compile("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
...
}
But again, you shouldn't need to declare the standard library dependency explicitly with a recent version of Kotlin, like 1.9.21.Vampire
11/29/2023, 1:46 AMcompile
is deprecated since many many many years and was finally removed in 7.0.
So unless you use an ancient Gradle version, even what @Jeff Lockhart showed will not compile as there is no compile(...)
anymore unless you add it yourself or through some strange plugin.Vampire
11/29/2023, 1:48 AMJeff Lockhart
11/29/2023, 2:09 AMcompile
, I read it as compileOnly
! You should replace compile
here with implementation
, or if you need to transitively share the dependency's API, use api
.
I'd probably recommend finding a newer edition of this book, or another newer resource to follow, so you're not learning outdated information.Everett Corvid
11/29/2023, 7:40 PMVampire
11/29/2023, 7:57 PMTrying to look up how to include coroutines in the gradle build just simply turns up nothing useful to meThe page shows it, the bold line. It is just the Groovy DSL variant. For Kotlin, add parens around the string and use double-quotes. Also the coroutines readme has a Kotlin example: https://github.com/Kotlin/kotlinx.coroutines
Are there any useful guides, references, overviews to the gradle build script?The Gradle user manual for example? https://docs.gradle.org/current/userguide/userguide.html
Jeff Lockhart
11/29/2023, 8:10 PMEverett Corvid
11/29/2023, 8:10 PMJeff Lockhart
11/29/2023, 8:13 PMEverett Corvid
11/29/2023, 8:48 PMJeff Lockhart
11/30/2023, 5:33 PM