2

I want to use the recipe AddOrUpdateAnnotationAttribute for adding parameters to a Java annotation. This is part of the package org.openrewrite.java, so I've added only the following dependency in my init.gradle:

    dependencies {
      rewrite("org.openrewrite:rewrite-java")
    }

When I am running the recipe, I'm getting the error

There were problems parsing 1 sources: build.gradle

As the recipe only refactors java files, I wonder, why build.gradle is parsed at all. How can I exclude build.gradle from being parsed?

MGK
  • 101
  • 5

1 Answers1

2

I found a solution. I've added the following to my init.gradle file:

 rewrite {
      exclusion(
        "**/*.gradle"
      )
MGK
  • 101
  • 5
  • Is not is possible to process java files only? So i expect an inclusion rule for "**/*.java", but cannot find it – rmuller Feb 28 '23 at 12:14