Slackbot
09/16/2023, 8:24 AMKengo TODA
09/16/2023, 8:24 AMdef "returns different cache key for different paths"() {
def archive = project.file("another.zip")
def firstEntry = project.file("another/path/to/first")
firstEntry.parentFile.mkdirs()
firstEntry.text = "first"
def secondEntry = project.file("another/path/to/second")
secondEntry.text = "second"
project.ant.zip(basedir: project.file("another"), destfile: archive)
def firstResource = new FileCollectionBackedArchiveTextResource(project.services.get(FileOperations), project.services.get(TaskDependencyFactory),
project.services.get(TemporaryFileProvider), project.layout.files(archive), "path/to/first", Charsets.UTF_8)
def secondResource = new FileCollectionBackedArchiveTextResource(project.services.get(FileOperations), project.services.get(TaskDependencyFactory),
project.services.get(TemporaryFileProvider), project.layout.files(archive), "path/to/second", Charsets.UTF_8)
// TODO compare cache keys from these resource (expecting both has different cache key)
}
Kengo TODA
09/16/2023, 8:29 AMFileSystemLocationFingerprint
and related classes could be related but not so sure…