Having version lazy is way older than the provider API. For Gradle 9 (iirc) there is an effort to fully lazify the Gradle core API. We'll see whether this includes the version. In the meantime the "proper" way is to have something that does the lazy calculation in it's
toString
as version.
t
Thomas Keller
09/20/2023, 4:29 PM
But practically this also means that I can't set the output of a task as value somehow, correct?
v
Vampire
09/20/2023, 4:31 PM
You couldn't either way usually. Chances are, the version is resolved before your task would have run
t
Thomas Keller
09/20/2023, 4:31 PM
Yeah, almost thought something like this, but wanted to be sure. Thanks!