Skip to content

Commit ee5eb8e

Browse files
lucamilanesiomsohn
authored andcommitted
Restore WORKSPACE and Bazel 7.6.1
The current master branch is not buildable with Gerrit Code Review because of the different versions of Bazel and the use of bzlmods instead of WORKSPACE. The support for Bazel was introduced for allowing to build JGit from source together with the Gerrit Code Review build; having two different dependencies models and versions of Bazel would diverge from its original goal. Also re-apply the following dependencies updates: - ff40758 Update jetty to 12.0.23 - efe2e4d Update bytebuddy to 1.17.6 - 5606070 Update bouncycastle to 1.81 - f5071db Update mockito to 5.18.0 - 30b9c44 Update com.google.code.gson:gson to 2.13.1 NOTE: This change *should be reverted* once Gerrit Code Review dependencies are also migrated to bzlmod and the version is bumped to Bazel 8. Change-Id: I587d615137b80d242135c581e75d512a15c99917
1 parent 48da42b commit ee5eb8e

File tree

8 files changed

+411
-372
lines changed

8 files changed

+411
-372
lines changed

.bazelrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# TODO(davido): Migrate all dependencies from WORKSPACE to MODULE.bazel
2+
# https://issues.gerritcodereview.com/issues/303819949
3+
common --noenable_bzlmod
4+
common --enable_workspace
5+
16
build --workspace_status_command="python3 ./tools/workspace_status.py"
27
build --repository_cache=~/.gerritcodereview/bazel-cache/repository
38
build --incompatible_strict_action_env

.bazelversion

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
8.2.1
1+
7.6.1

MODULE.bazel

Lines changed: 2 additions & 101 deletions
Original file line numberDiff line numberDiff line change
@@ -1,101 +1,2 @@
1-
module(name = "jgit", version = "7.4.0")
2-
3-
bazel_dep(name = "rules_java", version = "8.11.0")
4-
bazel_dep(name = "rules_jvm_external", version = "6.7")
5-
6-
register_toolchains("//tools:error_prone_warnings_toolchain_java17_definition")
7-
8-
register_toolchains("//tools:error_prone_warnings_toolchain_java21_definition")
9-
10-
git_repository = use_repo_rule("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
11-
12-
git_repository(
13-
name = "com_googlesource_gerrit_bazlets",
14-
commit = "f9c119e45d9a241bee720b7fbd6c7fdbc952da5f",
15-
remote = "https://gerrit.googlesource.com/bazlets",
16-
)
17-
18-
http_archive = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
19-
20-
http_archive(
21-
name = "ubuntu2204_jdk17",
22-
sha256 = "8ea82b81c9707e535ff93ef5349d11e55b2a23c62bcc3b0faaec052144aed87d",
23-
strip_prefix = "rbe_autoconfig-5.1.0",
24-
urls = [
25-
"https://gerrit-bazel.storage.googleapis.com/rbe_autoconfig/v5.1.0.tar.gz",
26-
"https://github.com/davido/rbe_autoconfig/releases/download/v5.1.0/v5.1.0.tar.gz",
27-
],
28-
)
29-
30-
BOUNCYCASTLE_VERSION = "1.81"
31-
32-
BYTE_BUDDY_VERSION = "1.17.6"
33-
34-
JETTY_VERSION = "12.0.23"
35-
36-
JMH_VERSION = "1.37"
37-
38-
JNA_VERSION = "5.17.0"
39-
40-
SLF4J_VERSION = "1.7.36"
41-
42-
SSHD_VERSION = "2.15.0"
43-
44-
maven = use_extension("@rules_jvm_external//:extensions.bzl", "maven")
45-
maven.install(
46-
name = "jgit_deps",
47-
artifacts = [
48-
"args4j:args4j:2.37",
49-
"com.google.code.gson:gson:2.13.1",
50-
"com.google.errorprone:error_prone_type_annotations:2.38.0",
51-
"com.googlecode.javaewah:JavaEWAH:1.2.3",
52-
"com.jcraft:jsch:0.1.55",
53-
"com.jcraft:jzlib:1.1.3",
54-
"commons-codec:commons-codec:1.18.0",
55-
"commons-io:commons-io:2.19.0",
56-
"commons-logging:commons-logging:1.3.5",
57-
"jakarta.servlet:jakarta.servlet-api:6.1.0",
58-
"junit:junit:4.13.2",
59-
"net.bytebuddy:byte-buddy-agent:" + BYTE_BUDDY_VERSION,
60-
"net.bytebuddy:byte-buddy:" + BYTE_BUDDY_VERSION,
61-
"net.java.dev.jna:jna-platform:" + JNA_VERSION,
62-
"net.java.dev.jna:jna:" + JNA_VERSION,
63-
"net.sf.jopt-simple:jopt-simple:5.0.4",
64-
"org.apache.commons:commons-compress:1.27.1",
65-
"org.apache.commons:commons-lang3:3.17.0",
66-
"org.apache.commons:commons-math3:3.6.1",
67-
"org.apache.httpcomponents:httpclient:4.5.14",
68-
"org.apache.httpcomponents:httpcore:4.4.16",
69-
"org.apache.sshd:sshd-osgi:" + SSHD_VERSION,
70-
"org.apache.sshd:sshd-sftp:" + SSHD_VERSION,
71-
"org.assertj:assertj-core:3.27.3",
72-
"org.bouncycastle:bcpg-jdk18on:" + BOUNCYCASTLE_VERSION,
73-
"org.bouncycastle:bcpkix-jdk18on:" + BOUNCYCASTLE_VERSION,
74-
"org.bouncycastle:bcprov-jdk18on:" + BOUNCYCASTLE_VERSION,
75-
"org.bouncycastle:bcutil-jdk18on:" + BOUNCYCASTLE_VERSION,
76-
"org.eclipse.jetty.ee10:jetty-ee10-servlet:" + JETTY_VERSION,
77-
"org.eclipse.jetty:jetty-http:" + JETTY_VERSION,
78-
"org.eclipse.jetty:jetty-io:" + JETTY_VERSION,
79-
"org.eclipse.jetty:jetty-security:" + JETTY_VERSION,
80-
"org.eclipse.jetty:jetty-server:" + JETTY_VERSION,
81-
"org.eclipse.jetty:jetty-session:" + JETTY_VERSION,
82-
"org.eclipse.jetty:jetty-util-ajax:" + JETTY_VERSION,
83-
"org.eclipse.jetty:jetty-util:" + JETTY_VERSION,
84-
"org.hamcrest:hamcrest:2.2",
85-
"org.mockito:mockito-core:5.18.0",
86-
"org.objenesis:objenesis:3.4",
87-
"org.openjdk.jmh:jmh-core:" + JMH_VERSION,
88-
"org.openjdk.jmh:jmh-generator-annprocess:" + JMH_VERSION,
89-
"org.slf4j:slf4j-api:" + SLF4J_VERSION,
90-
"org.slf4j:slf4j-simple:" + SLF4J_VERSION,
91-
"org.tukaani:xz:1.10",
92-
],
93-
duplicate_version_warning = "error",
94-
fail_on_missing_checksum = True,
95-
fetch_sources = True,
96-
repositories = [
97-
"https://repo1.maven.org/maven2",
98-
],
99-
strict_visibility = True,
100-
)
101-
use_repo(maven, "jgit_deps")
1+
# TODO(davido): Migrate all dependencies from WORKSPACE to MODULE.bazel
2+
# https://issues.gerritcodereview.com/issues/303819949

0 commit comments

Comments
 (0)