Sfoglia il codice sorgente

Add a system property to forcibly format everything (#78768)

In order to make it easier to migrate to an automatically-formatted world,
add a system property that causes Spotless to format every Java project,
ignoring the exclusion list.
Rory Hunter 4 anni fa
parent
commit
69cf6794ec

+ 2 - 1
build-tools-internal/src/main/groovy/elasticsearch.formatting.gradle

@@ -196,7 +196,8 @@ def projectPathsToExclude = [
 
 subprojects {
   plugins.withType(ElasticsearchJavaPlugin).whenPluginAdded {
-    if (projectPathsToExclude.contains(project.path) == false) {
+    if (projectPathsToExclude.contains(project.path) == false ||
+        providers.systemProperty("es.format.everything").forUseAtConfigurationTime().isPresent()) {
       project.apply plugin: "com.diffplug.spotless"