Builder

Builder for RewriteRunner.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard

Fully-qualified name of the OpenRewrite recipe to activate. Required — build throws IllegalStateException if not set.

Link copied to clipboard

Set the number of parallel artifact download threads. Defaults to 5. When not set, falls back to downloadThreads from the tool config.

Link copied to clipboard

Replace the full list of extra Maven repositories for artifact resolution. Combined with any repositories declared in the tool config file.

Link copied to clipboard

Add a single extra Maven repository for artifact resolution. May be called multiple times; all entries accumulate and are combined with any repositories declared in the tool config file.

Link copied to clipboard

TCP connection timeout for Maven Resolver artifact downloads.

Link copied to clipboard

Socket read/request timeout for Maven Resolver artifact downloads.

Link copied to clipboard

Construct the RewriteRunner.

Link copied to clipboard

Cache root for downloaded recipe JARs. Recipe artifacts are stored under <path>/repository, keeping them isolated from the user's Maven local repository. Project dependencies are always resolved from ~/.m2/repository regardless of this setting.

Link copied to clipboard

Path to the rewriterunner.yml tool config file for repository and cache configuration. If not set, auto-discovery checks <projectDir>/rewriterunner.yml first, then ~/.rewriterunner/rewriterunner.yml as a global fallback. File name matching is case-insensitive. If no file is found, built-in defaults apply.

Link copied to clipboard

When true, the recipe is executed and results are returned but no files are written to disk. Defaults to false.

Link copied to clipboard

Glob patterns (relative to the project root) for paths to skip during parsing. When non-empty, overrides parse.excludePaths from the tool config file. Supports the same glob syntax as java.nio.file.FileSystem.getPathMatcher.

Link copied to clipboard

Override whether Maven Central is included as a remote repository. When false, only the repositories explicitly configured via the tool config file are used. Useful in enterprise environments where Central is unreachable. When not set, falls back to includeMavenCentral from the tool config (default true).

Link copied to clipboard

Set the logger used for progress and diagnostic output. Defaults to NoOpRunnerLogger (silent). Use LogbackRunnerLogger in the CLI, or provide a custom implementation for library use.

Link copied to clipboard

Glob patterns (relative to the project root) for files to parse as plain text when no specialized parser claims them. When non-empty, overrides parse.plainTextMasks from the tool config file; both empty falls back to the upstream OpenRewrite default mask list.

Link copied to clipboard

Timeout for official OpenRewrite Gradle/Maven plugin invocations in Stage 0.

Link copied to clipboard

The root directory of the project to analyse. Defaults to the current working directory. Must be an existing directory when RewriteRunner.run is called.

Link copied to clipboard

Add a Maven coordinate (groupId:artifactId:version) whose JAR(s) will be downloaded and scanned for the requested recipe. May be called multiple times; all coordinates are accumulated. LATEST is accepted as the version token.

Link copied to clipboard

Replace the full list of recipe artifact coordinates. Useful when coordinates are already collected into a List before building.

Link copied to clipboard

Path to a rewrite.yaml file for custom composite recipes.

Link copied to clipboard

Raw rewrite.yaml content. Takes precedence over rewriteConfig when both are set.

Link copied to clipboard

When true, bypass the official Gradle/Maven plugin attempt and use the in-process LST pipeline directly.

Link copied to clipboard

Timeout for non-plugin build-tool subprocesses, including LST Stage 1, Stage 2, compile attempts, and build-tool metadata commands.