Find files compiled at a specific Java version
org.openrewrite.java.search.HasJavaVersion Finds Java source files matching a particular language level. This is useful especially as an applicable test for other recipes.
- groupId: org.openrewrite
- artifactId: rewrite-java
- version: 7.35.0
This recipe has required configuration parameters. Recipes with required configuration parameters cannot be activated directly. To activate this recipe you must create a new recipe which fills in the required parameters. In your rewrite.yml create a new recipe with a unique name. For example:
com.yourorg.HasJavaVersionExample. Here's how you can define and customize such a recipe within your rewrite.yml:
displayName: Find files compiled at a specific Java version example
com.yourorg.HasJavaVersionExamplehas been defined activate it in your build file:
Recipes can also be activated directly from the command line by adding the argument
The Moderne public SaaS instance enables you to easily run recipes across thousands of open-source repositories.