This message was deleted.
# plugin-development
s
This message was deleted.
1
v
Maybe
zip
two, then
zip
the result with the third and the result with the fourth? The resuld of the first two `zip`s could be a pair and triple, or POJO for example.
j
The trickiest part here were nested ifs, but I’ve managed it. 🙂
Copy code
untilBuild.convention(
    extension.sameSinceUntilBuild
        .flatMap { sameSinceUntilBuild ->
            untilBuild.map { "$it.*" }
                .takeIf { sameSinceUntilBuild }
                ?: buildNumberProvider.map { "${IdeVersion.createIdeVersion(it).baselineVersion}.*" }
        }
        .zip(extension.updateSinceUntilBuild) { untilBuild, updateSinceUntilBuild ->
            untilBuild.takeIf { updateSinceUntilBuild }
        }
)
c
I’ve used https://github.com/wernerdegroot/applicatives recently to code-gen a multi-zip