Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ index.scip
./generated
/sources
bazel-bin
bazel-bindings
bazel-scip-java
bazel-out
bazel-testlogs
Expand Down
19 changes: 13 additions & 6 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@ http_archive(
"https://github.com/bazelbuild/rules_proto/archive/refs/tags/4.0.0-3.20.0.tar.gz",
],
)
load("@rules_proto//proto:repositories.bzl", "rules_proto_dependencies", "rules_proto_toolchains")
rules_proto_dependencies()
rules_proto_toolchains()

##############
# JVM External
##############
Expand All @@ -49,11 +45,22 @@ rules_jvm_external_setup()
load("@rules_jvm_external//:defs.bzl", "maven_install")
maven_install(
artifacts = [
"com.google.protobuf:protobuf-java:3.15.6",
"com.google.protobuf:protobuf-java-util:3.15.6",
"com.google.protobuf:protobuf-java:4.34.2",
"com.google.protobuf:protobuf-java-util:4.34.2",
"org.projectlombok:lombok:1.18.22",
"org.scip-code:scip-java-bindings:0.8.0",
],
repositories = [
"https://repo1.maven.org/maven2",
],
# Pre-empts rules_proto's bundled protobuf-java 3.20 so the
# scip-java-bindings 4.x gencode sees a compatible runtime.
generate_compat_repositories = True,
)

load("@maven//:compat.bzl", "compat_repositories")
compat_repositories()

load("@rules_proto//proto:repositories.bzl", "rules_proto_dependencies", "rules_proto_toolchains")
rules_proto_dependencies()
rules_proto_toolchains()
22 changes: 8 additions & 14 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ import scala.collection.mutable.ListBuffer

lazy val V =
new {
val protobuf = "4.32.1"
val protobuf = "4.34.2"
val scipBindings = "0.8.0"
val scalaXml = "2.1.0"
val moped = "0.2.0"
val gradle = "7.0"
Expand Down Expand Up @@ -171,29 +172,22 @@ lazy val javacPlugin = project
)
.dependsOn(semanticdb)

lazy val scipProto = project
.in(file("scip-java-proto"))
.settings(
moduleName := "scip-java-proto",
javaOnlySettings,
libraryDependencies +=
"com.google.protobuf" % "protobuf-java-util" % V.protobuf,
(Compile / PB.targets) :=
Seq(PB.gens.java(V.protobuf) -> (Compile / sourceManaged).value),
Compile / PB.protocOptions := Seq("--experimental_allow_proto3_optional")
)

lazy val scip = project
.in(file("scip-semanticdb"))
.settings(
publishMavenStyle := true,
moduleName := "scip-semanticdb",
javaOnlySettings,
libraryDependencies ++=
Seq(
"org.scip-code" % "scip-java-bindings" % V.scipBindings,
"com.google.protobuf" % "protobuf-java-util" % V.protobuf
),
(Compile / PB.targets) :=
Seq(PB.gens.java(V.protobuf) -> (Compile / sourceManaged).value),
Compile / PB.protocOptions := Seq("--experimental_allow_proto3_optional")
)
.dependsOn(semanticdb, scipProto)
.dependsOn(semanticdb)

lazy val mavenPlugin = project
.in(file("maven-plugin"))
Expand Down
24 changes: 16 additions & 8 deletions examples/bazel-example/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,6 @@ http_archive(
],
)

load("@rules_proto//proto:repositories.bzl", "rules_proto_dependencies", "rules_proto_toolchains")

rules_proto_dependencies()

rules_proto_toolchains()

##############
# JVM External
##############
Expand Down Expand Up @@ -79,13 +73,27 @@ load("@rules_jvm_external//:defs.bzl", "maven_install")

maven_install(
artifacts = [
"com.google.protobuf:protobuf-java:3.15.6", # Required dependency by scip-java.
"com.google.protobuf:protobuf-java-util:3.15.6", # Required dependency by scip-java.
"com.google.protobuf:protobuf-java:4.34.2", # Required dependency by scip-java.
"com.google.protobuf:protobuf-java-util:4.34.2", # Required dependency by scip-java.
"org.scip-code:scip-java-bindings:0.8.0", # Required dependency by scip-java.
# These dependencies are only required for the tests
"com.google.guava:guava:31.0-jre",
"com.google.auto.value:auto-value:1.5.3",
],
repositories = [
"https://repo1.maven.org/maven2",
],
# Pre-empts rules_proto's bundled protobuf-java 3.20 so the
# scip-java-bindings 4.x gencode sees a compatible runtime.
generate_compat_repositories = True,
)

load("@maven//:compat.bzl", "compat_repositories")

compat_repositories()

load("@rules_proto//proto:repositories.bzl", "rules_proto_dependencies", "rules_proto_toolchains")

rules_proto_dependencies()

rules_proto_toolchains()
16 changes: 0 additions & 16 deletions scip-java-proto/src/main/protobuf/BUILD

This file was deleted.

Loading
Loading