Skip to content

Commit

Permalink
refactor: keep cache directory structure
Browse files Browse the repository at this point in the history
  • Loading branch information
regiskuckaertz committed Jun 10, 2023
1 parent d476fb3 commit 5324b35
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/core/src/main/scala/AbstractCodegenPlugin.scala
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package dev.guardrail
package sbt

import _root_.sbt.{Keys => SbtKeys, _}
import _root_.sbt.{Keys => SbtKeys, Types => _, _}
import _root_.sbt.plugins.JvmPlugin
import dev.guardrail.runner.GuardrailRunner
import dev.guardrail.terms.protocol.PropertyRequirement
Expand Down Expand Up @@ -189,7 +189,7 @@ trait AbstractGuardrailPlugin extends GuardrailRunner { self: AutoPlugin =>

private def cachedGuardrailTask(projectName: String, scope: String, scalaBinaryVersion: String)(kind: String, streams: _root_.sbt.Keys.TaskStreams)(tasks: List[(String, Args)], sources: Seq[java.io.File]) = {
val inputFiles = tasks.flatMap(_._2.specPath).map(file(_)).toSet
val cacheDir = streams.cacheDirectory / "guardrail"
val cacheDir = streams.cacheDirectory / "guardrail" / scalaBinaryVersion / kind

val cachedFn = _root_.sbt.util.FileFunction
.cached(cacheDir, inStyle = FilesInfo.hash, outStyle = FilesInfo.hash) {
Expand Down

0 comments on commit 5324b35

Please sign in to comment.