Caleb Cushing
10/29/2024, 4:10 PMGabriel Feo
10/29/2024, 4:29 PMprovider { }, for example, it isn't.Caleb Cushing
10/29/2024, 4:33 PMCaleb Cushing
10/29/2024, 4:33 PMCaleb Cushing
10/29/2024, 4:34 PMCaleb Cushing
10/29/2024, 4:34 PMCaleb Cushing
10/29/2024, 4:35 PMGabriel Feo
10/29/2024, 5:27 PMTextResourceFactory.fromUri, but I'm not sure what its behavior is if you need it at configuration time. I've only used it at execution time so far (example).Vampire
10/30/2024, 3:54 AMValueSource is queried once per buildThat's not fully true. If the CC entry cannot be reused, it is evaluated twice in that build, once to find the CC entry cannot be reused and then again to create the new CC entry.
or will they always be re-retrieved unless I manually handle that?You can use a
Property to create a cached `Provider`: https://github.com/gradle/gradle/issues/25550
But this is not something persisted, just within one build execution.Gabriel Feo
10/30/2024, 12:32 PMThis method is only called if the provider value is requested and only once in that case.I couldn't find an open issue or PR. Unless you know of one, I can open it
Vampire
10/30/2024, 1:15 PMCaleb Cushing
10/30/2024, 1:16 PMVampire
10/30/2024, 1:20 PMGabriel Feo
10/30/2024, 1:20 PMVampire
10/30/2024, 1:21 PMVampire
10/30/2024, 1:21 PMCaleb Cushing
10/30/2024, 1:22 PMGabriel Feo
10/30/2024, 1:23 PMVampire
10/30/2024, 1:23 PMCaleb Cushing
10/30/2024, 1:25 PMVampire
10/30/2024, 1:26 PMCaleb Cushing
10/30/2024, 1:26 PMCaleb Cushing
10/30/2024, 1:26 PMVampire
10/30/2024, 1:28 PMValueSource, in there read the result from some text file where you persisted it, if not found doing the request and persisting it.
Something like that.Caleb Cushing
10/30/2024, 1:31 PMCaleb Cushing
10/30/2024, 1:34 PMVampire
10/30/2024, 1:36 PMproviders.of the value will be calculated once or twice.
Twice if a CC entry exists but cannot be reused, the first time when determining whether the entry can be reused, the second time when the new CC entry is calculated.Caleb Cushing
10/30/2024, 1:39 PMVampire
10/30/2024, 1:52 PMProperty in the chain that has finalizeValueOnRead() or finalizeValue(), it will also only be calculated once and then the same result returned.
...Caleb Cushing
10/30/2024, 1:53 PMCaleb Cushing
10/30/2024, 1:55 PMCaleb Cushing
10/30/2024, 1:55 PMCaleb Cushing
10/30/2024, 1:56 PMVampire
10/30/2024, 1:58 PMCallable, but I don't know what you mean by "callable provider"Caleb Cushing
10/30/2024, 1:59 PMCaleb Cushing
10/30/2024, 1:59 PMVampire
10/30/2024, 1:59 PMCaleb Cushing
10/30/2024, 1:59 PMVampire
10/30/2024, 1:59 PMCaleb Cushing
10/30/2024, 2:00 PMVampire
10/30/2024, 2:00 PMprovider { "foo" }?Vampire
10/30/2024, 2:00 PMget() itCaleb Cushing
10/30/2024, 2:00 PMVampire
10/30/2024, 2:00 PMCaleb Cushing
10/30/2024, 2:01 PMCaleb Cushing
10/30/2024, 2:23 PMvalueSource { "foo" } . which you could also do with a kotlin extension. I'm not saying that's not useful.Vampire
10/30/2024, 2:31 PMvalueSource { "foo" } is pretty inappropriate, as ValueSource is for doing CC-incompatible things or accessing things that should not end up as CC inputs and also will be evaluated each build, even if CC is reused and even twice if CC entry is present but not reused, so a totally different topic again.Caleb Cushing
10/30/2024, 2:32 PMCaleb Cushing
10/30/2024, 2:33 PMCaleb Cushing
10/30/2024, 2:47 PM