Advanced OpenRewrite recipe development workshop
This workshop builds on the foundations covered in the Fundamentals of OpenRewrite recipe development workshop and focuses on deeper, more powerful features of the OpenRewrite and Moderne ecosystem.
You will gain experience with advanced recipe development tooling, understand how to extract insights using data tables, write scanning recipes that reason across multiple files, use traits for abstraction and generalization, and compose powerful imperative workflows that combine existing recipes and generate new code. This workshop is designed to be hands-on, so you can follow along with the examples in your own environment. The workshop consists of a series of modules that highlight key concepts, each with one or more exercises to help you practice what you've learned.
Be sure to also follow the links to the OpenRewrite documentation for more in-depth information. Feel free to skip around to the sections that interest you most, based on your needs and experience level.
If you get stuck or have questions, feel free to ask in the OpenRewrite Slack or Discord.
What You'll Learn
- How to set up and optimize your development environment for recipe authoring
- Debugging techniques using both the CLI and the IntelliJ plugin
- How to build scanning recipes that analyze multiple files across a codebase
- Using traits to model higher-level abstractions in recipes
- Writing and analyzing data tables to extract insights from source code
- Generating code and composing imperative workflows from existing recipes
Prerequisites
To get the most out of this workshop, you should be comfortable with:
- The basics of writing declarative and imperative OpenRewrite recipes
- Running recipes using the Moderne platform, CLI, or IDE plugin
- Java and build tools like Maven or Gradle
If you haven’t been through the Fundamentals of OpenRewrite recipe development workshop yet, we recommend completing it first before returning here.