6

I am currently trying out Gradle for my embedded development project. The existing tool is GNU Make. Across the internet I have read a lot of articles where people say that their build logic becomes "too complex" and they would like to reduce "complexity". This I believe is basically a developer's or build author's perception of complexity of build scripts. Are there any ways to formally express complexity of build logic? I did a bit of digging and came up with this for Makefiles complexity. Is there already an existing measure for build.gradle's complexity?

Müller
  • 161
  • 2
  • I have never seen complex gradle scripts but i have seen lots of complex ant and make scripts. Since gradle is declarative (i.e. you have to define **what** you need but **not how to do it** and there are sub-modules (aka "plugins") that translate the "what" into how.. I am not shure if complex(=spagetti-code) gradle scripts exist – k3b Apr 20 '20 at 13:13
  • @k3b worse, that means the plugin is part of your script and the plugins are always leaky abstractions. That makes the overall complexity very high. – user253751 Apr 14 '21 at 15:53

1 Answers1

-1

There is the --profile option:

If we want to know more about how much time is spent in tasks we can use the --profile command-line option. Gradle will generate a report file in the build/reports/profile directory. This report file is a HTML file with information about how much time is spent by the different tasks and processes of Gradle.

As well as the gradle profiler:

A tool to automate the gathering of profiling and benchmarking information for Gradle builds. Profiling information can be captured using several different tools...

References

Paul Sweatte
  • 382
  • 2
  • 15