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

Fix junit-platform-commons-java-9 subproject build #1288

Merged
merged 2 commits into from
Feb 7, 2018

Conversation

nskvortsov
Copy link
Contributor

@nskvortsov nskvortsov commented Feb 7, 2018

Overview

Update Gradle script so that subproject junit-platform-commons-java-9 is really built with source, target and API of Java 9.

Before, two things were happening:

  • --release compiler option was missing and all modules were compiler against JDK9 API
  • javacRelease = 9 did not work for the subproject, because compiler settings were configured too early.

This was spotted while trying to import the project to IntelliJ IDEA https://youtrack.jetbrains.com/issue/IDEA-186344


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


Definition of Done

Overriding compiler args can lead to missing arguments
Otherwise, changing `javacRelease` extension property in a subproject does not affect compiler config.
@codecov
Copy link

codecov bot commented Feb 7, 2018

Codecov Report

Merging #1288 into master will decrease coverage by 0.03%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #1288      +/-   ##
============================================
- Coverage     91.35%   91.31%   -0.04%     
+ Complexity     3123     3122       -1     
============================================
  Files           295      295              
  Lines          7646     7646              
  Branches        624      624              
============================================
- Hits           6985     6982       -3     
- Misses          484      485       +1     
- Partials        177      179       +2
Impacted Files Coverage Δ Complexity Δ
...jupiter/engine/execution/ExtensionValuesStore.java 87.14% <0%> (-4.29%) 21% <0%> (-1%)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7905cfb...6df6739. Read the comment docs.

@sormuras
Copy link
Member

sormuras commented Feb 7, 2018

Tried your changes locally and building it on console and importing the project into IDEA 2018.1 EAP works like a charm:

IntelliJ IDEA 2018.1 EAP (Community Edition)
Build #IC-181.3494.3, built on February 6, 2018
JRE: 1.8.0_152-release-1136-b5 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows 10 10.0

Does this fix also work with older versions of IDEA?

@sormuras sormuras merged commit cc003c8 into junit-team:master Feb 7, 2018
@nskvortsov
Copy link
Contributor Author

Yes, it should be fixed for older versions.

@sormuras
Copy link
Member

sormuras commented Feb 7, 2018

Thank you very much, @nskvortsov

Andrei94 pushed a commit to Andrei94/junit5 that referenced this pull request Jun 23, 2018
Append compiler args. Overriding compiler args can
lead to missing arguments

Postpone configuration of java compiler. Otherwise,
changing `javacRelease` extension property in a
subproject does not affect compiler config.
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