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

[Backport] Improve build configuration time #42674

Merged
merged 7 commits into from
May 30, 2019

Conversation

mark-vieira
Copy link
Contributor

Backport of #41392

@mark-vieira mark-vieira requested review from alpar-t and rjernst May 30, 2019 00:50
@mark-vieira
Copy link
Contributor Author

@atorok @rjernst So I've backported these changes to 7.x. This really accomplishes 2 things.

  1. We get the config time bonus in 7.x.
  2. It makes backporting other build changes, especially those that touch BuildPlugin a lot easier since this is a very large change.

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.

@alpar-t
Copy link
Contributor

alpar-t commented May 30, 2019

Thanks! We really need to be able to backport build changes so this was a must.
I think that provisioning with the JDK plugin is a good idea which we should do regardless, not sure if this PR should influence the priority of doing so unless we discover all those conditionals to get in the way. I'm assuming they won't do so much with most development happening on master.

@mark-vieira mark-vieira merged commit c181635 into elastic:7.x May 30, 2019
// 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) {
Copy link
Contributor

@synhershko synhershko Aug 25, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK n/m just found #45073 (comment) , which fixes this issue

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.

3 participants