my copy task hangs gradle
# kobalt
g
my copy task hangs gradle
in both groovy and kotlin
Copy code
tasks.register<Copy>("vcpkgMakeManifest") {
        dependsOn(":api:vcpkgBootstrap")

        from("vcpkg.template.json")
        rename("vcpkg.template.json", "vcpkg.json") //TODO: is this a regex?
        into("$rootDir/vcpkg")
        filter { line ->
            line.replace("%volitionFullVersion%", volitionFullVersion)
                .replace("%protobufVersion%", protobufVersion)
                .replace("%grpcVersion%", grpcVersion)
        }
    }
hangs gradle.
c
So ugly 😕
g
its so disappointing. If it was ugly because I was using things like
Files.readALlLines()
or
Files.copy()
I could forgive it because then im just using standard kotlin file manipulations, but im not, im using their custom syntax. Is their custom syntax slick? Not particularly. I also only just learned, thanks to kotlins parameter labelling feature, that `rename()`'s first parameter is
sourceRegEx
. so now im wondering if maybe gradle is hanging --a completely rediculoous failure mode for such a basic behaviour-- because of some kind of exponential backoff in
vcpkg[WILDCARD]template[WILDCARD]json
, so I tried replacing
.
with `\\.`and... still hangs. my original suspcicion was that this is some bug in the async code communicating between the gradle client and the gradle daemon. Is that suspicion correct? I just... this isnt the problem i want to be working on. My real problem is that visual studio's include paths are messed up. This is a problem I have to solve on the way to my real problem. I feel like this so often with gradle and its exasperating.