Skip to content

Commit 28f00b0

Browse files
WIP
1 parent ac4b5c7 commit 28f00b0

5 files changed

Lines changed: 31 additions & 3 deletions

File tree

.tool-versions

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
golang 1.17.5
1+
golang 1.23.1

build.sbt

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import scala.util.control.NoStackTrace
99

1010
lazy val V =
1111
new {
12-
val protobuf = "3.15.6"
12+
val protobuf = "3.25.6"
1313
val protoc =
1414
"3.17.3" // the oldest protoc version with Apple M1 support, see https://github.com/scalapb/ScalaPB/issues/1024#issuecomment-860126568
1515
val coursier = "2.1.9"
@@ -107,6 +107,31 @@ lazy val agent = project
107107
"Premain-Class" -> "com.sourcegraph.semanticdb_javac.SemanticdbAgent"
108108
)
109109
)
110+
111+
import kotlin.Keys._
112+
lazy val kotlincPlugin = project
113+
.in(file("semanticdb-kotlinc"))
114+
.enablePlugins(KotlinPlugin)
115+
.settings(
116+
kotlinVersion := "2.0.21",
117+
kotlincJvmTarget := "1.8",
118+
kotlinLib("stdlib"),
119+
kotlinLib("compiler-embeddable"),
120+
// the source generator that sbt-protoc adds only includes java and scala files
121+
Compile / sourceGenerators +=
122+
(Compile / PB.generate)
123+
.map(
124+
_.filter { file =>
125+
file.getName.endsWith(".kt")
126+
}
127+
)
128+
.taskValue,
129+
(Compile / PB.protoSources) :=
130+
Seq((semanticdb / Compile / sourceDirectory).value / "protobuf"),
131+
(Compile / PB.targets) :=
132+
Seq(PB.gens.kotlin(V.protobuf) -> (Compile / sourceManaged).value)
133+
)
134+
110135
lazy val gradlePlugin = project
111136
.in(file("semanticdb-gradle-plugin"))
112137
.settings(

project/build.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
sbt.version=1.10.10
1+
sbt.version=1.10.11

project/plugins.sbt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ addSbtPlugin("com.lightbend.sbt" % "sbt-java-formatter" % "0.6.1")
1111
addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.3")
1212
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.15.0")
1313
addSbtPlugin("io.spray" % "sbt-revolver" % "0.9.1")
14+
addSbtPlugin("org.jetbrains.scala" % "sbt-kotlin-plugin" % "3.1.4")
1415
// sbt-jdi-tools appears to fix an error related to this message:
1516
// [error] (plugin / Compile / compileIncremental) java.lang.NoClassDefFoundError: com/sun/tools/javac/code/Symbol
1617
addSbtPlugin("org.scala-debugger" % "sbt-jdi-tools" % "1.1.1")

semanticdb-java/src/main/protobuf/semanticdb.proto

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ syntax = "proto3";
77

88
package com.sourcegraph.semanticdb_javac;
99

10+
option java_multiple_files = true;
11+
1012
enum Schema {
1113
LEGACY = 0;
1214
SEMANTICDB3 = 3;

0 commit comments

Comments
 (0)