Jmix build performance

I have a project with multiple addons, the total build time is bad.

clean then assemble
image

assemble without clean
image

The main problem is the “CompileWidgets” tasks in each addon…
I think it’s a dependency to the map addon which force the compileWidgets…

How can I get a quick build ?

Hello!

Could clarify Jmix version do you use? Is WidgetsCompile task performed for each application run?
Since Jmix 1.2 added includePaths attribute to compileWidgets task configuration. It means that task will be performed only if code in the provided paths is changed.

Could you check the build.gradle file, there should be the following task configuration:

compileWidgets {
    dependsOn(processResources)
    generate "com.company.myapp.widgets.CustomWidgetSet"
    includePaths("**/io/jmix/**/widget/**", "**/com/company/myapp/widgets/**")
}

If no, please add this code. Due to this configuration, the subsequent builds won’t run the WidgetsCompile task.

Note, the second path should be changed according to your application package structure.