Fix system property resolution at configuration time#78669
Fix system property resolution at configuration time#78669breskeby merged 1 commit intoelastic:masterfrom
Conversation
|
Pinging @elastic/es-delivery (Team:Delivery) |
|
This fixes system property resolution when running the build with --configuration-cache One step closer to make use of configuration cache |
| .orElse("") | ||
| .forUseAtConfigurationTime() | ||
| .get(); | ||
| .getOrElse(""); |
There was a problem hiding this comment.
For my own education, why is this way better?
There was a problem hiding this comment.
the forUseAtConfigurationTime() unfortunately isn't applied to the Provider returned I the orElse block, which makes the build fail when running with configuration-cache enabled. That behaviour is quite unexpected, at least for my understanding. I'm discussing the shortages of this api with the Gradle team
There was a problem hiding this comment.
having said that the gradle team mentioned that forUseAtConfigurationTime will go away in the future
There was a problem hiding this comment.
having said that the gradle team mentioned that forUseAtConfigurationTime will go away in the future
Is there going to be a replacement? Does that mean that you can't depend on things like system properties or environment variables at configuration time?
💔 Backport failed
You can use sqren/backport to manually backport by running |
This fixes system property resolution when running the build with --configuration-cache One step closer to make use of configuration cache
* Resolve system properties in build scripts via provider factory (#76199) This allows tracking system properties used in the build configuration and brings us one step closer to be gradle configuration cache compliant. * Fix system property resolution at configuration time (#78669) This fixes system property resolution when running the build with --configuration-cache One step closer to make use of configuration cache
This fixes system property resolution when running the build with
--configuration-cacheOne step closer to make use of configuration cache