mirror of
https://github.com/VolmitSoftware/Iris.git
synced 2026-10-26 05:50:39 +00:00
Stabilized sandbox source stamps
- Build constants use the captured Iris source fingerprint - Unrelated project changes preserve compiled Iris cache inputs
This commit is contained in:
1 parent
7fb684faf5
commit
d84050baac
1 file changed
+10
-4
+10
-4
@@ -1,3 +1,4 @@
|
|||||||
|
import groovy.json.JsonSlurper
|
||||||
import io.github.slimjar.resolver.data.Mirror
|
import io.github.slimjar.resolver.data.Mirror
|
||||||
import org.gradle.api.attributes.java.TargetJvmVersion
|
import org.gradle.api.attributes.java.TargetJvmVersion
|
||||||
import org.gradle.api.file.FileTreeElement
|
import org.gradle.api.file.FileTreeElement
|
||||||
@@ -217,10 +218,15 @@ def generateTemplates = tasks.register('generateTemplates', Copy) {
|
|||||||
return 'development'
|
return 'development'
|
||||||
},
|
},
|
||||||
commit: providers.provider {
|
commit: providers.provider {
|
||||||
String sourceHash = providers.environmentVariable('MULTIPLEXOR_SOURCE_HASH').orNull
|
String sourceHashesJson = providers.environmentVariable('MULTIPLEXOR_SOURCE_HASHES').orNull
|
||||||
if (sourceHash != null) {
|
if (sourceHashesJson != null) {
|
||||||
if (!(sourceHash ==~ /[a-f0-9]{64}/)) {
|
Object sourceHashes = new JsonSlurper().parseText(sourceHashesJson)
|
||||||
throw new GradleException('MULTIPLEXOR_SOURCE_HASH must be a SHA-256 source fingerprint')
|
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}"
|
return "source-${sourceHash}"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user