Javi
01/14/2025, 11:11 AMVampire
01/14/2025, 11:13 AMMartin
01/14/2025, 11:13 AMJavi
01/14/2025, 11:13 AMMartin
01/14/2025, 11:14 AMVampire
01/14/2025, 11:14 AMVampire
01/14/2025, 11:14 AMJavi
01/14/2025, 11:14 AMMartin
01/14/2025, 11:15 AMJavi
01/14/2025, 11:17 AMRemoteTask
abstract class from Gradle that allows this in an easy way.
You could have a separate task that gets the Json and is always done and then have the real task cacheable depending on that task's output file.So, depending on what will do the real task, it would be worth or not having two task or just one and execute it always. The real use case is generating a Kotlin file inside the Kotlin source directory based on that json that can change even the URL being the same every time.
Vampire
01/14/2025, 11:18 AMsrcDir
for the respective Kotlin source directory set.Vampire
01/14/2025, 11:19 AMRemoteTask
I don't think that makes too much sense, especially as it is easy to do already. You can use any task to do the remote operation an have the result as output and then use that as input for the other task.Vampire
01/14/2025, 11:20 AMMartin
01/14/2025, 11:20 AMbuild
target. It's only provided as a convenience. We then tell users to commit the schema to make sure their builds are reproducibleVampire
01/14/2025, 11:20 AMTextResource
from URI to get the remote file, but that might then not work too good and also download the file when not necessary at allMartin
01/14/2025, 11:20 AMVampire
01/14/2025, 11:21 AMJavi
01/14/2025, 11:22 AMkotlin.srcDir(myTask)
.
> But regarding a dedicated RemoteTask I don't think that makes too much sense, especially as it is easy to do already. You can use any task to do the remote operation an have the result as output and then use that as input for the other task.
The problem is, IMO, it is not intuitive you need two tasks for this, people can struggle with this.
> @Javi we have a similar thing in Apollo were we have a task that downloads a "maybe changing" schema. That task is not part of the build target. It's only provided as a convenience. We then tell users to commit the schema to make sure their builds are reproducible
Currently we are using a script that is executed manually, so it would be a similar case.Martin
01/14/2025, 11:24 AMVampire
01/14/2025, 11:24 AMVampire
01/14/2025, 11:25 AMMartin
01/14/2025, 11:25 AMMartin
01/14/2025, 11:25 AMMartin
01/14/2025, 11:26 AMMartin
01/14/2025, 11:27 AMJavi
01/14/2025, 11:27 AMMartin
01/14/2025, 11:27 AMI was thinking the task action would be able to detect if the input has not changed in order to be executed again or notYour input is the state of the internet
Martin
01/14/2025, 11:28 AMMartin
01/14/2025, 11:29 AMJavi
01/14/2025, 11:29 AMJavi
01/14/2025, 11:29 AMVampire
01/14/2025, 11:30 AM@RemoteInputFile
input property annotation, that will cause the file to be downloaded and then used as input. š¤·āāļøJavi
01/14/2025, 11:30 AMVampire
01/14/2025, 11:31 AMJavi
01/14/2025, 11:47 AMephemient
01/14/2025, 12:16 PMJavi
01/14/2025, 12:28 PMephemient
01/14/2025, 12:32 PMephemient
01/14/2025, 12:33 PMPaul Merlin
01/14/2025, 12:57 PMValueSource
doing the HEAD/Etag works.Vampire
01/14/2025, 1:02 PMDmitry Lapshin
01/15/2025, 5:01 PMVampire
01/15/2025, 5:46 PMDmitry Lapshin
01/15/2025, 9:48 PMVampire
01/15/2025, 9:54 PMundercouch
, not michel-kraemer
.
And additionally you announced it as a new contribution to the thread while we already talked about that plugin above, but you probably missed that. šDmitry Lapshin
01/16/2025, 8:34 PM