MobiVM / robovm

Ahead of time compiler for JVM bytecode targetting iOS, Mac OSX and Linux
https://mobivm.github.io
966 stars 133 forks source link

Configure Gradle plugin tasks lazily #701

Closed bartekpacia closed 1 year ago

bartekpacia commented 1 year ago

Issue details

robovm-gradle-plugin creates all its Gradle tasks eagerly, which is bad for build performance.

See also:

Reproduction steps/code

Follow steps described in Gradle guide – Avoiding unnecessary task configuration.

I run ./gradlew :help --scan and it was easy to see that this plugin registers its task eagerly:

Screenshot 2023-01-08 at 11 02 34 PM

Configuration

RoboVM Gradle plugin 2.3.18

dkimitsa commented 1 year ago

hi, thank you for report. just for clarification -- are we talking about optimising 0.116s here ?

bartekpacia commented 1 year ago

Yes, but this is on my M1 MacBook – I'm sure there are many people on slower machines where this 0.116s could become e.g 0.5s.

Also, this change usually isn't hard - Gradle docs explain it very clear.

I can make a PR when I find some time :)

dkimitsa commented 1 year ago

thx, will wrap into project.getTasks().register during pending plugin maintenance