How to execute with a command and avoid configuration #48
-
First of all I'm not a gradle expert, I'm still learning and find myself in the first steps to understand gradle lifecycle and how to improve build times I was looking forward to run in a similar way to other plugins ./gradlew :app:trackTime and not execute the plugin in every run But maybe this is not possible, and I'd like to know what other options are there and if I'm missing some knowledge then feel free to point it out. As I said not an expert but looking forward to understand what can be done/improved Thank you! |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
A plugin is not executed, tasks are executed. The plugin's job is to track the time taken by the tasks in the build, and that's what it does. If you don't want the plugin to do that, why would you include it in your build anyway?
Sure, but what does it have to do with this plugin? The plugin doesn't register its own tasks. If you're asking about configuration caching, this plugin is compatible with Gradle configuration cache.
Under what condition(s) do you want the plugin to "execute", whatever execute means? |
Beta Was this translation helpful? Give feedback.
-
Nope, not this one, it works by observing Gradle build lifecycle. Some plugins may register tasks, but they are not required to.
That's not the purpose of this plugin. It tracks individual builds, not run on a schedule. You'll have to roll your own mechanism to do that. |
Beta Was this translation helpful? Give feedback.
-
I've not measured it. The plugin doesn't do network calls or complicated number crunching, so, the time taken is mostly for generating the output, i.e. writing to the console or CSV, which is negligible compared to the total build time (definitely not in the ballpark of 30 seconds or 1 minute). I hope I've answered your questions satisfactorily because I'm going to lock this question down, as this is turning into less about the plugin, more about advising on your particular project requirement. |
Beta Was this translation helpful? Give feedback.
Nope, not this one, it works by observing Gradle build lifecycle. Some plugins may register tasks, but they are not required to.
That's not the purpose of this plugin. It tracks individual builds, not run on a schedule. You'll have to roll your own mechanism to do that.