Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Optimize Gradle tasks and configurations #3191

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

malliaridis
Copy link
Contributor

@malliaridis malliaridis commented Feb 16, 2025

Description

With the Gradle upgrades over time, some lines can be optimized and focus more on lazy initialization of only the necessary tasks to improve build times.

Solution

This PR applies some recommended refactorings to gradle files, including:

  • Use tasks.configureEach { ... } instead of tasks.all { ... } for task configuration
  • Use tasks.register(...) instead of task ... for task registration
  • Disable java rendering-doc for UI module

The commits aae5452 and 52b5ee4 can be backported to Solr 9.x.

Tests

No tests have been altered

Checklist

Please review the following and check all that apply:

  • I have reviewed the guidelines for How to Contribute and my code conforms to the standards described there to the best of my ability.
  • I have created a Jira issue and added the issue ID to my pull request title.
  • I have given Solr maintainers access to contribute to my PR branch. (optional but recommended, not available for branches on forks living under an organisation)
  • I have developed this patch against the main branch.
  • I have run ./gradlew check.
  • I have added tests for my changes.
  • I have added documentation for the Reference Guide

@malliaridis malliaridis force-pushed the optimization/gradle-task-configurations branch from 52b5ee4 to 0cd1a4b Compare February 16, 2025 13:18
@epugh
Copy link
Contributor

epugh commented Feb 16, 2025

Thanks for this! I've noticed that builds have been getting slower ;-)

@malliaridis
Copy link
Contributor Author

malliaridis commented Feb 16, 2025

One of the reasons is that we are now compiling wasmJs executables during precommit, which lasts about 8 minutes and is by far the longest task. I was considering disabling it in precommit, but I'm not sure if this is a good idea. :/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants