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

Separate minimum compiler and runtime Java version properties #79108

Merged

Conversation

mark-vieira
Copy link
Contributor

@mark-vieira mark-vieira commented Oct 13, 2021

This is a follow up to #78704 to additionally distinguish between minimum compiler version and minimum runtime versions of Java for the Elasticsearch project. The former is what we require you to run the build with. The latter is what we require you to run Elasticsearch with. These are also different for different build logic projects.

build-tools is public, and used by folks to build plugins for Elasticsearch. Therefore, it should support the same minimum Java version as Elasticsearch does at runtime. That is, if you can run Elasticsearch 8.0 with Java 11, you should be able to build plugins using Java 11 across the board. In this case we want to target the minimum runtime version.

build-tools-internal is, obviously, internal. Since we generally force a higher minimum compiler version, this project can (and does) use newer Java APIs. In this case we want to target the minimum compiler version.

This was actually causing compile errors in the IDE since we configure IntelliJ to compile with the -release flag but Gradle doesn't apply this to the build-tools projects. The alleviates the problem so we don't have a discrepancy between compile time and runtime Java requirements for the build-tools-internal project.

@mark-vieira mark-vieira requested a review from breskeby October 13, 2021 23:07
@elasticmachine elasticmachine added the Team:Delivery Meta label for Delivery team label Oct 13, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-delivery (Team:Delivery)

Copy link
Contributor

@breskeby breskeby left a comment

Choose a reason for hiding this comment

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

lgtm

@mark-vieira mark-vieira merged commit 8916213 into elastic:master Oct 14, 2021
@mark-vieira mark-vieira deleted the build_tools_internal_minimum_java branch October 14, 2021 18:09
@elasticsearchmachine
Copy link
Collaborator

💔 Backport failed

Status Branch Result
7.x Commit could not be cherrypicked due to conflicts

You can use sqren/backport to manually backport by running backport --upstream elastic/elasticsearch --pr 79108

mark-vieira added a commit to mark-vieira/elasticsearch that referenced this pull request Oct 14, 2021
…c#79108)

# Conflicts:
#	build-conventions/src/main/java/org/elasticsearch/gradle/internal/conventions/VersionPropertiesBuildService.java
#	build-tools-internal/build.gradle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Delivery/Build Build or test infrastructure >non-issue Team:Delivery Meta label for Delivery team v7.16.0 v8.0.0-beta1
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants