This is an automated email from the ASF dual-hosted git repository.

vladimirsitnikov pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jmeter.git

commit 3013d59089adba8a8a07a9f6429f4614661892a4
Author: Sandra Thieme <[email protected]>
AuthorDate: Fri Jan 6 11:29:21 2023 +0100

    Use relative paths in task inputs
    
    This improves build caching because those paths are part of the cache
    key calculation.
---
 src/dist/build.gradle.kts     | 8 ++++----
 src/licenses/build.gradle.kts | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/dist/build.gradle.kts b/src/dist/build.gradle.kts
index 500fe45810..bd0e7f3518 100644
--- a/src/dist/build.gradle.kts
+++ b/src/dist/build.gradle.kts
@@ -330,14 +330,14 @@ fun createAnakiaTask(
     }
 
     return tasks.register(taskName) {
-        inputs.file("$baseDir/$style")
-        inputs.file("$baseDir/$projectFile")
+        
inputs.file("$baseDir/$style").withPathSensitivity(PathSensitivity.RELATIVE).withPropertyName("styleDir")
+        
inputs.file("$baseDir/$projectFile").withPathSensitivity(PathSensitivity.RELATIVE).withPropertyName("projectDir")
         inputs.files(
             fileTree(baseDir) {
                 include(*includes)
                 exclude(*excludes)
             }
-        )
+        
).withPathSensitivity(PathSensitivity.RELATIVE).withPropertyName("baseDir")
         inputs.property("extension", extension)
         outputs.dir(outputDir)
         outputs.cacheIf { true }
@@ -440,7 +440,7 @@ fun xslt(
 
 val processSiteXslt by tasks.registering {
     val outputDir = "$buildDir/siteXslt"
-    inputs.files(xdocs)
+    
inputs.files(xdocs).withPathSensitivity(PathSensitivity.RELATIVE).withPropertyName("xdocs")
     inputs.property("year", lastEditYear)
     outputs.dir(outputDir)
     outputs.cacheIf { true }
diff --git a/src/licenses/build.gradle.kts b/src/licenses/build.gradle.kts
index 05d5a27a88..07a1da3fe8 100644
--- a/src/licenses/build.gradle.kts
+++ b/src/licenses/build.gradle.kts
@@ -51,7 +51,7 @@ fun gradleWrapperVersion(wrapperProps: String) =
 
 val gatherSourceLicenses by tasks.registering(GatherLicenseTask::class) {
     val wrapperProps = "$rootDir/gradle/wrapper/gradle-wrapper.properties"
-    inputs.file(wrapperProps)
+    
inputs.file(wrapperProps).withPathSensitivity(PathSensitivity.RELATIVE).withPropertyName("wrapper.props")
     
addDependency("org.gradle:gradle-wrapper:${gradleWrapperVersion(wrapperProps)}",
 SpdxLicense.Apache_2_0)
     addDependency(":bootstrap:3.3.4", SpdxLicense.MIT)
     addDependency(":bootstrap-social:4.8.0", SpdxLicense.MIT)

Reply via email to