Add a Kotlin recipe DSL authoring guide - #532
Merged
Merged
Conversation
Adapted from the Moderne docs page of the same name, reframed around the Rewrite Gradle and Maven plugins, with Moderne CLI and IntelliJ tooling mentioned only as an optional faster iteration loop.
Member
Author
How this differs from the Moderne docs pageSource: Audience: build plugins, not the CLI. OpenRewrite readers generally won't have the Moderne CLI, so the "Running your recipe against a codebase" section was rebuilt around the Rewrite Gradle and Maven plugins:
Docs-site mechanics.
Sidebar entry sits between the JavaScript recipe guide and Refaster. Anything that drifts on the Moderne side (CLI flags, the 4.4.2 Kotlin-source note) is now only in the tip, so the two pages should need far less coordinated upkeep than a verbatim copy would. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Copies the Writing Kotlin recipes guide from the Moderne docs into the OpenRewrite docs, covering the
rewrite { } to { }DSL, imperativekotlin { visit… }scopes,KotlinTemplate, data tables, and how a Kotlin-authored recipe also rewrites Java, Groovy, and Scala.Adapted rather than copied verbatim: all relative links are remapped to OpenRewrite paths (Moderne-only pages now link out absolutely), and the "running your recipe" section is reframed around the Rewrite Gradle and Maven plugins, since OpenRewrite readers generally won't have the Moderne CLI. The CLI and IntelliJ plugin survive as a single tip about a faster iteration loop and running at scale.
Verified that the page compiles as MDX and that every internal link and anchor resolves; a full
yarn builddid not run locally due to a disk-space limit, so CI is the real check on broken links.