so i am trying to use multiplatform with gradle-kt...
# multiplatform
n
so i am trying to use multiplatform with gradle-kts and for some reason on dependencies block api and implementation seem to be special cases and they work (although only with a single string input, no splitting into group, name, version) and compile or even custom configurations do not work at all using gradle 5.5 and kotlin 1.3.40 the custom configuration is set up in a plugin in buildSrc
DefaultKotlinDependencyHandler
seems to not handle things that the nromal dependencies block ca.. or maybe its just the kts bit thats broken ?
h
The
KotlinDependencyHandler
is indeed a different construct than the Gradle's built-in dependencies DSL. In short, a
KotlinDependencyHandler
translates dependencies that you add to ordinary Gradle dependencies in underlying configurations, so it is an abstraction layer for dependencies of Kotlin source sets. Therefore, it doesn't support custom confiugurations and can only handle dependencies with predefined scopes:
api
,
implementation
,
compileOnly
,
runtimeOnly
. Use
api
as an equivalent for the Gradle's
compile
configuration. For custom configurations, use the top-level
dependencies { ... }
block rather than the dependencies of the Kotlin source sets.
n
then iuts stupid that idea will not error on putting all of the usual configurations in there if its limited to only those and only with string inputs i wll try out what happens when i intermix top level dependencies and sourceSet specific dependnecies