From c1a073f65b43b77bf63aeb2a37a321349d4dc973 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Koz=C5=82owski?= Date: Tue, 23 Nov 2021 00:52:54 +0100 Subject: [PATCH] Add calibanVersion setting (#1165) --- codegen-sbt/src/main/scala/caliban/codegen/CalibanKeys.scala | 2 ++ codegen-sbt/src/main/scala/caliban/codegen/CalibanPlugin.scala | 1 + 2 files changed, 3 insertions(+) diff --git a/codegen-sbt/src/main/scala/caliban/codegen/CalibanKeys.scala b/codegen-sbt/src/main/scala/caliban/codegen/CalibanKeys.scala index 24d2e2882..bd9984969 100644 --- a/codegen-sbt/src/main/scala/caliban/codegen/CalibanKeys.scala +++ b/codegen-sbt/src/main/scala/caliban/codegen/CalibanKeys.scala @@ -19,6 +19,8 @@ trait CalibanKeys { @deprecated("CodegenPlugin has been renamed to CalibanPlugin", "1.1.0") val CodegenPlugin: CalibanPlugin.type = CalibanPlugin + + val calibanVersion = settingKey[String]("Version of the Caliban sbt plugin") } object CalibanKeys extends CalibanKeys diff --git a/codegen-sbt/src/main/scala/caliban/codegen/CalibanPlugin.scala b/codegen-sbt/src/main/scala/caliban/codegen/CalibanPlugin.scala index 6319dfcc5..2d07ade3f 100644 --- a/codegen-sbt/src/main/scala/caliban/codegen/CalibanPlugin.scala +++ b/codegen-sbt/src/main/scala/caliban/codegen/CalibanPlugin.scala @@ -12,6 +12,7 @@ object CalibanPlugin extends AutoPlugin { lazy val baseSettings = Seq( caliban := (caliban / calibanGenerator).value, + calibanVersion := BuildInfo.version, (caliban / sourceManaged) := { sourceManaged.value / "caliban-codegen-sbt" },