lazy val scalaPBSettings = Seq(
PB.pythonExe := "C:\\Python27\\python.exe",
PB.protocVersion := "-v340",
PB.targets in Compile := Seq(
scalapb.gen(flatPackage = true, grpc = false) -> (sourceManaged in Compile).value
),
PB.protoSources in Compile += PB.externalIncludePath.value / "google" / "type",
PB.includePaths in Compile -= PB.externalIncludePath.value / "google" / "type"
)
val scalapbVersion = com.trueaccord.scalapb.compiler.Version.scalapbVersion
lazy val scalaPB = Seq(
"com.trueaccord.scalapb" %% "scalapb-runtime" % scalapbVersion % "protobuf",
"com.google.api.grpc" % "googleapis-common-protos" % "0.0.3" % "protobuf"
}
lazy val com4jDep = "org.jvnet.com4j" % "com4j" % "2.+"
lazy val tlbimp = taskKey[Seq[File]]("Source generator for dll")
tlbimp := {
val importer = new com4j.tlbimp.driver.AntTaskImpl()
importer.setDestDir((sourceManaged in Compile).value)
importer.setFile(new File(((unmanagedResources in Compile).value / "someLegacyApi.x64.dll").absString))
importer.setPackage("some.legacy.api")
importer.execute()
PathFinder((sourceManaged in Compile).value / "some" / "legacy" / "api").**("*.java").get
}
sourceGenerators in Compile += tlbimp.taskValue
addSbtPlugin("com.thesamet" % "sbt-protoc" % "0.99.12")
addSbtPlugin("com.typesafe.sbt" % "sbt-git" % "0.9.3")
addSbtPlugin("org.scalastyle" %% "scalastyle-sbt-plugin" % "1.0.0")
addSbtPlugin("com.typesafe.sbt" % "sbt-native-packager" % "1.2.2")
libraryDependencies ++= Seq(
"com.trueaccord.scalapb" %% "compilerplugin" % "0.6.6",
"org.slf4j" % "slf4j-nop" % "1.7.21",
"org.jvnet.com4j" % "tlbimp" % "2.+"
)
--
You received this message because you are subscribed to the Google Groups "ScalaPB" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scalapb+unsubscribe@googlegroups.com.
To post to this group, send email to sca...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/scalapb/00099b5f-6acf-44c4-93ea-20bf92e17d48%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.