Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to bzlmod #5805

Merged
merged 18 commits into from
Dec 20, 2023
Merged
Show file tree
Hide file tree
Changes from 12 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
4 changes: 3 additions & 1 deletion .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@ query --deleted_packages=//aspect/testing/tests/src/com/google/idea/blaze/aspect

# TODO: migrate all dependencies from WORKSPACE to MODULE.bazel
# https://github.com/bazelbuild/intellij/issues/5432
common --noenable_bzlmod
common --enable_bzlmod

common --experimental_google_legacy_api
1 change: 1 addition & 0 deletions .bazelversion
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
7.0.0-pre.20231018.3
agluszak marked this conversation as resolved.
Show resolved Hide resolved
agluszak marked this conversation as resolved.
Show resolved Hide resolved
211 changes: 209 additions & 2 deletions MODULE.bazel
Original file line number Diff line number Diff line change
@@ -1,2 +1,209 @@
# TODO: migrate all dependencies from WORKSPACE to MODULE.bazel
# https://github.com/bazelbuild/intellij/issues/5432
bazel_dep(
name = "platforms",
version = "0.0.8",
)
agluszak marked this conversation as resolved.
Show resolved Hide resolved

bazel_dep(
name = "rules_go",
version = "0.39.1",
)

bazel_dep(
name = "rules_java",
version = "6.5.1",
)

bazel_dep(
name = "rules_python",
version = "0.27.0",
)

python = use_extension("@rules_python//python/extensions:python.bzl", "python")

python.toolchain(
configure_coverage_tool = True,
python_version = "3.11",
)
agluszak marked this conversation as resolved.
Show resolved Hide resolved

use_repo(python, "python_3_11", "python_versions")

bazel_dep(
name = "rules_proto",
version = "5.3.0-21.7",
)

bazel_dep(
name = "bazel_skylib",
version = "1.5.0",
)

bazel_dep(
name = "rules_pkg",
version = "0.9.1",
)

bazel_dep(
name = "rules_kotlin",
version = "1.9.0",
)

bazel_dep(
name = "rules_android",
version = "0.1.1",
)

remote_android_extensions = use_extension("@bazel_tools//tools/android:android_extensions.bzl", "remote_android_tools_extensions")

use_repo(remote_android_extensions, "android_gmaven_r8", "android_tools")

agluszak marked this conversation as resolved.
Show resolved Hide resolved
bazel_dep(
name = "rules_bazel_integration_test",
version = "0.20.0",
dev_dependency = True,
)

bazel_binaries = use_extension(
"@rules_bazel_integration_test//:extensions.bzl",
"bazel_binaries",
dev_dependency = True,
)

bazel_binaries.download(version = "6.0.0")

bazel_binaries.download(version = "4.0.0")

use_repo(
bazel_binaries,
"bazel_binaries",
"build_bazel_bazel_4_0_0",
"build_bazel_bazel_6_0_0",
"bazel_binaries_bazelisk",
)

bazel_dep(
name = "rules_jvm_external",
version = "5.3",
)

maven = use_extension("@rules_jvm_external//:extensions.bzl", "maven")

