Skip to content

Commit dc0cfeb

Browse files
committed
Use official Kotlin/Protobuf generator
Previously, we used an unmaintained Kotlin protobuf generator, which didn't support Apple M1 chips. This commit replaces this dependency with the official Protobuf generator, which works on Apple M1.
1 parent aa72546 commit dc0cfeb

File tree

2 files changed

+3
-50
lines changed

2 files changed

+3
-50
lines changed

semanticdb-kotlin/build.gradle.kts

Lines changed: 3 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import com.google.protobuf.gradle.*
33
plugins {
44
kotlin("jvm")
55
id("com.google.protobuf") version "0.8.17"
6-
id("com.github.marcoferrer.kroto-plus") version "0.6.1"
76
}
87

98
repositories {
@@ -23,7 +22,7 @@ buildscript {
2322
dependencies {
2423
implementation(kotlin("stdlib"))
2524
implementation("com.google.protobuf:protobuf-java:3.17.3")
26-
compileOnly("com.sourcegraph", "semanticdb-javac", "0.6.12")
25+
compileOnly("com.sourcegraph", "semanticdb-javac", "0.8.23")
2726
}
2827

2928

@@ -45,41 +44,16 @@ afterEvaluate {
4544
}
4645
}
4746

48-
krotoPlus {
49-
config {
50-
create("main") {
51-
builder.protoBuilders {
52-
useDslMarkers = true
53-
unwrapBuilders = true
54-
}
55-
}
56-
}
57-
}
5847

5948
protobuf {
6049
protoc {
61-
artifact = "com.google.protobuf:protoc:3.15.7"
50+
artifact = "com.google.protobuf:protoc:3.17.3"
6251
}
6352

6453
generatedFilesBaseDir = kotlin.sourceSets.main.get().kotlin.srcDirs.first().path.split(":")[0].removeSuffix("main/kotlin")
6554

6655
plugins {
67-
id("kroto") {
68-
artifact = "com.github.marcoferrer.krotoplus:protoc-gen-kroto-plus:0.6.1"
69-
}
56+
kotlin { }
7057
}
7158

72-
generateProtoTasks {
73-
val krotoConfig = file("${projectDir}/krotoconfig.json")
74-
all().forEach { task ->
75-
task.inputs.files(krotoConfig)
76-
77-
task.plugins {
78-
id("kroto") {
79-
outputSubDir = "java"
80-
option("ConfigPath=${krotoConfig}")
81-
}
82-
}
83-
}
84-
}
8559
}

semanticdb-kotlin/src/main/java/com/sourcegraph/semanticdb_kotlinc/Semanticdb.java

Lines changed: 0 additions & 21 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)