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 with JDK-9 only #1097

Merged
merged 10 commits into from
Oct 9, 2017
Merged

Build with JDK-9 only #1097

merged 10 commits into from
Oct 9, 2017

Conversation

sormuras
Copy link
Member

@sormuras sormuras commented Oct 8, 2017

Overview

Remove JDK build matrix on Travis CI and use --release 8 javac option.

The JUnit 5 build requires JDK-9 or higher.
The JUnit 5 runtime environment needs to be Java 8 or higher.

Travis CI now sets "-Xmx" by default.


I hereby agree to the terms of the JUnit Contributor License Agreement.


Definition of Done

The JUnit 5 build requires JDK-9 or higher.
The JUnit 5 runtime environment needs to be Java 8 or higher.

Travis CI now sets "-Xmx" by default.
@ghost ghost assigned sormuras Oct 8, 2017
@ghost ghost added the status: in progress label Oct 8, 2017
@@ -126,13 +126,12 @@ allprojects { subproj ->
}

tasks.withType(JavaCompile) {
sourceCompatibility = rootProject.sourceCompatibility
targetCompatibility = rootProject.targetCompatibility
Copy link
Member

Choose a reason for hiding this comment

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

I think we should keep specifying source and target.

Copy link
Member Author

Choose a reason for hiding this comment

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

javac does not allow this:

Execution failed for task ':junit-platform-commons:compileJava'.
> option -source cannot be used together with --release

When added to compilerArgs via:

	// See: https://docs.oracle.com/javase/9/tools/javac.htm#JSWOR627
	compileJava.options*.compilerArgs = [
		'--release', rootProject.javacRelease,
		'-source', rootProject.javacRelease,
		'-target', rootProject.javacRelease,
...

Copy link
Member Author

Choose a reason for hiding this comment

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

But our build refers to compileJava.sourceCompatibility here and there. Like in cloverInstrumentJava around line 224: source: compileJava.sourceCompatibility) {.

@ghost ghost assigned marcphilipp Oct 9, 2017
@ghost ghost added the status: in progress label Oct 9, 2017
Copy link
Member

@marcphilipp marcphilipp left a comment

Choose a reason for hiding this comment

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

👍

@@ -0,0 +1,10 @@
build: off
Copy link
Member

Choose a reason for hiding this comment

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

What does this do?

Copy link
Member Author

Choose a reason for hiding this comment

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

Enables the build.

No kidding.

It disables the automatic search and execution of a "build script thing".
See: https://www.appveyor.com/docs/build-phase/
Ref: https://www.appveyor.com/docs/appveyor-yml/

Copy link
Member

Choose a reason for hiding this comment

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

🤦‍♂️

@sormuras sormuras merged commit bc7eef0 into master Oct 9, 2017
@ghost ghost removed the status: in progress label Oct 9, 2017
@sormuras sormuras deleted the jdk9-javac-release-option branch October 9, 2017 07:59
Andrei94 pushed a commit to Andrei94/junit5 that referenced this pull request Jun 23, 2018
* Use --release 8 option from JDK 9 javac

* Remove matrix and special java options from Travis CI
  The JUnit 5 build requires JDK-9 or higher.
  The JUnit 5 runtime environment needs to be Java 8 or higher.
  Travis CI now sets "-Xmx" by default.

* Switch Javadoc step to use JDK 9

* Switch AsciiDoc step to use JDK 9 w/o PDF backend
  See jruby/jruby#4805

* Fix Clover instrumentation

* Add custom AppVeyor script to install JDK-9

* Add JDK9-compatible Javadoc stylesheet

* Fix Javadoc @value tag usages
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