`implementation(enforcedPlatform("org.jetbrains.ko...
# javascript
r
implementation(enforcedPlatform("org.jetbrains.kotlin-wrappers:kotlin-wrappers-bom:${kotlinWrappersVersion}"))
I am not able to see
enforcedPlatform
in build.gradle.kts Do I have to use any other plugin as well ? cc @turansky This is from the kotlin-wrappers library
Works fine without plugins
v
Generally speaking you should avoid
enforcedPlatform
and in most cases use
platform
. In a library it is a particularly bad idea, in an end product it should only be used on edge cases. But besides that, both functions are part of the kotlin dsl classes, so it should just work.
r
I am this declaration not available
v
Probably the same or similar problem as with the test suites plugin here: https://github.com/gradle/gradle/issues/19065 Same work-arounds should work and same problem should probably be reported to JetBrains Kotlin team.
r
this works
Yes correct. Needs to be reported
I see another problem using
kotlin-wrappers
even I have imported the
mui.material.TextField
still IDE is not able to resolve this code
t
In Compose project? 🙂
r
yes its in compose project'
oh so can I not use this alongside compose web ?
a
@Vampire Is it okay to use
platform
in a library? Is it advised?
v
Yes,
platform
should be fine. With enforced it would be bad because something along the lines that it would also enforce those versions on downstream projects and that could easily lead to unsolvable problems or something like that. If you try to publish with enforced platform you even just get a failure that you have to disable explicitly if you really want that as it is seldomly the right thing to do.