Skip to content

Gradle 7.0 has problems with annotation processors and java 16 #16641

@graemerocher

Description

@graemerocher

When building a Micronaut application with Gradle 7.0 it fails with java.lang.IllegalAccessError

Expected Behavior

Should compile

Current Behavior

Fails with

Execution failed for task ':compileJava'.
> java.lang.IllegalAccessError: class org.gradle.internal.compiler.java.ClassNameCollector (in unnamed module @0x77b92754) cannot access class com.sun.tools.javac.code.Symbol$TypeSymbol (in module jdk.compiler) because module jdk.compiler does not export com.sun.tools.javac.code to unnamed module @0x77b92754

Steps to Reproduce

Try compile https://github.com/graemerocher/micronaut-hol-example with Gradle 7 rc1 and java 16

Your Environment

  • Gradle 7.0 rc1
  • openjdk version "16" 2021-03-16
  • Micronaut 2.4.1

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions