File tree Expand file tree Collapse file tree 1 file changed +24
-0
lines changed
plugin-gradle/src/main/java/com/diffplug/gradle/spotless Expand file tree Collapse file tree 1 file changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -69,6 +69,30 @@ public class BufFormatExtension {
69
69
addStep (createStep ());
70
70
}
71
71
72
+ /**
73
+ * When used in conjunction with the <a href=https://github.com/andrewparmet/buf-gradle-plugin>{@code buf-gradle-plugin}</a>,
74
+ * the {@code buf} executable can be resolved from its {@code bufTool} configuration:
75
+ *
76
+ * <pre>
77
+ * {@code
78
+ * spotless {
79
+ * protobuf {
80
+ * buf().pathToExe(configurations.getByName(BUF_BINARY_CONFIGURATION_NAME).singleFile.absolutePath)
81
+ * }
82
+ * }
83
+ * }
84
+ * </pre>
85
+ *
86
+ * Be sure to disable the {@code buf-gradle-plugin}'s native support of {@code buf format}:
87
+ *
88
+ * <pre>
89
+ * {@code
90
+ * buf {
91
+ * enforceFormat = false
92
+ * }
93
+ * }
94
+ * </pre>
95
+ */
72
96
public BufFormatExtension pathToExe (String pathToExe ) {
73
97
step = step .withPathToExe (pathToExe );
74
98
replaceStep (createStep ());
You can’t perform that action at this time.
0 commit comments