I'm currently struggling with type errors, as in: ...
# gradle
b
I'm currently struggling with type errors, as in: https://docs.gradle.org/current/userguide/lazy_configuration.html#working_with_files_in_lazy_properties fails with a compilation error: Line 185: releaseZip = layout.buildDirectory.file("release.zip") ^ Type mismatch: inferred type is ProviderRegularFile!! but RegularFileProperty was expected I'm not sure if this is caused by using kotlin 2.0 but still having 1.9 in kotlin-dsl: The
embedded-kotlin
and
kotlin-dsl
plugins rely on features of Kotlin
1.9.24
that might work differently than in the requested version
2.0.20
. Edit: got it: it seems that there's compiler magic at work; only gets generated correctly when using val, not var
โœ… 1
v
Exactly. ๐Ÿ™‚ There is a compile plugin that lets use assignment operator on
val
in specially prepared cases like
Property<>
. ๐Ÿ™‚
b
such a pain xD
v
?!?
b
I mean I guess it's great that it works, but it's not discoverable
v
Well, complain to the IDE about that I guess? Or maybe to the Kotlin compile which could maybe say "if this were val it would have worked"? ๐Ÿคทโ€โ™‚๏ธ
b
exactly
on a language level, it looks like you'd want a delegated property
v
It is a built-in compile plugin developed by JetBrains after cooperating with the Gradle folks on how to best solve the use-case, so I'd guess it is exactly the right solution ๐Ÿ™‚
b
agreed
on a related note, I'm struggling with gradle documentation pretty frequently, what are you reading to stay up to date or get into how things work?
v
Imho the Gradle documentation is a great piece of work, especially compared to how software projects often are documented - or not - otherwise. How I personally stay up to date is looking at the release notes to get the diff of what's new. But I use Gradle since pre-1.0 phase, so you can say I'm grown up with it. ๐Ÿ˜„
Actually, how I often learn new things about Gradle I didn't know yet is, by helping other users solving their problems. ๐Ÿ˜„
๐Ÿง  1
gratitude thank you 1
b
I see, thank you ๐Ÿ™‚