Class RewriteJava8TextBlocksPlugin

java.lang.Object
org.openrewrite.gradle.RewriteJava8TextBlocksPlugin
All Implemented Interfaces:
org.gradle.api.Plugin<org.gradle.api.Project>

public class RewriteJava8TextBlocksPlugin extends Object implements org.gradle.api.Plugin<org.gradle.api.Project>
Marks class files as Java 8 compatible regardless of what they were actually compiled to target. The idea here is to allow the use of multi-line text blocks. These compile to the exact same bytecode as a java 8 string concatenation, but annoyingly bump the target bytecode level. Haphazard use of this can easily result in "ClassNotFound"/"MethodNotFound" etc. if other Java 9+ standard library or language features are used.
  • Constructor Details

    • RewriteJava8TextBlocksPlugin

      public RewriteJava8TextBlocksPlugin()
  • Method Details

    • apply

      public void apply(org.gradle.api.Project project)
      Specified by:
      apply in interface org.gradle.api.Plugin<org.gradle.api.Project>