diff --git a/CHANGES.md b/CHANGES.md
index 5eb084f98b..2cc048e8a6 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -28,6 +28,7 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (
### Removed
* **BREAKING** Remove `JarState.getMavenCoordinate(String prefix)`. ([#1945](https://github.com/diffplug/spotless/pull/1945))
* **BREAKING** Replace `PipeStepPair` with `FenceStep`. ([#1954](https://github.com/diffplug/spotless/pull/1954))
+* **BREAKING** Fully removed `Rome`, use `Biome` instead. ([#2119](https://github.com/diffplug/spotless/pull/2119))
## [2.45.0] - 2024-01-23
### Added
diff --git a/lib/src/main/java/com/diffplug/spotless/rome/Architecture.java b/lib/src/main/java/com/diffplug/spotless/biome/Architecture.java
similarity index 90%
rename from lib/src/main/java/com/diffplug/spotless/rome/Architecture.java
rename to lib/src/main/java/com/diffplug/spotless/biome/Architecture.java
index 9ceaeb8632..29511842e2 100644
--- a/lib/src/main/java/com/diffplug/spotless/rome/Architecture.java
+++ b/lib/src/main/java/com/diffplug/spotless/biome/Architecture.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2016-2023 DiffPlug
+ * Copyright 2016-2024 DiffPlug
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.diffplug.spotless.rome;
+package com.diffplug.spotless.biome;
/**
* Enumeration of possible computer architectures.
@@ -34,11 +34,11 @@ public static Architecture guess() {
var version = System.getProperty("os.version");
if (arch == null || arch.isBlank()) {
- throw new IllegalStateException("No OS information is available, specify the Rome executable manually");
+ throw new IllegalStateException("No OS information is available, specify the Biome executable manually");
}
var msg = "Unsupported architecture " + arch + "/" + version
- + ", specify the path to the Rome executable manually";
+ + ", specify the path to the Biome executable manually";
if (arch.equals("ppc64le")) {
throw new IllegalStateException(msg);
diff --git a/lib/src/main/java/com/diffplug/spotless/rome/RomeExecutableDownloader.java b/lib/src/main/java/com/diffplug/spotless/biome/BiomeExecutableDownloader.java
similarity index 98%
rename from lib/src/main/java/com/diffplug/spotless/rome/RomeExecutableDownloader.java
rename to lib/src/main/java/com/diffplug/spotless/biome/BiomeExecutableDownloader.java
index 052f72def4..c01d11a20c 100644
--- a/lib/src/main/java/com/diffplug/spotless/rome/RomeExecutableDownloader.java
+++ b/lib/src/main/java/com/diffplug/spotless/biome/BiomeExecutableDownloader.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2016-2023 DiffPlug
+ * Copyright 2016-2024 DiffPlug
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.diffplug.spotless.rome;
+package com.diffplug.spotless.biome;
import java.io.IOException;
import java.math.BigInteger;
@@ -41,8 +41,8 @@
* Downloader for the Biome executable:
* https://github.com/biomejs/biome.
*/
-final class RomeExecutableDownloader {
- private static final Logger logger = LoggerFactory.getLogger(RomeExecutableDownloader.class);
+final class BiomeExecutableDownloader {
+ private static final Logger logger = LoggerFactory.getLogger(BiomeExecutableDownloader.class);
/**
* The checksum algorithm to use for checking the integrity of downloaded files.
@@ -80,7 +80,7 @@ final class RomeExecutableDownloader {
* @param flavor Flavor of Biome to use.
* @param downloadDir Directory where to store the downloaded executable.
*/
- public RomeExecutableDownloader(BiomeFlavor flavor, Path downloadDir) {
+ public BiomeExecutableDownloader(BiomeFlavor flavor, Path downloadDir) {
this.flavor = flavor;
this.downloadDir = downloadDir;
}
diff --git a/lib/src/main/java/com/diffplug/spotless/rome/BiomeFlavor.java b/lib/src/main/java/com/diffplug/spotless/biome/BiomeFlavor.java
similarity index 87%
rename from lib/src/main/java/com/diffplug/spotless/rome/BiomeFlavor.java
rename to lib/src/main/java/com/diffplug/spotless/biome/BiomeFlavor.java
index dbfd43eee9..bcb065edea 100644
--- a/lib/src/main/java/com/diffplug/spotless/rome/BiomeFlavor.java
+++ b/lib/src/main/java/com/diffplug/spotless/biome/BiomeFlavor.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2023 DiffPlug
+ * Copyright 2023-2024 DiffPlug
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.diffplug.spotless.rome;
+package com.diffplug.spotless.biome;
/**
* The flavor of Biome to use. Exists for compatibility reason, may be removed
@@ -24,17 +24,7 @@
public enum BiomeFlavor {
/** The new forked Biome project. */
BIOME("biome", "1.2.0", "biome.json", "biome-%s-%s-%s",
- "https://github.com/biomejs/biome/releases/download/cli%%2Fv%s/biome-%s"),
-
- /**
- * The old deprecated Rome project.
- *
- * @deprecated Will be removed once the old Rome project is not supported
- * anymore.
- */
- @Deprecated
- ROME("rome", "12.0.0", "rome.json", "rome-%s-%s-%s",
- "https://github.com/rome/tools/releases/download/cli%%2Fv%s/rome-%s");
+ "https://github.com/biomejs/biome/releases/download/cli%%2Fv%s/biome-%s");
private final String configName;
private final String defaultVersion;
diff --git a/lib/src/main/java/com/diffplug/spotless/rome/RomeStep.java b/lib/src/main/java/com/diffplug/spotless/biome/BiomeStep.java
similarity index 95%
rename from lib/src/main/java/com/diffplug/spotless/rome/RomeStep.java
rename to lib/src/main/java/com/diffplug/spotless/biome/BiomeStep.java
index de5b3e80ee..2db9e8cb2a 100644
--- a/lib/src/main/java/com/diffplug/spotless/rome/RomeStep.java
+++ b/lib/src/main/java/com/diffplug/spotless/biome/BiomeStep.java
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.diffplug.spotless.rome;
+package com.diffplug.spotless.biome;
import java.io.File;
import java.io.IOException;
@@ -40,11 +40,11 @@
/**
* formatter step that formats JavaScript and TypeScript code with Biome:
* https://github.com/biomejs/biome.
- * It delegates to the Biome executable. The Rome executable is downloaded from
+ * It delegates to the Biome executable. The Biome executable is downloaded from
* the network when no executable path is provided explicitly.
*/
-public class RomeStep {
- private static final Logger logger = LoggerFactory.getLogger(RomeStep.class);
+public class BiomeStep {
+ private static final Logger logger = LoggerFactory.getLogger(BiomeStep.class);
/**
* Path to the directory with the {@code biome.json} config file, can be
@@ -113,8 +113,8 @@ public String name() {
* @param downloadDir Directory where to place the downloaded executable.
* @return A new Biome step that download the executable from the network.
*/
- public static RomeStep withExeDownload(BiomeFlavor flavor, String version, String downloadDir) {
- return new RomeStep(flavor, version, null, downloadDir);
+ public static BiomeStep withExeDownload(BiomeFlavor flavor, String version, String downloadDir) {
+ return new BiomeStep(flavor, version, null, downloadDir);
}
/**
@@ -125,8 +125,8 @@ public static RomeStep withExeDownload(BiomeFlavor flavor, String version, Strin
* @param pathToExe Path to the Biome executable to use.
* @return A new Biome step that format with the given executable.
*/
- public static RomeStep withExePath(BiomeFlavor flavor, String pathToExe) {
- return new RomeStep(flavor, null, pathToExe, null);
+ public static BiomeStep withExePath(BiomeFlavor flavor, String pathToExe) {
+ return new BiomeStep(flavor, null, pathToExe, null);
}
/**
@@ -230,7 +230,7 @@ private static void validateBiomeExecutable(String resolvedPathToExe) {
* @param pathToExe Path to the Biome executable to use.
* @param downloadDir Directory where to place the downloaded executable.
*/
- private RomeStep(BiomeFlavor flavor, String version, String pathToExe, String downloadDir) {
+ private BiomeStep(BiomeFlavor flavor, String version, String pathToExe, String downloadDir) {
this.flavor = flavor;
this.version = version != null && !version.isBlank() ? version : defaultVersion(flavor);
this.pathToExe = pathToExe;
@@ -255,7 +255,7 @@ public FormatterStep create() {
* a file named {@code biome.json}.
* @return This builder instance for chaining method calls.
*/
- public RomeStep withConfigPath(String configPath) {
+ public BiomeStep withConfigPath(String configPath) {
this.configPath = configPath;
return this;
}
@@ -280,7 +280,7 @@ public RomeStep withConfigPath(String configPath) {
* @param language The language of the files to format.
* @return This builder instance for chaining method calls.
*/
- public RomeStep withLanguage(String language) {
+ public BiomeStep withLanguage(String language) {
this.language = language;
return this;
}
@@ -333,7 +333,7 @@ private String resolveExe() throws IOException, InterruptedException {
return pathToExe;
}
} else {
- var downloader = new RomeExecutableDownloader(flavor, Paths.get(downloadDir));
+ var downloader = new BiomeExecutableDownloader(flavor, Paths.get(downloadDir));
var downloaded = downloader.ensureDownloaded(version).toString();
makeExecutable(downloaded);
return downloaded;
diff --git a/lib/src/main/java/com/diffplug/spotless/rome/OS.java b/lib/src/main/java/com/diffplug/spotless/biome/OS.java
similarity index 88%
rename from lib/src/main/java/com/diffplug/spotless/rome/OS.java
rename to lib/src/main/java/com/diffplug/spotless/biome/OS.java
index 44c87d9ece..ab0ba4b8db 100644
--- a/lib/src/main/java/com/diffplug/spotless/rome/OS.java
+++ b/lib/src/main/java/com/diffplug/spotless/biome/OS.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2016-2023 DiffPlug
+ * Copyright 2016-2024 DiffPlug
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.diffplug.spotless.rome;
+package com.diffplug.spotless.biome;
import java.util.Locale;
@@ -38,12 +38,12 @@ enum OS {
public static OS guess() {
var osName = System.getProperty("os.name");
if (osName == null || osName.isBlank()) {
- throw new IllegalStateException("No OS information is available, specify the Rome executable manually");
+ throw new IllegalStateException("No OS information is available, specify the Biome executable manually");
}
var osNameUpper = osName.toUpperCase(Locale.ROOT);
if (osNameUpper.contains("SUNOS") || osName.contains("AIX")) {
throw new IllegalStateException(
- "Unsupported OS " + osName + ", specify the path to the Rome executable manually");
+ "Unsupported OS " + osName + ", specify the path to the Biome executable manually");
}
if (osNameUpper.contains("WINDOWS")) {
return OS.WINDOWS;
diff --git a/lib/src/main/java/com/diffplug/spotless/rome/Platform.java b/lib/src/main/java/com/diffplug/spotless/biome/Platform.java
similarity index 97%
rename from lib/src/main/java/com/diffplug/spotless/rome/Platform.java
rename to lib/src/main/java/com/diffplug/spotless/biome/Platform.java
index c50608830a..590e303d98 100644
--- a/lib/src/main/java/com/diffplug/spotless/rome/Platform.java
+++ b/lib/src/main/java/com/diffplug/spotless/biome/Platform.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2016-2023 DiffPlug
+ * Copyright 2016-2024 DiffPlug
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package com.diffplug.spotless.rome;
+package com.diffplug.spotless.biome;
/**
* Represents a platform where code is run, consisting of an operating system
diff --git a/plugin-gradle/CHANGES.md b/plugin-gradle/CHANGES.md
index acbe0231f9..27ec728993 100644
--- a/plugin-gradle/CHANGES.md
+++ b/plugin-gradle/CHANGES.md
@@ -20,6 +20,8 @@ We adhere to the [keepachangelog](https://keepachangelog.com/en/1.0.0/) format (
* Bump default `ktlint` version to latest `1.1.1` -> `1.2.1`. ([#2057](https://github.com/diffplug/spotless/pull/2057))
* Bump default `sortpom` version to latest `3.4.0` -> `3.4.1`. ([#2078](https://github.com/diffplug/spotless/pull/2078))
* Bump default `sortpom` version to latest `3.4.1` -> `4.0.0` and support versions back to `3.2.1`. ([#2115](https://github.com/diffplug/spotless/pull/2115))
+### Removed
+* **BREAKING** Fully removed `Rome`, use `Biome` instead. ([#2119](https://github.com/diffplug/spotless/pull/2119))
## [6.25.0] - 2024-01-23
### Added
diff --git a/plugin-gradle/README.md b/plugin-gradle/README.md
index 4542c69763..819ff3d42a 100644
--- a/plugin-gradle/README.md
+++ b/plugin-gradle/README.md
@@ -1299,12 +1299,6 @@ a formatter that for the frontend written in Rust, which has a native binary, do
is pretty fast. It can currently format JavaScript, TypeScript, JSX, and JSON, and may support
[more frontend languages](https://biomejs.dev/internals/language-support/) such as CSS in the future.
-Note: Biome [was formerly called Rome](https://biomejs.dev/blog/annoucing-biome/). Configurations with
-the old `` tag and `rome(...)` function are still supported for the time being. This will be removed
-in a future version, you should migrate to the new `` tag or `biome(...)` function. The configuration
-remains the same, you only need to update the version. If you are using a custom `rome.json` configuration file,
-you need to rename it to `biome.json`.
-
You can use Biome in any language-specific format for supported languages, but
usually you will be creating a generic format.
diff --git a/plugin-gradle/src/main/java/com/diffplug/gradle/spotless/RomeStepConfig.java b/plugin-gradle/src/main/java/com/diffplug/gradle/spotless/BiomeStepConfig.java
similarity index 95%
rename from plugin-gradle/src/main/java/com/diffplug/gradle/spotless/RomeStepConfig.java
rename to plugin-gradle/src/main/java/com/diffplug/gradle/spotless/BiomeStepConfig.java
index 98c4000a8b..d66048a7b0 100644
--- a/plugin-gradle/src/main/java/com/diffplug/gradle/spotless/RomeStepConfig.java
+++ b/plugin-gradle/src/main/java/com/diffplug/gradle/spotless/BiomeStepConfig.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2023 DiffPlug
+ * Copyright 2023-2024 DiffPlug
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -28,10 +28,10 @@
import org.gradle.api.artifacts.repositories.MavenArtifactRepository;
import com.diffplug.spotless.FormatterStep;
-import com.diffplug.spotless.rome.BiomeFlavor;
-import com.diffplug.spotless.rome.RomeStep;
+import com.diffplug.spotless.biome.BiomeFlavor;
+import com.diffplug.spotless.biome.BiomeStep;
-public abstract class RomeStepConfig> {
+public abstract class BiomeStepConfig> {
/**
* Optional path to the directory with configuration file for Biome. The file
* must be named {@code biome.json}. When none is given, the default
@@ -95,7 +95,7 @@ public abstract class RomeStepConfig> {
@Nullable
private String version;
- protected RomeStepConfig(Project project, Consumer replaceStep, BiomeFlavor flavor,
+ protected BiomeStepConfig(Project project, Consumer replaceStep, BiomeFlavor flavor,
String version) {
this.project = requireNonNull(project);
this.replaceStep = requireNonNull(replaceStep);
@@ -234,13 +234,13 @@ private File findDataDir() {
*
* @return A builder for a Biome step.
*/
- private RomeStep newBuilder() {
+ private BiomeStep newBuilder() {
if (pathToExe != null) {
var resolvedPathToExe = resolvePathToExe();
- return RomeStep.withExePath(flavor, resolvedPathToExe);
+ return BiomeStep.withExePath(flavor, resolvedPathToExe);
} else {
var downloadDir = resolveDownloadDir();
- return RomeStep.withExeDownload(flavor, version, downloadDir);
+ return BiomeStep.withExeDownload(flavor, version, downloadDir);
}
}
diff --git a/plugin-gradle/src/main/java/com/diffplug/gradle/spotless/FormatExtension.java b/plugin-gradle/src/main/java/com/diffplug/gradle/spotless/FormatExtension.java
index 08d6088d60..94e5298b66 100644
--- a/plugin-gradle/src/main/java/com/diffplug/gradle/spotless/FormatExtension.java
+++ b/plugin-gradle/src/main/java/com/diffplug/gradle/spotless/FormatExtension.java
@@ -53,6 +53,7 @@
import com.diffplug.spotless.LineEnding;
import com.diffplug.spotless.OnMatch;
import com.diffplug.spotless.Provisioner;
+import com.diffplug.spotless.biome.BiomeFlavor;
import com.diffplug.spotless.cpp.ClangFormatStep;
import com.diffplug.spotless.extra.EclipseBasedStepBuilder;
import com.diffplug.spotless.extra.wtp.EclipseWtpFormatterStep;
@@ -67,7 +68,6 @@
import com.diffplug.spotless.generic.TrimTrailingWhitespaceStep;
import com.diffplug.spotless.npm.NpmPathResolver;
import com.diffplug.spotless.npm.PrettierFormatterStep;
-import com.diffplug.spotless.rome.BiomeFlavor;
import groovy.lang.Closure;
@@ -728,15 +728,15 @@ protected FormatterStep createStep() {
* the file name. It should be specified as a formatter step for a generic
* format{ ... }.
*/
- public class BiomeGeneric extends RomeStepConfig {
+ public class BiomeGeneric extends BiomeStepConfig {
@Nullable
String language;
/**
- * Creates a new Rome config that downloads the Rome executable for the given
+ * Creates a new Biome config that downloads the Biome executable for the given
* version from the network.
*
- * @param version Rome version to use. The default version is used when
+ * @param version Biome version to use. The default version is used when
* null.
*/
public BiomeGeneric(String version) {
@@ -779,65 +779,6 @@ protected BiomeGeneric getThis() {
}
}
- /**
- * Generic Rome formatter step that detects the language of the input file from
- * the file name. It should be specified as a formatter step for a generic
- * format{ ... }.
- *
- * @deprecated Rome has transitioned to Biome. This will be removed shortly.
- */
- @Deprecated
- public class RomeGeneric extends RomeStepConfig {
- @Nullable
- String language;
-
- /**
- * Creates a new Rome config that downloads the Rome executable for the given
- * version from the network.
- *
- * @param version Rome version to use. The default version is used when
- * null.
- */
- public RomeGeneric(String version) {
- super(getProject(), FormatExtension.this::replaceStep, BiomeFlavor.ROME, version);
- }
-
- /**
- * Sets the language (syntax) of the input files to format. When
- * null or the empty string, the language is detected automatically
- * from the file name. Currently the following languages are supported by Rome:
- *
- * - js (JavaScript)
- * - jsx (JavaScript + JSX)
- * - js? (JavaScript or JavaScript + JSX, depending on the file
- * extension)
- * - ts (TypeScript)
- * - tsx (TypeScript + JSX)
- * - ts? (TypeScript or TypeScript + JSX, depending on the file
- * extension)
- * - json (JSON)
- *
- *
- * @param language The language of the files to format.
- * @return This step for further configuration.
- */
- public RomeGeneric language(String language) {
- this.language = language;
- replaceStep();
- return this;
- }
-
- @Override
- protected String getLanguage() {
- return language;
- }
-
- @Override
- protected RomeGeneric getThis() {
- return this;
- }
- }
-
/** Uses the default version of prettier. */
public PrettierConfig prettier() {
return prettier(PrettierFormatterStep.defaultDevDependencies());
@@ -860,41 +801,17 @@ public PrettierConfig prettier(Map devDependencies) {
* offline, you can specify the path to the Biome executable via
* {@code biome().pathToExe(...)}.
*/
- public RomeStepConfig> biome() {
+ public BiomeStepConfig> biome() {
return biome(null);
}
/** Downloads the given Biome version from the network. */
- public RomeStepConfig> biome(String version) {
+ public BiomeStepConfig> biome(String version) {
var biomeConfig = new BiomeGeneric(version);
addStep(biomeConfig.createStep());
return biomeConfig;
}
- /**
- * Defaults to downloading the default Rome version from the network. To work
- * offline, you can specify the path to the Rome executable via
- * {@code rome().pathToExe(...)}.
- *
- * @deprecated Use {@link #biome(String)}.
- */
- @Deprecated
- public RomeStepConfig> rome() {
- return rome(null);
- }
-
- /**
- * Downloads the given Rome version from the network.
- *
- * @deprecated Use {@link #biome(String)}.
- */
- @Deprecated
- public RomeStepConfig> rome(String version) {
- var romeConfig = new RomeGeneric(version);
- addStep(romeConfig.createStep());
- return romeConfig;
- }
-
/** Uses the default version of clang-format. */
public ClangFormatConfig clangFormat() {
return clangFormat(ClangFormatStep.defaultVersion());
diff --git a/plugin-gradle/src/main/java/com/diffplug/gradle/spotless/JavascriptExtension.java b/plugin-gradle/src/main/java/com/diffplug/gradle/spotless/JavascriptExtension.java
index b14bd29ab8..5532045bc2 100644
--- a/plugin-gradle/src/main/java/com/diffplug/gradle/spotless/JavascriptExtension.java
+++ b/plugin-gradle/src/main/java/com/diffplug/gradle/spotless/JavascriptExtension.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2016-2023 DiffPlug
+ * Copyright 2016-2024 DiffPlug
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -30,11 +30,11 @@
import com.diffplug.common.collect.ImmutableList;
import com.diffplug.spotless.FormatterStep;
+import com.diffplug.spotless.biome.BiomeFlavor;
import com.diffplug.spotless.npm.EslintConfig;
import com.diffplug.spotless.npm.EslintFormatterStep;
import com.diffplug.spotless.npm.NpmPathResolver;
import com.diffplug.spotless.npm.PrettierFormatterStep;
-import com.diffplug.spotless.rome.BiomeFlavor;
public class JavascriptExtension extends FormatExtension {
@@ -154,30 +154,6 @@ public BiomeJs biome(String version) {
return biomeConfig;
}
- /**
- * Defaults to downloading the default Rome version from the network. To work
- * offline, you can specify the path to the Rome executable via
- * {@code rome().pathToExe(...)}.
- *
- * @deprecated Use {@link #biome()}.
- */
- @Deprecated
- public RomeJs rome() {
- return rome(null);
- }
-
- /**
- * Downloads the given Rome version from the network.
- *
- * @deprecated Use {@link #biome(String)}.
- */
- @Deprecated
- public RomeJs rome(String version) {
- var romeConfig = new RomeJs(version);
- addStep(romeConfig.createStep());
- return romeConfig;
- }
-
private static final String DEFAULT_PRETTIER_JS_PARSER = "babel";
private static final ImmutableList PRETTIER_JS_PARSERS = ImmutableList.of(DEFAULT_PRETTIER_JS_PARSER,
"babel-flow", "flow");
@@ -185,7 +161,7 @@ public RomeJs rome(String version) {
/**
* Biome formatter step for JavaScript.
*/
- public class BiomeJs extends RomeStepConfig {
+ public class BiomeJs extends BiomeStepConfig {
/**
* Creates a new Biome formatter step config for formatting JavaScript files.
* Unless overwritten, the given Biome version is downloaded from the network.
@@ -207,34 +183,6 @@ protected BiomeJs getThis() {
}
}
- /**
- * Rome formatter step for JavaScript.
- *
- * @deprecated Rome has transitioned to Biome. This will be removed shortly.
- */
- @Deprecated
- public class RomeJs extends RomeStepConfig {
- /**
- * Creates a new Rome formatter step config for formatting JavaScript files.
- * Unless overwritten, the given Rome version is downloaded from the network.
- *
- * @param version Rome version to use.
- */
- public RomeJs(String version) {
- super(getProject(), JavascriptExtension.this::replaceStep, BiomeFlavor.ROME, version);
- }
-
- @Override
- protected String getLanguage() {
- return "js?";
- }
-
- @Override
- protected RomeJs getThis() {
- return this;
- }
- }
-
/**
* Overrides the parser to be set to a js parser.
*/
diff --git a/plugin-gradle/src/main/java/com/diffplug/gradle/spotless/JsonExtension.java b/plugin-gradle/src/main/java/com/diffplug/gradle/spotless/JsonExtension.java
index 441e25b93d..80e207d6da 100644
--- a/plugin-gradle/src/main/java/com/diffplug/gradle/spotless/JsonExtension.java
+++ b/plugin-gradle/src/main/java/com/diffplug/gradle/spotless/JsonExtension.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2016-2023 DiffPlug
+ * Copyright 2016-2024 DiffPlug
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -22,12 +22,12 @@
import javax.inject.Inject;
import com.diffplug.spotless.FormatterStep;
+import com.diffplug.spotless.biome.BiomeFlavor;
import com.diffplug.spotless.json.JacksonJsonConfig;
import com.diffplug.spotless.json.JacksonJsonStep;
import com.diffplug.spotless.json.JsonPatchStep;
import com.diffplug.spotless.json.JsonSimpleStep;
import com.diffplug.spotless.json.gson.GsonStep;
-import com.diffplug.spotless.rome.BiomeFlavor;
public class JsonExtension extends FormatExtension {
private static final int DEFAULT_INDENTATION = 4;
@@ -76,30 +76,6 @@ public BiomeJson biome(String version) {
return biomeConfig;
}
- /**
- * Defaults to downloading the default Rome version from the network. To work
- * offline, you can specify the path to the Rome executable via
- * {@code rome().pathToExe(...)}.
- *
- * @deprecated Use {@link #biome()}.
- */
- @Deprecated
- public RomeJson rome() {
- return rome(null);
- }
-
- /**
- * Downloads the given Rome version from the network.
- *
- * @deprecated Use {@link #biome(String)}.
- */
- @Deprecated
- public RomeJson rome(String version) {
- var romeConfig = new RomeJson(version);
- addStep(romeConfig.createStep());
- return romeConfig;
- }
-
public JsonPatchConfig jsonPatch(List