Skip to content

Update forbiddenapis to v2.6 #33759

@uschindler

Description

@uschindler

Changelog: Version 2.6 (released 2018-09-17):

New features:

  • Add Java 11 support by upgrading to ASM 6.2.1. This includes updated signatures files
    and build system changes (shipped documentation is currently missing reference to
    Java 11, sorry).
  • The plugin was published on the Gradle Plugin portal.
    Due to a bug in plugin initialization, older versions may not fully work.
    Thanks to Sebastian Davids and the Gradle team for help and pushing this forward!
  • When signatures are using classes that are not found on classpath, the option to ignore
    those warnings is no longer so noisy: It only lists all failed signatures separately
    where methods/fields do not exit, but the missing classes are reported only with a
    single line, thanks ghost,
    Tim Allison, Dawid Weiss.
  • Report more details about class that failed to load while scanning the classes
    to be checked, thanks Trejkaz.
  • Only print warning about Gradle daemon once.

Bug fixes:

  • Gradle: Fix SourceSets added after plugin loading don't get tasks.
  • Add a hack for the broken JavaVersion enum in Gradle. It returns version "1.9" and "1.10"
    (which are invalid targetCompatibility versions) and this problem is only fixed after Java 11.
    Before Java 11 we switch to plain "majorVersion" property, thanks Sebastian Davids.
  • Gradle: Always apply JavaBasePlugin, otherwise startup may fail with new plugin DSL,
    as initialization order is undefined, thanks Sebastian
    Davids.

Internals:

  • Refactor signatures file parsing and lookup of signatures (remove from Checker).
  • Workaround for Java 1.6 (minimum version) builds with Maven Central TLS settings.
  • Cleanup Gradle plugin initialization exception handling, check minimal Gradle version.

Important: Normally I would supply a PR, but due to the recent changes in Elasticsearch (use forbiddenapis CLI instead of plugin - why the hell???), I can't support it anymore (the CLI is also not actively maintained and stays for "simple use cases", it was never made for automated running from build scripts). Therefore, please do the update on your own. Just a few things:

  • Forbiddenapis can handle target "11" (no version cap needed, or at least raise cap to 11)
  • If you update (you should!) release branches that use the real Gradle plugin, please remove the commenting about the server/java9 sourceset. The release fixed the bug in the Gradle plugin (later added sourcesets are not initialized with forbiddenApisJava9 task). Due to many updates in the Gradle plugin, an update of release/maintenance branches should really be investigated (especially to check Java 9 code and compiled Groovy code).

Uwe

Metadata

Metadata

Assignees

Labels

:Delivery/BuildBuild or test infrastructureTeam:DeliveryMeta label for Delivery team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions