This is an automated email from the ASF dual-hosted git repository.
snazy pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/polaris.git
The following commit(s) were added to refs/heads/main by this push:
new 6a6dc38fd Build: make jcstress task cacheable (#2734)
6a6dc38fd is described below
commit 6a6dc38fd99e6302481d7701bb46f787b157370f
Author: Robert Stupp <[email protected]>
AuthorDate: Wed Oct 1 10:05:00 2025 +0200
Build: make jcstress task cacheable (#2734)
Uses a couple of system specific properties, which are relevant for
jcstress, as task inputs.
---
persistence/nosql/idgen/impl/build.gradle.kts | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/persistence/nosql/idgen/impl/build.gradle.kts
b/persistence/nosql/idgen/impl/build.gradle.kts
index abf245fed..1b7e6cf1b 100644
--- a/persistence/nosql/idgen/impl/build.gradle.kts
+++ b/persistence/nosql/idgen/impl/build.gradle.kts
@@ -26,6 +26,8 @@ plugins {
description = "Polaris ID generation implementation"
+val jcstressRuntime by configurations.creating
+
dependencies {
implementation(project(":polaris-idgen-api"))
implementation(project(":polaris-idgen-spi"))
@@ -58,6 +60,8 @@ dependencies {
jmhImplementation(libs.jmh.core)
jmhAnnotationProcessor(libs.jmh.generator.annprocess)
+
+ jcstressRuntime(libs.jcstress.core)
}
tasks.named("jcstressJar") { dependsOn("jandex") }
@@ -67,3 +71,18 @@ tasks.named("compileJcstressJava") { dependsOn("jandex") }
tasks.named("check") { dependsOn("jcstress") }
jcstress { jcstressDependency = libs.jcstress.core.get().toString() }
+
+tasks.named("jcstress") {
+ inputs.properties(
+ System.getProperties()
+ .mapKeys { it.key.toString() }
+ .filterKeys {
+ setOf("os.name", "os.arch", "os.version", "java.runtime.name",
"java.runtime.version")
+ .contains(it)
+ }
+ )
+ inputs.property("availableProcessors",
Runtime.getRuntime().availableProcessors())
+ inputs.files(jcstressRuntime)
+ inputs.files(configurations.runtimeClasspath)
+ outputs.dir(layout.buildDirectory.dir("reports/jcstress"))
+}