From deece815b490b6bf746003611037038b1352fdf2 Mon Sep 17 00:00:00 2001 From: Brice Jaglin Date: Sun, 31 Jan 2021 19:31:39 +0100 Subject: [PATCH] fix protoc-gen-scala retrieval on windows --- src/sbt-test/settings/native/build.sbt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/sbt-test/settings/native/build.sbt b/src/sbt-test/settings/native/build.sbt index 429f379d..7b15d77f 100644 --- a/src/sbt-test/settings/native/build.sbt +++ b/src/sbt-test/settings/native/build.sbt @@ -11,9 +11,9 @@ Compile / PB.targets := Seq( ) -> (Compile / sourceManaged).value ) -val scalapbcClassifier = - if (protocbridge.SystemDetector.detectedClassifier().startsWith("windows")) "windows" - else "unix" +val isWindows = protocbridge.SystemDetector.detectedClassifier().startsWith("windows") +val protocGenScalaExtension = if (isWindows) "bat" else "sh" +val protocGenScalaClassifier = if (isWindows) "windows" else "unix" libraryDependencies += "javax.annotation" % "javax.annotation-api" % "1.3.2" libraryDependencies += "io.grpc" % "grpc-stub" % "1.35.0" @@ -25,7 +25,7 @@ libraryDependencies += "com.thesamet.scalapb" % "protoc-gen-scala" % "0.10.10" Artifact( "protoc-gen-scala", PB.ProtocPlugin, - "sh", - scalapbcClassifier + protocGenScalaExtension, + protocGenScalaClassifier ) )