typescript-generator icon indicating copy to clipboard operation
typescript-generator copied to clipboard

Application of the Gradle plugin adds 50s to the configuration phase of the build

Open kubapet opened this issue 2 years ago • 1 comments

image

Just a pure application of the plugin almost doubles the build time of our project. I just had a brief look into the code, maybe it is caused by the iteration over the existing task of the project?

        for (Task task : project.getTasks()) {
            if (task.getName().startsWith("compile") && !task.getName().startsWith("compileTest")) {
                generateTsTask.dependsOn(task.getName());
                generateTsTask.getInputs().files(task);
            }
        }

I think you should leave the definition of the dependencies up to the consuming project. So that they can declare the task dependencies as they want.

kubapet avatar Apr 14 '22 08:04 kubapet

Interestingly, the time is not shown next to the plugin, but next to the overall time for the whole module.. But when I remove that plugin the overall time falls to 0.1s when I add just

plugins {
  id("cz.habarta.typescript-generator") version "2.36.1070"
}

and nothing else, the overhead is immediately back

kubapet avatar Apr 14 '22 08:04 kubapet