From d84050baac9b5ac9ef9ef880c8d694b97f96c78e Mon Sep 17 00:00:00 2001 From: Brian Neumann-Fopiano Date: Wed, 21 Oct 2026 05:32:24 -0400 Subject: [PATCH] Stabilized sandbox source stamps - Build constants use the captured Iris source fingerprint - Unrelated project changes preserve compiled Iris cache inputs --- core/build.gradle | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/core/build.gradle b/core/build.gradle index d88512810..4ca0f56b9 100644 --- a/core/build.gradle +++ b/core/build.gradle @@ -1,3 +1,4 @@ +import groovy.json.JsonSlurper import io.github.slimjar.resolver.data.Mirror import org.gradle.api.attributes.java.TargetJvmVersion import org.gradle.api.file.FileTreeElement @@ -217,10 +218,15 @@ def generateTemplates = tasks.register('generateTemplates', Copy) { return 'development' }, commit: providers.provider { - String sourceHash = providers.environmentVariable('MULTIPLEXOR_SOURCE_HASH').orNull - if (sourceHash != null) { - if (!(sourceHash ==~ /[a-f0-9]{64}/)) { - throw new GradleException('MULTIPLEXOR_SOURCE_HASH must be a SHA-256 source fingerprint') + String sourceHashesJson = providers.environmentVariable('MULTIPLEXOR_SOURCE_HASHES').orNull + if (sourceHashesJson != null) { + Object sourceHashes = new JsonSlurper().parseText(sourceHashesJson) + if (!(sourceHashes instanceof Map)) { + throw new GradleException('MULTIPLEXOR_SOURCE_HASHES must map project paths to SHA-256 source fingerprints') + } + Object sourceHash = sourceHashes.get(rootProject.projectDir.canonicalPath) + if (!(sourceHash instanceof String) || !(sourceHash ==~ /[a-f0-9]{64}/)) { + throw new GradleException("MULTIPLEXOR_SOURCE_HASHES requires a SHA-256 source fingerprint for ${rootProject.projectDir.canonicalPath}") } return "source-${sourceHash}" }