maven.install(
name = "maven",
agluszak marked this conversation as resolved.
Show resolved Hide resolved
artifacts = [
"junit:junit:4.13.2",
"org.mockito:mockito-core:3.3.0",
# objenesis is a dependency of mockito https://mvnrepository.com/artifact/org.mockito/mockito-core/3.3.0
# Before 2023.2 it was delivered with IntelliJ bundle in lib/app.jar, but this no longer happens so we need
# to download it from Maven Central.
"org.objenesis:objenesis:3.3",
"net.bytebuddy:byte-buddy:1.10.5",
"net.bytebuddy:byte-buddy-agent:1.10.5",
"com.google.flogger:flogger:0.7.4",
"com.google.flogger:flogger-system-backend:0.7.4",
"com.googlecode.java-diff-utils:diffutils:1.2.1",
"org.jetbrains.kotlinx:kotlinx-coroutines-core-jvm:1.6.2",
"org.jetbrains.kotlinx:kotlinx-coroutines-test-jvm:1.6.2",
# Usually, we'd get this from the JetBrains SDK, but the bundled one not aware of Bazel platforms,
# so it fails on certain setups.
"net.java.dev.jna:jna:5.13.0",

# From IO_GRPC_GRPC_JAVA_ARTIFACTS
"com.google.android:annotations:4.1.1.4",
agluszak marked this conversation as resolved.
Show resolved Hide resolved
"com.google.api.grpc:proto-google-common-protos:2.22.0",
"com.google.auth:google-auth-library-credentials:1.4.0",
"com.google.auth:google-auth-library-oauth2-http:1.4.0",
"com.google.auto.value:auto-value-annotations:1.10.2",
"com.google.auto.value:auto-value:1.10.2",
"com.google.code.findbugs:jsr305:3.0.2",
"com.google.code.gson:gson:2.10.1",
"com.google.errorprone:error_prone_annotations:2.20.0",
"com.google.guava:failureaccess:1.0.1",
"com.google.guava:guava:32.0.1-jre", # changed to jre
"com.google.re2j:re2j:1.7",
"com.google.truth:truth:1.1.5",
"com.google.truth.extensions:truth-java8-extension:1.1.5",
"com.squareup.okhttp:okhttp:2.7.5",
"com.squareup.okio:okio:2.10.0",
"io.netty:netty-buffer:4.1.97.Final",
"io.netty:netty-codec-http2:4.1.97.Final",
"io.netty:netty-codec-http:4.1.97.Final",
"io.netty:netty-codec-socks:4.1.97.Final",
"io.netty:netty-codec:4.1.97.Final",
"io.netty:netty-common:4.1.97.Final",
"io.netty:netty-handler-proxy:4.1.97.Final",
"io.netty:netty-handler:4.1.97.Final",
"io.netty:netty-resolver:4.1.97.Final",
"io.netty:netty-tcnative-boringssl-static:2.0.61.Final",
"io.netty:netty-tcnative-classes:2.0.61.Final",
"io.netty:netty-transport-classes-epoll:4.1.97.Final",
"io.netty:netty-transport-native-epoll:4.1.97.Final",
"io.netty:netty-transport-native-unix-common:4.1.97.Final",
Copy link
Collaborator

@tpasternak tpasternak Dec 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if this makes any difference, but previously it was x86_64 version (just a side note, don't care

"io.netty:netty-transport-classes-kqueue:4.1.97.Final",
"io.netty:netty-transport:4.1.97.Final",
agluszak marked this conversation as resolved.
Show resolved Hide resolved
"io.opencensus:opencensus-api:0.31.0",
"io.opencensus:opencensus-contrib-grpc-metrics:0.31.0",
"io.perfmark:perfmark-api:0.26.0",
"org.apache.tomcat:annotations-api:6.0.53",
"org.codehaus.mojo:animal-sniffer-annotations:1.23",
],
fail_if_repin_required = True,
generate_compat_repositories = True,
lock_file = "//:maven_install.json",
repositories = [
"https://maven.google.com",
"https://repo.maven.apache.org/maven2",
"https://repository.mulesoft.org/nexus/content/repositories/public",
],
)

use_repo(
maven,
"maven",
"unpinned_maven",
"com_google_android_annotations",
"com_google_api_grpc_proto_google_common_protos",
"com_google_auth_google_auth_library_credentials",
"com_google_auth_google_auth_library_oauth2_http",
"com_google_auto_value_auto_value_annotations",
"com_google_auto_value_auto_value",
"com_google_code_findbugs_jsr305",
"com_google_code_gson_gson",
"com_google_errorprone_error_prone_annotations",
"com_google_flogger_flogger",
"com_google_flogger_flogger_system_backend",
"com_google_guava_guava",
"com_google_guava_failureaccess",
"com_google_j2objc_j2objc_annotations",
"com_google_re2j_re2j",
"com_google_truth_truth",
"com_google_truth_extensions_truth_java8_extension",
"com_googlecode_java_diff_utils_diffutils",
"com_squareup_okhttp_okhttp",
"com_squareup_okio_okio",
"io_netty_netty_buffer",
"io_netty_netty_codec_http2",
"io_netty_netty_codec_http",
"io_netty_netty_codec_socks",
"io_netty_netty_codec",
"io_netty_netty_common",
"io_netty_netty_handler_proxy",
"io_netty_netty_handler",
"io_netty_netty_resolver",
"io_netty_netty_tcnative_boringssl_static",
"io_netty_netty_tcnative_classes",
"io_netty_netty_transport_classes_epoll",
"io_netty_netty_transport_native_epoll",
"io_netty_netty_transport_native_unix_common",
"io_netty_netty_transport",
"io_opencensus_opencensus_api",
"io_opencensus_opencensus_contrib_grpc_metrics",
"io_perfmark_perfmark_api",
"net_java_dev_jna_jna",
"net_bytebuddy_byte_buddy",
"net_bytebuddy_byte_buddy_agent",
"org_mockito_mockito_core",
"org_objenesis_objenesis",
"junit_junit",
"org_apache_tomcat_annotations_api",
"org_codehaus_mojo_animal_sniffer_annotations",
)
Loading
Loading