浏览代码

Fix remote cache misses for checkstyle tasks (#45512)

Mark Vieira 6 年之前
父节点
当前提交
ae5919b2c8

+ 1 - 5
buildSrc/src/main/groovy/org/elasticsearch/gradle/precommit/PrecommitTasks.groovy

@@ -237,16 +237,12 @@ class PrecommitTasks {
         // on them. We also want `precommit` to depend on `checkstyle`.
         // on them. We also want `precommit` to depend on `checkstyle`.
         project.pluginManager.apply('checkstyle')
         project.pluginManager.apply('checkstyle')
         project.checkstyle {
         project.checkstyle {
-            config = project.resources.text.fromFile(checkstyleConf, 'UTF-8')
-            configProperties = [
-                    suppressions: checkstyleSuppressions
-            ]
+            configDir = checkstyleDir
             toolVersion = CHECKSTYLE_VERSION
             toolVersion = CHECKSTYLE_VERSION
         }
         }
 
 
         project.tasks.withType(Checkstyle).configureEach { task ->
         project.tasks.withType(Checkstyle).configureEach { task ->
             task.dependsOn(copyCheckstyleConf)
             task.dependsOn(copyCheckstyleConf)
-            task.inputs.file(checkstyleSuppressions)
             task.reports {
             task.reports {
                 html.enabled false
                 html.enabled false
             }
             }

+ 1 - 1
buildSrc/src/main/resources/checkstyle.xml

@@ -7,7 +7,7 @@
   <property name="charset" value="UTF-8" />
   <property name="charset" value="UTF-8" />
 
 
   <module name="SuppressionFilter">
   <module name="SuppressionFilter">
-    <property name="file" value="${suppressions}" />
+    <property name="file" value="${config_loc}/checkstyle_suppressions.xml" />
   </module>
   </module>
 
 
   <!-- Checks Java files and forbids empty Javadoc comments -->
   <!-- Checks Java files and forbids empty Javadoc comments -->