elect
04/03/2023, 8:37 AMimplementation(kotlin("stdlib-jdk8"))
will grab the kotlin version specified by
plugins {
kotlin("jvm") version ..
}Adam S
04/03/2023, 9:13 AMtapchicoma
04/03/2023, 9:14 AMkotlin.coreLibrarariesVersionephemient
04/03/2023, 9:18 AMorg.jetbrains.kotlin package with kotlin.coreLibrariesVersionephemient
04/03/2023, 9:18 AMelect
04/03/2023, 9:19 AMephemient
04/03/2023, 9:21 AMmbonnin
04/03/2023, 1:14 PMelect
04/03/2023, 1:23 PMmbonnin
04/03/2023, 1:24 PMimplementation(kotlin("stdlib")) is actually the same as doing nothing because KGP will add it for you by defaultmbonnin
04/03/2023, 1:26 PMtapchicoma
04/03/2023, 2:00 PMapimbonnin
04/03/2023, 2:00 PMmbonnin
04/03/2023, 2:01 PMelect
04/03/2023, 2:02 PMbtw KGP adds stdlib dependency insorry, but why was decided that instead ofapi
implementation?Adam S
04/03/2023, 2:32 PMsorry, but why was decided that instead ofJust guessing: to be more compatible with Maven consumers. I half-remember something about the API scope being more akin to how Maven dependencies are exposed between projects.?implementation
mbonnin
04/03/2023, 2:36 PMkotlin-stdlib symbols from it's public API.mbonnin
04/03/2023, 2:37 PMkotlin.Unit and kotlin.collections.List is pretty hard to hide to consumersephemient
04/03/2023, 5:22 PMkotlin.Unit doesn't usually show up unless you're exposing () -> Unit lambdas (in which case you're definitely using kotlin.Function* function types so it is part of your API regardless of Unit)ephemient
04/03/2023, 5:23 PMkotlin.collections.List doesn't exist at runtime, it becomes java.util.List in the Java signaturesmbonnin
04/03/2023, 5:23 PMkotlin.collections.List though?ephemient
04/03/2023, 5:24 PMkotlin.Metadata yes, but that's opaque to Java (and annotation classes do not need to exist at runtime)mbonnin
04/03/2023, 5:24 PMapi is also for Kotlin consumersmbonnin
04/03/2023, 5:25 PMjavaApi and kotlinApi blob upside downmbonnin
04/03/2023, 5:25 PMelect
04/03/2023, 5:25 PMephemient
04/03/2023, 5:26 PMkotlinApi(stdlib) is not useful at all. either it's a compatible version of stdlib, in which case the consumer already has it, or it isn't compatible with the consumer's compiler, in which case it'll fail regardless of declared transitive dependenciesephemient
04/03/2023, 5:26 PMapi(java.base version) eithermbonnin
04/03/2023, 5:27 PM