Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • asm asm
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 6
    • Issues 6
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • asmasm
  • asmasm
  • Merge requests
  • !308

Tests that requires preview features should only run if the preview features of the right JDK are enabled

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Remi Forax requested to merge test-should-work-with-enable-preview into master Dec 22, 2020
  • Overview 13
  • Commits 3
  • Pipelines 4
  • Changes 9

Test for jdk 14 and jdk 15 requires the "--enable-preview" on the command line. This patch

  • changes the tests to declare if a test requires --enable-preview or not and run them only if the flag is present on the command line
  • fix Util.getMajorJavaVersion() because Java 1.8.0 is detected as Java 1 and not Java 8
  • update bnd version because of https://github.com/bndtools/bnd/issues/3903

With that, using gradle 6.7.1, with the PMD conf updated and if jacoco release a version compatible with Java 15 (still stuck with Java 14), the build can run on Java 15. The ultimate goal is to prepare the build to be able to run on Java 17 which is a LTS and which should not have any preview feature that changes the classfile.

Edited Dec 22, 2020 by Remi Forax
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: test-should-work-with-enable-preview