From 39912dfa6b92957cf00d82f31a5cd442d161e99f Mon Sep 17 00:00:00 2001 From: Vladimir Krivosheev Date: Tue, 18 Feb 2025 09:23:53 +0100 Subject: [PATCH] update bazel files GitOrigin-RevId: f8f235d7d279c37703a45639a6c59b3dca9c7ea8 --- lib/BUILD.bazel | 22 ++++++ lib/MODULE.bazel | 28 +++++++ plugins/ant/BUILD.bazel | 1 + .../BUILD.bazel | 20 ++--- .../k1/BUILD.bazel | 64 ++++++++++++++++ .../k2/BUILD.bazel | 75 +++++++++++++++++++ .../tests/BUILD.bazel | 23 ++++-- plugins/github/github-core/BUILD.bazel | 4 + plugins/kotlin/fir/tests/BUILD.bazel | 1 + .../jvm-debugger/coroutines/BUILD.bazel | 3 + plugins/markdown/test/BUILD.bazel | 1 + xml/testFramework/BUILD.bazel | 18 +++++ xml/tests/BUILD.bazel | 1 + 13 files changed, 246 insertions(+), 15 deletions(-) create mode 100644 plugins/devkit/intellij.devkit.workspaceModel/k1/BUILD.bazel create mode 100644 plugins/devkit/intellij.devkit.workspaceModel/k2/BUILD.bazel create mode 100644 xml/testFramework/BUILD.bazel diff --git a/lib/BUILD.bazel b/lib/BUILD.bazel index b84c9377125a..6f855a42635c 100644 --- a/lib/BUILD.bazel +++ b/lib/BUILD.bazel @@ -10092,6 +10092,28 @@ java_import( visibility = ["//visibility:public"] ) +java_library( + name = "vcs-github-apollographql-apollo-ast-jvm", + exports = [ + ":apollo-ast-jvm-4_0_0_http_import", + ":okio-jvm-3_9_0_http_import", + ":apollo-annotations-jvm-4_0_0_http_import", + ], + visibility = ["//visibility:public"] +) + +kt_jvm_import( + name = "apollo-ast-jvm-4_0_0_http_import", + jar = "@apollo-ast-jvm-4_0_0_http//file", + srcjar = "@apollo-ast-jvm-4_0_0-sources_http//file" +) + +kt_jvm_import( + name = "apollo-annotations-jvm-4_0_0_http_import", + jar = "@apollo-annotations-jvm-4_0_0_http//file", + srcjar = "@apollo-annotations-jvm-4_0_0-sources_http//file" +) + java_import( name = "velocity", jars = ["@velocity-engine-core-2_3_http//file"], diff --git a/lib/MODULE.bazel b/lib/MODULE.bazel index 73d52e999d5a..965a2ae35fcc 100644 --- a/lib/MODULE.bazel +++ b/lib/MODULE.bazel @@ -12851,6 +12851,34 @@ http_file( downloaded_file_path = "randomForestRegressor-0.0.11-sources.jar" ) +http_file( + name = "apollo-ast-jvm-4_0_0_http", + url = "https://cache-redirector.jetbrains.com/repo1.maven.org/maven2/com/apollographql/apollo/apollo-ast-jvm/4.0.0/apollo-ast-jvm-4.0.0.jar", + sha256 = "1e83e448c104d946a6146c32409275a6ed4259999d469514be4f878a420f0b4f", + downloaded_file_path = "apollo-ast-jvm-4.0.0.jar" +) + +http_file( + name = "apollo-annotations-jvm-4_0_0_http", + url = "https://cache-redirector.jetbrains.com/repo1.maven.org/maven2/com/apollographql/apollo/apollo-annotations-jvm/4.0.0/apollo-annotations-jvm-4.0.0.jar", + sha256 = "ade351bed9f7b5c0c321429187229be7814ade496004dab10c389c4cd1930db9", + downloaded_file_path = "apollo-annotations-jvm-4.0.0.jar" +) + +http_file( + name = "apollo-ast-jvm-4_0_0-sources_http", + url = "https://cache-redirector.jetbrains.com/repo1.maven.org/maven2/com/apollographql/apollo/apollo-ast-jvm/4.0.0/apollo-ast-jvm-4.0.0-sources.jar", + sha256 = "8f997cfcdf930aa6e9a0a39790e65e40be989a1c7f2e21797c1298bd026ab3ac", + downloaded_file_path = "apollo-ast-jvm-4.0.0-sources.jar" +) + +http_file( + name = "apollo-annotations-jvm-4_0_0-sources_http", + url = "https://cache-redirector.jetbrains.com/repo1.maven.org/maven2/com/apollographql/apollo/apollo-annotations-jvm/4.0.0/apollo-annotations-jvm-4.0.0-sources.jar", + sha256 = "64a77ba17a56d06dd0b1247960e40841a972a31ecb9707fbf5d602ee71f8c549", + downloaded_file_path = "apollo-annotations-jvm-4.0.0-sources.jar" +) + http_file( name = "velocity-engine-core-2_3_http", url = "https://cache-redirector.jetbrains.com/repo1.maven.org/maven2/org/apache/velocity/velocity-engine-core/2.3/velocity-engine-core-2.3.jar", diff --git a/plugins/ant/BUILD.bazel b/plugins/ant/BUILD.bazel index bb1044ade42c..18dbc3f25d19 100644 --- a/plugins/ant/BUILD.bazel +++ b/plugins/ant/BUILD.bazel @@ -91,6 +91,7 @@ jvm_library( "//platform/util/jdom", "//tools/intellij.tools.ide.metrics.benchmark:ide-metrics-benchmark", "//tools/intellij.tools.ide.metrics.benchmark:ide-metrics-benchmark_test_lib", + "//xml/testFramework", ], runtime_deps = [":ant_resources"] ) diff --git a/plugins/devkit/intellij.devkit.workspaceModel/BUILD.bazel b/plugins/devkit/intellij.devkit.workspaceModel/BUILD.bazel index f905b8e261c6..b3f9e03bdd46 100644 --- a/plugins/devkit/intellij.devkit.workspaceModel/BUILD.bazel +++ b/plugins/devkit/intellij.devkit.workspaceModel/BUILD.bazel @@ -8,7 +8,7 @@ create_kotlinc_options( "org.jetbrains.kotlin.utils.addToStdlib.UnsafeCastFunction", "org.jetbrains.kotlin.analysis.api.KaIdeApi", "org.jetbrains.kotlin.analysis.api.KaNonPublicApi", - "org.jetbrains.kotlin.idea.base.util.K1ModeProjectStructureApi", + "org.jetbrains.kotlin.analysis.api.permissions.KaAllowProhibitedAnalyzeFromWriteAction", ] ) @@ -25,39 +25,39 @@ jvm_library( srcs = glob(["src/**/*.kt", "src/**/*.java"], allow_empty = True), kotlinc_opts = ":custom", deps = [ + "@lib//:kotlin-stdlib", + "@lib//:kotlinc-kotlin-compiler-common-provided", + "@lib//:kotlinc-kotlin-jps-common-provided", + "@lib//:kotlinx-collections-immutable", + "@lib//:workspace-model-codegen", "//platform/ide-core", "//platform/editor-ui-api:editor-ui", "//platform/util", "//platform/projectModel-api:projectModel", - "@lib//:kotlin-stdlib", - "@lib//:kotlinc-kotlin-compiler-common-provided", "//platform/analysis-api:analysis", "//java/java-psi-impl:psi-impl", - "@lib//:kotlinx-collections-immutable", "//platform/platform-impl:ide-impl", "//platform/platform-api:ide", "//platform/lang-core", "//platform/indexing-api:indexing", - "//plugins/kotlin/base/indices:kotlin-base-indices", "//platform/core-ui", - "//plugins/kotlin/base/project-structure:kotlin-base-project-structure", - "//plugins/kotlin/base/fe10/analysis:kotlin-base-fe10-analysis", - "@lib//:kotlinc-kotlin-compiler-fe10-provided", "//platform/lang-impl", "//plugins/devkit/devkit-core:core", "//java/idea-ui:ui", "//aether-dependency-resolver:java-aetherDependencyResolver", "//java/openapi:java", - "@lib//:workspace-model-codegen", "//platform/util-class-loader:util-classLoader", "//plugins/kotlin/base/facet:kotlin-base-facet", - "@lib//:kotlinc-kotlin-jps-common-provided", + "//plugins/kotlin/base/indices:kotlin-base-indices", + "//plugins/kotlin/base/project-structure:kotlin-base-project-structure", "//plugins/kotlin/formatter/minimal:kotlin-formatter-minimal", + "//plugins/kotlin/base/plugin:kotlin-base-plugin", "@lib//:kotlinx-serialization-core", "@lib//:kotlinx-serialization-json", "@lib//:kotlin-reflect", "//platform/backend/workspace", "//platform/util/progress", + "//platform/core-api:core", ], runtime_deps = [":workspaceModel_resources"] ) diff --git a/plugins/devkit/intellij.devkit.workspaceModel/k1/BUILD.bazel b/plugins/devkit/intellij.devkit.workspaceModel/k1/BUILD.bazel new file mode 100644 index 000000000000..326e35ccf7b9 --- /dev/null +++ b/plugins/devkit/intellij.devkit.workspaceModel/k1/BUILD.bazel @@ -0,0 +1,64 @@ +### auto-generated section `build intellij.devkit.workspaceModel.k1` start +load("@rules_jvm//:jvm.bzl", "jvm_library", "jvm_resources", "jvm_test") + +jvm_resources( + name = "devkit-workspaceModel-k1_resources", + files = glob(["resources/**/*"]), + strip_prefix = "resources" +) + +jvm_library( + name = "devkit-workspaceModel-k1", + module_name = "intellij.devkit.workspaceModel.k1", + visibility = ["//visibility:public"], + srcs = glob(["src/**/*.kt", "src/**/*.java"], allow_empty = True), + deps = [ + "//platform/workspace/storage", + "//plugins/devkit/intellij.devkit.workspaceModel:workspaceModel", + "//java/java-psi-api:psi", + "//plugins/kotlin/base/fe10/analysis:kotlin-base-fe10-analysis", + "//java/java-indexing-api:indexing", + "//plugins/kotlin/base/project-structure:kotlin-base-project-structure", + "@lib//:kotlin-stdlib", + "@lib//:kotlinc-kotlin-compiler-common-provided", + "@lib//:kotlinc-kotlin-compiler-fe10-provided", + "@lib//:workspace-model-codegen", + "//java/java-psi-impl:psi-impl", + "//platform/util", + "//platform/core-api:core", + ], + runtime_deps = [":devkit-workspaceModel-k1_resources"] +) + +jvm_test( + name = "devkit-workspaceModel-k1_test", + srcs = glob(["test/**/*.kt", "test/**/*.java"], allow_empty = True), + associates = [":devkit-workspaceModel-k1"], + deps = [ + "//platform/workspace/storage", + "//plugins/devkit/intellij.devkit.workspaceModel:workspaceModel", + "//java/java-psi-api:psi", + "//plugins/kotlin/base/fe10/analysis:kotlin-base-fe10-analysis", + "//java/java-indexing-api:indexing", + "//plugins/kotlin/base/project-structure:kotlin-base-project-structure", + "//plugins/kotlin/base/project-structure:kotlin-base-project-structure_test_lib", + "@lib//:kotlin-stdlib", + "@lib//:kotlinc-kotlin-compiler-common-provided", + "@lib//:kotlinc-kotlin-compiler-fe10-provided", + "@lib//:workspace-model-codegen", + "//java/java-psi-impl:psi-impl", + "//platform/util", + "//platform/core-api:core", + "//plugins/kotlin/base/plugin:kotlin-base-plugin", + "//plugins/kotlin/base/plugin:kotlin-base-plugin_test_lib", + "//plugins/kotlin/plugin/k1:kotlin-plugin-k1", + "//plugins/devkit/intellij.devkit.workspaceModel/tests:devkit-workspaceModel-tests_test_lib", + "//plugins/kotlin/test-framework:test-framework_test_lib", + "//plugins/kotlin/tests-common:tests-common_test_lib", + "//platform/testFramework", + "//platform/testFramework:testFramework_test_lib", + "//plugins/kotlin/base/test:kotlin-base-test_test_lib", + ], + runtime_deps = [":devkit-workspaceModel-k1_resources"] +) +### auto-generated section `build intellij.devkit.workspaceModel.k1` end \ No newline at end of file diff --git a/plugins/devkit/intellij.devkit.workspaceModel/k2/BUILD.bazel b/plugins/devkit/intellij.devkit.workspaceModel/k2/BUILD.bazel new file mode 100644 index 000000000000..d876f0c35bd6 --- /dev/null +++ b/plugins/devkit/intellij.devkit.workspaceModel/k2/BUILD.bazel @@ -0,0 +1,75 @@ +### auto-generated section `build intellij.devkit.workspaceModel.k2` start +load("//build:compiler-options.bzl", "create_kotlinc_options") +load("@rules_jvm//:jvm.bzl", "jvm_library", "jvm_resources", "jvm_test") + +create_kotlinc_options( + name = "custom", + opt_in = [ + "org.jetbrains.kotlin.utils.addToStdlib.UnsafeCastFunction", + "org.jetbrains.kotlin.analysis.api.KaIdeApi", + "org.jetbrains.kotlin.analysis.api.KaNonPublicApi", + "org.jetbrains.kotlin.analysis.api.permissions.KaAllowProhibitedAnalyzeFromWriteAction", + ] +) + +jvm_resources( + name = "devkit-workspaceModel-k2_resources", + files = glob(["resources/**/*"]), + strip_prefix = "resources" +) + +jvm_library( + name = "devkit-workspaceModel-k2", + module_name = "intellij.devkit.workspaceModel.k2", + visibility = ["//visibility:public"], + srcs = glob(["src/**/*.kt", "src/**/*.java"], allow_empty = True), + kotlinc_opts = ":custom", + deps = [ + "//plugins/devkit/intellij.devkit.workspaceModel:workspaceModel", + "//plugins/kotlin/base/indices:kotlin-base-indices", + "//plugins/kotlin/base/project-structure:kotlin-base-project-structure", + "//java/java-indexing-api:indexing", + "//platform/workspace/storage", + "@lib//:kotlin-stdlib", + "@lib//:kotlinc-analysis-api-provided", + "@lib//:kotlinc-kotlin-compiler-common-provided", + "@lib//:workspace-model-codegen", + "//platform/core-impl", + "//java/openapi:java", + "//plugins/kotlin/base/psi:kotlin-base-psi", + ], + runtime_deps = [":devkit-workspaceModel-k2_resources"] +) + +jvm_test( + name = "devkit-workspaceModel-k2_test", + srcs = glob(["test/**/*.kt", "test/**/*.java"], allow_empty = True), + kotlinc_opts = ":custom", + associates = [":devkit-workspaceModel-k2"], + deps = [ + "//plugins/devkit/intellij.devkit.workspaceModel:workspaceModel", + "//plugins/kotlin/base/indices:kotlin-base-indices", + "//plugins/kotlin/base/project-structure:kotlin-base-project-structure", + "//plugins/kotlin/base/project-structure:kotlin-base-project-structure_test_lib", + "//java/java-indexing-api:indexing", + "//platform/workspace/storage", + "@lib//:kotlin-stdlib", + "@lib//:kotlinc-analysis-api-provided", + "@lib//:kotlinc-kotlin-compiler-common-provided", + "@lib//:workspace-model-codegen", + "//platform/core-impl", + "//java/openapi:java", + "//plugins/kotlin/base/psi:kotlin-base-psi", + "//plugins/devkit/intellij.devkit.workspaceModel/tests:devkit-workspaceModel-tests_test_lib", + "//plugins/kotlin/test-framework:test-framework_test_lib", + "//plugins/kotlin/base/plugin:kotlin-base-plugin", + "//plugins/kotlin/base/plugin:kotlin-base-plugin_test_lib", + "//plugins/kotlin/tests-common:tests-common_test_lib", + "//plugins/kotlin/plugin/k2:kotlin-plugin-k2", + "//platform/testFramework", + "//platform/testFramework:testFramework_test_lib", + "//plugins/kotlin/base/test:kotlin-base-test_test_lib", + ], + runtime_deps = [":devkit-workspaceModel-k2_resources"] +) +### auto-generated section `build intellij.devkit.workspaceModel.k2` end \ No newline at end of file diff --git a/plugins/devkit/intellij.devkit.workspaceModel/tests/BUILD.bazel b/plugins/devkit/intellij.devkit.workspaceModel/tests/BUILD.bazel index b0414e9f35ea..05d4d68f8435 100644 --- a/plugins/devkit/intellij.devkit.workspaceModel/tests/BUILD.bazel +++ b/plugins/devkit/intellij.devkit.workspaceModel/tests/BUILD.bazel @@ -1,9 +1,15 @@ ### auto-generated section `build intellij.devkit.workspaceModel.tests` start load("@rules_java//java:defs.bzl", "java_library") -load("@rules_jvm//:jvm.bzl", "jvm_test") +load("@rules_jvm//:jvm.bzl", "jvm_library", "jvm_test") -jvm_test( - name = "devkit-workspaceModel-tests_test", +java_library( + name = "devkit-workspaceModel-tests", + visibility = ["//visibility:public"] +) + +jvm_library( + name = "devkit-workspaceModel-tests_test_lib", + visibility = ["//visibility:public"], srcs = glob(["testSrc/**/*.kt", "testSrc/**/*.java"], allow_empty = True), deps = [ "@lib//:junit5", @@ -14,8 +20,8 @@ jvm_test( "//plugins/devkit/intellij.devkit.workspaceModel:workspaceModel", "//plugins/kotlin/test-framework:test-framework_test_lib", "//plugins/kotlin/formatter", - "//plugins/kotlin/tests-common:tests-common_test_lib", - "//plugins/kotlin/plugin/k1:kotlin-plugin-k1", + "//plugins/kotlin/base/plugin:kotlin-base-plugin", + "//plugins/kotlin/base/plugin:kotlin-base-plugin_test_lib", "@lib//:kotlinc-kotlin-compiler-common", "//plugins/kotlin/base/test:kotlin-base-test_test_lib", "@lib//:kotlinx-coroutines-core", @@ -30,7 +36,14 @@ jvm_test( "//platform/testFramework/junit5:junit5_test_lib", "@lib//:kotlinx-serialization-core", "@lib//:kotlinx-serialization-json", + "//plugins/kotlin/tests-common", + "//plugins/kotlin/tests-common:tests-common_test_lib", ], runtime_deps = ["//plugins/devkit/intellij.devkit:devkit"] ) + +jvm_test( + name = "devkit-workspaceModel-tests_test", + runtime_deps = [":devkit-workspaceModel-tests_test_lib"] +) ### auto-generated section `build intellij.devkit.workspaceModel.tests` end \ No newline at end of file diff --git a/plugins/github/github-core/BUILD.bazel b/plugins/github/github-core/BUILD.bazel index 6e179262a5dd..94bc574003a3 100644 --- a/plugins/github/github-core/BUILD.bazel +++ b/plugins/github/github-core/BUILD.bazel @@ -129,6 +129,10 @@ jvm_library( "@lib//:io-mockk-jvm", "//platform/platform-impl/ui:ide-ui", "@lib//:gson", + "@lib//:classgraph", + "@lib//:assert_j", + "@lib//:kotlin-reflect", + "@lib//:vcs-github-apollographql-apollo-ast-jvm", ], runtime_deps = [":vcs-github_resources"] ) diff --git a/plugins/kotlin/fir/tests/BUILD.bazel b/plugins/kotlin/fir/tests/BUILD.bazel index ce24045ce191..a411a4e9d7c3 100644 --- a/plugins/kotlin/fir/tests/BUILD.bazel +++ b/plugins/kotlin/fir/tests/BUILD.bazel @@ -72,6 +72,7 @@ jvm_library( "//plugins/kotlin/base/fir/analysis-api-platform:kotlin-base-fir-analysis-api-platform_test_lib", "//plugins/kotlin/base/analysis-api-platform:kotlin-base-analysis-api-platform", "//plugins/kotlin/refactorings/kotlin.refactorings.common:kotlin-refactorings-common", + "//plugins/kotlin/project-wizard/idea:kotlin-project-wizard-idea", ] ) diff --git a/plugins/kotlin/jvm-debugger/coroutines/BUILD.bazel b/plugins/kotlin/jvm-debugger/coroutines/BUILD.bazel index f3a4174dfad8..22b80055071f 100644 --- a/plugins/kotlin/jvm-debugger/coroutines/BUILD.bazel +++ b/plugins/kotlin/jvm-debugger/coroutines/BUILD.bazel @@ -41,6 +41,7 @@ jvm_library( "//platform/core-ui", "//platform/platform-util-io:ide-util-io", "//platform/smRunner", + "//platform/threadDumpParser", "//java/java-psi-api:psi", "//platform/platform-impl:ide-impl", "//java/execution/impl:java-execution-impl", @@ -50,6 +51,8 @@ jvm_library( "//plugins/kotlin/base/frontend-agnostic:kotlin-base-frontend-agnostic", "@lib//:kotlinx-serialization-core", "@lib//:kotlinx-serialization-json", + "//java/java-impl:impl", + "//java/debugger/shared:java-debugger-impl-shared", ], runtime_deps = [":kotlin-jvm-debugger-coroutines_resources"] ) diff --git a/plugins/markdown/test/BUILD.bazel b/plugins/markdown/test/BUILD.bazel index 151cd3bf9df4..8a855f06861a 100644 --- a/plugins/markdown/test/BUILD.bazel +++ b/plugins/markdown/test/BUILD.bazel @@ -48,6 +48,7 @@ jvm_library( "//plugins/yaml/backend:backend_test_lib", "//platform/testFramework/junit5", "//platform/testFramework/junit5:junit5_test_lib", + "//xml/testFramework", ] ) diff --git a/xml/testFramework/BUILD.bazel b/xml/testFramework/BUILD.bazel new file mode 100644 index 000000000000..808505bc7bbc --- /dev/null +++ b/xml/testFramework/BUILD.bazel @@ -0,0 +1,18 @@ +### auto-generated section `build intellij.xml.testFramework` start +load("@rules_jvm//:jvm.bzl", "jvm_library") + +jvm_library( + name = "testFramework", + module_name = "intellij.xml.testFramework", + visibility = ["//visibility:public"], + srcs = glob(["src/**/*.kt", "src/**/*.java"], allow_empty = True), + deps = [ + "//platform/testFramework", + "//xml/xml-frontback-impl:frontback-impl", + "//xml/xml-psi-impl:psi-impl", + "//xml/xml-parser:parser", + "//platform/core-impl", + "//tools/intellij.tools.ide.metrics.benchmark:ide-metrics-benchmark", + ] +) +### auto-generated section `build intellij.xml.testFramework` end \ No newline at end of file diff --git a/xml/tests/BUILD.bazel b/xml/tests/BUILD.bazel index c207670d503b..97f3a267bb0e 100644 --- a/xml/tests/BUILD.bazel +++ b/xml/tests/BUILD.bazel @@ -19,6 +19,7 @@ jvm_library( "//java/idea-ui:ui", "//java/java-impl:impl", "//platform/editor-ui-ex:editor-ex", + "//xml/testFramework", "//platform/testFramework", "//platform/testFramework:testFramework_test_lib", "//plugins/ant",