Hi Everyone! I’m trying to replace a legacy build with a modern Gradle/Kotlin DSL one, that would initially work side-by-side with the old one.
Currently we have Ivy, Ant, and some related properly files. With regards to Ivy dependencies, I load them with the extension function that I created:
fun DependencyHandler.ivyFile(file: String): List<Dependency?>
which in the build.gradle.kts of a given module is used like below:
and that loads all the dependencies from the ivy.xml file.
One problem is that Ivy XML files (and other files I parse) take a while to load, and they don’t change very frequently, but with my current solution they loaded on every build or project refresh in IDEA.
Is there a way to utilize some Gradle caching API to not parse these files when, say, they haven’t been modified? Ideally a cache of sorts, that would alleviate the need to reparse the files when switching between the branches. Something that would work similarly to Gradle task inputs and outputs, except with creating project dependencies on-the-fly, like I do?