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

[Build] Use 1.7 as the source and target level for compilation #1147

Merged
merged 1 commit into from
Jun 16, 2018

Conversation

mpkorstanje
Copy link
Contributor

@mpkorstanje mpkorstanje commented Jun 12, 2017

Summary

Cucumber-jvm is using some library features that were introduced in Java 7.
Setting the compilation explicitly to Java 7 should avoid any unexpected
surprises.

Motivation and Context

Java 6 has reached its end of life a while ago and we no longer run our tests against it. Supporting it has become impractical.

How Has This Been Tested?

Check if the automated tests were still passing.
Check manually if the Android studio example works

Types of changes

  • Breaking change (fix or feature that would cause existing functionality to not work as expected).

Checklist:

  • I've added tests for my code.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

@mpkorstanje mpkorstanje force-pushed the source-version-7 branch 6 times, most recently from aac9899 to f1eb86f Compare June 12, 2017 23:07
@mpkorstanje mpkorstanje changed the title Use 1.7 as the source and target level for compilation [Build] Use 1.7 as the source and target level for compilation Jun 13, 2017
<source>1.6</source>
<target>1.6</target>
<source>1.7</source>
<target>1.7</target>
Copy link
Contributor

Choose a reason for hiding this comment

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

The source version should definitely be 1.7, but I do not know about the target version. From Cucumber-JVM v1.1.6 (which was quite long ago now), the intention was require java7 to built, but only java6 to use Cucumber-JVM. For instance Android supported only java6 bytecode for a long time, even thought it looks like the current Android versions and tool tests also support java7. Maybe we should stay on 1.6 as the target version.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is not possible to use source 1.7 and target 1.6. We can use source 1.6 and target 1.6 but then we'd also have to forgo using features that were introduced in 1.7.

Anyway starting with Android 4.4 we can use Java 7 features. Though I'm having a hard time finding a good reference for that. Most of the announcements seem to have rotted away.

https://developer.android.com/guide/platform/j8-jack.html

Android supports all Java 7 language features and a subset of Java 8 language features that vary by platform version. This page describes the new language features you can use, how to properly configure your project to use them, and any known issues you may encounter.

@stale
Copy link

stale bot commented Feb 12, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed in a week if no further activity occurs.

@stale stale bot added the ⌛ stale Will soon be closed by stalebot unless there is activity label Feb 12, 2018
@mpkorstanje mpkorstanje added the 🧷 pinned Tells Stalebot not to close this issue label Feb 12, 2018
@stale stale bot removed the ⌛ stale Will soon be closed by stalebot unless there is activity label Feb 12, 2018
Cucumber-jvm is using some library features that were introduced in Java 7.
Setting the compilation explicitly to Java 7 should avoid any unexpected
surprises.
@mpkorstanje mpkorstanje added this to the 4.0.0 milestone Jun 11, 2018
@coveralls
Copy link

Coverage Status

Coverage remained the same at 81.125% when pulling ca2a5a8 on source-version-7 into 0d555da on master.

@mpkorstanje mpkorstanje merged commit d282666 into master Jun 16, 2018
@mpkorstanje mpkorstanje deleted the source-version-7 branch June 16, 2018 12:17
@lock
Copy link

lock bot commented Jun 16, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 16, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
🧷 pinned Tells Stalebot not to close this issue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants