You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
***Contributions are welcome, see [the contributing guide](../CONTRIBUTING.md) for development info.***
@@ -1914,8 +1914,6 @@ If you use this feature, you will get an error if you use a formatter in a subpr
1914
1914
- If you don't like what spotless did, `git reset --hard`
1915
1915
- If you'd like to remove the "checkpoint" commit, `git reset --soft head~1` will make the checkpoint commit "disappear" from history, but keeps the changes in your working directory.
1916
1916
1917
-
<a name="examples"></a>
1918
-
1919
1917
## Can I apply Spotless to specific files?
1920
1918
1921
1919
You can target specific files by setting the `spotlessFiles` project property to a comma-separated list of file patterns:
The patterns are matched using `String#matches(String)` against the absolute file path.
1928
1926
1929
-
## Sharing Configuration
1927
+
<a name="central-configuration"></a>
1928
+
1929
+
## How to centralize Spotless configuration
1930
+
1931
+
If you want to centralize your Spotless configuration for use across many projects, you might want to consider the [Blowdryer](https://github.com/diffplug/blowdryer) plugin.
1930
1932
1931
-
Rather than copying the formatter files across many projects, it is possible to define a common configuration that is deployed as a standard artifact so that it can be then be reused by each project; for example:
1933
+
If you are content with only centralizing configuration files, it is possible to define a common configuration that is deployed as a standard artifact so that it can be then be reused by each project. For example:
In this example, the files `java-import-order.txt` and `java-formatter.xml` should be at the root of the deployed `org.mycompany:code-configuration:1.0.0` jar.
1950
+
<a name="examples"></a>
1948
1951
1949
1952
## Example configurations (from real-world projects)
***Contributions are welcome, see [the contributing guide](../CONTRIBUTING.md) for development info.***
@@ -2069,13 +2069,13 @@ You can adjust this with
2069
2069
2070
2070
Note that for Incremental build support the goals have to be bound to a phase prior to `test`.
2071
2071
2072
-
<aname="examples"></a>
2072
+
<aname="central-configuration"></a>
2073
2073
2074
-
## Sharing Configuration
2074
+
## How to centralize Spotless configuration
2075
2075
2076
2076
Rather than copying the formatter files across many projects, it is possible to define a common configuration that is deployed as a standard artifact so that it can be then be reused by each project; for example:
0 commit comments