Slackbot
12/21/2023, 9:46 PMChris Lee
12/21/2023, 10:22 PMMikhail Lopatkin
12/22/2023, 9:27 AM<root project>/build/reports/configuration-cache
, the exact path is printed when running gradle with --info
) can be used to find out what exactly reads this environment variable. More context is in the issue https://github.com/gradle/gradle/issues/21224.Ryan Schmitt
12/22/2023, 9:13 PMSystem.getenv()
, which of course is interpreted as reading all the environment variablesRyan Schmitt
12/22/2023, 9:16 PMProviderFactory
and call environmentVariablesPrefixedBy
Ryan Schmitt
12/22/2023, 9:28 PM@Incubating
but I got desensitized to that annotation a long time agoChris Lee
12/22/2023, 9:28 PMenvironmentVariablesPrefixedBy
and other related items are implemented. Depends on how complex your logic is (if its truly a simple env var lookup your approach will work fine).Ryan Schmitt
12/22/2023, 9:30 PMValueSource
once before, this is definitely easier. I still don't actually understand ValueSourceParameters
Chris Lee
12/22/2023, 9:32 PMValueSourceParameters
would be inputs into your ValueSource; in the case of environmentVariablesPrefixedBy
(org.gradle.api.internal.provider.sources.EnvironmentVariablesPrefixedByValueSource
), its the prefix to search by. For custom value sources parameters may be say an API endpoint to invoke or something else that makes sense in the context of your custom logic.Ryan Schmitt
12/22/2023, 9:34 PM@Inject
a typed parameter list, which is morally equivalent not to dependency injection but to simple method argumentsRyan Schmitt
12/22/2023, 9:35 PMValueSource
is called via obtain()
and gets its arguments through a kind of side channelRyan Schmitt
12/22/2023, 9:35 PMChris Lee
12/22/2023, 9:35 PMRyan Schmitt
12/22/2023, 9:36 PMRyan Schmitt
12/22/2023, 9:37 PMChris Lee
12/22/2023, 9:37 PMRyan Schmitt
12/22/2023, 9:38 PMRyan Schmitt
12/22/2023, 9:39 PMChris Lee
12/22/2023, 9:40 PMRyan Schmitt
12/22/2023, 9:40 PMRyan Schmitt
12/22/2023, 9:41 PMRyan Schmitt
12/22/2023, 9:41 PMThis paper describes a reduction from the halting problem of Turing machines to subtype checking in Java.lol owned
Chris Lee
12/22/2023, 9:42 PMRyan Schmitt
12/22/2023, 9:53 PM