ebean-orm-tools / ebean-gradle-plugin

Plugin that performs Enhancement (entity, transactional, query bean) and can generate query beans from entity beans written in Kotlin via kapt
Apache License 2.0
10 stars 12 forks source link

Use Gradle task configuration avoidance #32

Open jnehlmeier opened 3 years ago

jnehlmeier commented 3 years ago

Since Gradle 5.1 a new API exists to register and configure tasks lazily to avoid creating tasks during configuration phase.

https://docs.gradle.org/current/userguide/task_configuration_avoidance.html

Currently the Ebean Plugin iterates through a bunch of compile tasks by name and while doing so forces Gradle to create these tasks during configuration time instead of execution time.

One can easily see this when running ./gradlew help --scan on any project using the Ebean plugin. On the performance section Gradle shows which tasks have been created during which Gradle phase. Executing the help task should not cause any other tasks to be created.

rbygrave commented 3 years ago

I'm happy to review a PR on this if someone takes on this task.