Skip to content

Commit 999b8ad

Browse files
authored
Migrate to Bazel 8 (#893)
1 parent 0ceebdb commit 999b8ad

19 files changed

Lines changed: 1554 additions & 234 deletions

File tree

.bazelignore

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,16 @@
1+
.direnv/
12
examples/
2-
3+
maven-plugin/target/
4+
project/target/
5+
scip-java/target/
6+
scip-semanticdb/target/
7+
semanticdb-agent/target/
8+
semanticdb-gradle-plugin/target/
9+
semanticdb-java/target/
10+
semanticdb-javac/target/
11+
semanticdb-kotlinc/target/
12+
target/
13+
tests/buildTools/target/
14+
tests/minimized/target/
15+
tests/snapshots/target/
16+
tests/unit/target/

.bazelversion

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
5.2.0
1+
8.7.0

.gitignore

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,16 +61,17 @@ index.scip
6161
./generated
6262
/sources
6363
bazel-bin
64-
bazel-bindings
65-
bazel-scip-java
6664
bazel-out
6765
bazel-testlogs
68-
bazel-lsif-java
66+
/bazel-bindings
67+
/bazel-scip-java
68+
/bazel-lsif-java
69+
/examples/bazel-example/bazel-bazel-example
6970

7071
VERSION
7172

7273
semanticdb-gradle-plugin/gradle
73-
aspects/scip_java.bzl
74+
/aspects/
7475

7576
tests/snapshots/META-INF/
7677

BUILD

Whitespace-only changes.

MODULE.bazel

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
module(name = "scip_java")
2+
3+
bazel_dep(name = "bazel_skylib", version = "1.9.0")
4+
bazel_dep(name = "protobuf", version = "34.1", repo_name = "com_google_protobuf")
5+
bazel_dep(name = "rules_java", version = "9.3.0")
6+
bazel_dep(name = "rules_jvm_external", version = "7.0")
7+
8+
maven = use_extension("@rules_jvm_external//:extensions.bzl", "maven")
9+
maven.install(
10+
artifacts = [
11+
"com.google.protobuf:protobuf-java-util:4.34.2",
12+
"org.projectlombok:lombok:1.18.22",
13+
"org.scip-code:scip-java-bindings:0.8.0",
14+
],
15+
known_contributing_modules = ["protobuf"],
16+
repositories = ["https://repo1.maven.org/maven2"],
17+
)
18+
use_repo(maven, "maven")

MODULE.bazel.lock

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

WORKSPACE

Lines changed: 0 additions & 66 deletions
This file was deleted.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
5.2.0
1+
8.7.0

examples/bazel-example/.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
bazel-bazel-example
2-
aspects/scip_java.bzl
2+
/aspects/
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
"""End-to-end example of consuming scip-java from an external Bazel project."""
2+
3+
module(name = "scip_java_example")
4+
5+
bazel_dep(name = "rules_java", version = "9.3.0")
6+
bazel_dep(name = "rules_jvm_external", version = "7.0")
7+
8+
bazel_dep(name = "scip_java", version = "")
9+
local_path_override(
10+
module_name = "scip_java",
11+
path = "../..",
12+
)
13+
14+
maven = use_extension("@rules_jvm_external//:extensions.bzl", "maven")
15+
maven.install(
16+
artifacts = [
17+
# Guava pin matches what the `protobuf` module contributes to `@maven`.
18+
"com.google.auto.value:auto-value:1.5.3",
19+
"com.google.guava:guava:32.0.1-jre",
20+
],
21+
known_contributing_modules = [
22+
"protobuf",
23+
"scip_java",
24+
],
25+
repositories = ["https://repo1.maven.org/maven2"],
26+
)
27+
use_repo(maven, "maven")

0 commit comments

Comments
 (0)