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

Kirill Zhukov

03/03/2023, 9:28 PM
Any way to make property delegation work for getting source sets in custom Gradle build logic plugin?
got these imports but doesn’t seem to work:
Copy code
import org.gradle.kotlin.dsl.getting
import org.gradle.kotlin.dsl.provideDelegate
d

Derek Ellis

03/03/2023, 9:47 PM
Do you have the
{}
?
val iosMain by getting {}
k

Kirill Zhukov

03/03/2023, 9:53 PM
{}
is n’t necessary if I just wanna get a source set
Adding
import org.gradle.kotlin.dsl.getValue
import works 🤪
🤌
a

Adam S

03/04/2023, 8:33 AM
I find often it's easier just to add a wildcard import to avoid weirdness like that
Copy code
import org.gradle.kotlin.dsl.*
You can tell the IntelliJ formatter to wildcard import that package by default
5 Views