[Backport] Improve build configuration time#42674
Conversation
(cherry picked from commit a7cf299)
# Conflicts: # buildSrc/src/main/groovy/org/elasticsearch/gradle/BuildPlugin.groovy
|
@atorok @rjernst So I've backported these changes to
The bummer with 7.x is that it still supports the JDK 8 runtime so there are a shit load of conditionals around runtime java version, which now is deferred until execution time. We can either solve this with the eventual goal to completely defer JDK provisioning to the JDK plugin, or just say screw it, and leave it as-is. |
|
Thanks! We really need to be able to backport build changes so this was a must. |
| // add license/notice files | ||
| project.afterEvaluate { | ||
| if (project.licenseFile == null || project.noticeFile == null) { | ||
| if (ext.has('licenseFile') == false || ext.get('licenseFile') == null || ext.has('noticeFile') == false || ext.get('noticeFile') == null) { |
There was a problem hiding this comment.
This seems to have broken our custom plugin builds. The same build.gradle file which worked for all 6.x and 7.x builds with esplugin is now broken and fails with
* What went wrong:
A problem occurred configuring root project 'elasticsearch-custom-analysis'.
> Failed to notify project evaluation listener.
> Must specify license and notice file for project :
> Must specify license and notice file for project :
> Must specify license and notice file for project :
> Could not get unknown property 'bundlePlugin' for task set of type org.gradle.api.internal.tasks.DefaultTaskContainer.
It is indeed possible that I'm missing something, but we do have noticeFile and licenseFile properly declared and moving them from project to ext to esplugin doesn't work.
Any idea?
There was a problem hiding this comment.
OK n/m just found #45073 (comment) , which fixes this issue
Backport of #41392