https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
m

Mikhail

07/28/2022, 8:10 AM
How do I fix this?
Am using Kotlin 1.7.10 with Gradle 7.4.1
a

Anton Lakotka [JB]

07/28/2022, 8:17 AM
like that:
Copy code
val jvmMain by getting {
}
m

Mikhail

07/28/2022, 8:18 AM
Thanks.
e

ephemient

07/28/2022, 8:30 AM
there's also
by creating
,
by existing
, and
by registering
, all of which work in all named domain object collections in Gradle Kotlin DSL
m

Mikhail

07/28/2022, 8:31 AM
Gradle moment. Why can't we have single
by getting
a

Anton Lakotka [JB]

07/28/2022, 8:47 AM
Gradle moment. Why can't we have single
by getting
You can make PR to gradle and propose
maybeCreating
that will be backed by
maybeCreate
(https://docs.gradle.org/current/javadoc/org/gradle/api/NamedDomainObjectContainer.html#maybeCreate-java.lang.String-)
e

ephemient

07/28/2022, 8:56 AM
they are the equivalent of
getByName()
,
named()
,
create()
,
register()
- and for lazy configuration, the distinction between them is important
5 Views