From 0a85ed0f79f34208a5d2d3e2ab37560502e1e425 Mon Sep 17 00:00:00 2001 From: Vladimir Krivosheev Date: Mon, 10 Feb 2025 06:45:24 +0100 Subject: [PATCH] update bazel files GitOrigin-RevId: 016bbb6e9ce5f083f2bf68eac1f12baff9dff55e --- lib/BUILD.bazel | 7 +++ lib/MODULE.bazel | 14 +++++ .../intellij.kotlin.devkit/k1/BUILD.bazel | 62 +++++++++++++++++++ .../intellij.kotlin.devkit/k2/BUILD.bazel | 40 ++++++++++++ python/BUILD.bazel | 1 + 5 files changed, 124 insertions(+) create mode 100644 plugins/devkit/intellij.kotlin.devkit/k1/BUILD.bazel create mode 100644 plugins/devkit/intellij.kotlin.devkit/k2/BUILD.bazel diff --git a/lib/BUILD.bazel b/lib/BUILD.bazel index d147d2f9b17f..10e561bedf6e 100644 --- a/lib/BUILD.bazel +++ b/lib/BUILD.bazel @@ -2023,6 +2023,13 @@ java_import( visibility = ["//visibility:public"] ) +kt_jvm_import( + name = "io-github-z4kn4fein-semver-jvm", + jar = "@semver-jvm-2_0_0_http//file", + srcjar = "@semver-jvm-2_0_0-sources_http//file", + visibility = ["//visibility:public"] +) + java_library( name = "io-mockk", exports = [ diff --git a/lib/MODULE.bazel b/lib/MODULE.bazel index 9e21f2626754..a3ab84c2701c 100644 --- a/lib/MODULE.bazel +++ b/lib/MODULE.bazel @@ -2666,6 +2666,20 @@ http_file( downloaded_file_path = "intellij-test-discovery-agent-1.0.763-sources.jar" ) +http_file( + name = "semver-jvm-2_0_0_http", + url = "https://cache-redirector.jetbrains.com/repo1.maven.org/maven2/io/github/z4kn4fein/semver-jvm/2.0.0/semver-jvm-2.0.0.jar", + sha256 = "fbbf174a4e78aa5be1f1b7db73edc5c0a6a2e59e1562263e2c3a2e510fa1ba45", + downloaded_file_path = "semver-jvm-2.0.0.jar" +) + +http_file( + name = "semver-jvm-2_0_0-sources_http", + url = "https://cache-redirector.jetbrains.com/repo1.maven.org/maven2/io/github/z4kn4fein/semver-jvm/2.0.0/semver-jvm-2.0.0-sources.jar", + sha256 = "db8d695e786aeb04af526a37187f6d9d1b5d27d2d936d7fa41b50e211985a548", + downloaded_file_path = "semver-jvm-2.0.0-sources.jar" +) + http_file( name = "mockk-1_13_12_http", url = "https://cache-redirector.jetbrains.com/repo1.maven.org/maven2/io/mockk/mockk/1.13.12/mockk-1.13.12.jar", diff --git a/plugins/devkit/intellij.kotlin.devkit/k1/BUILD.bazel b/plugins/devkit/intellij.kotlin.devkit/k1/BUILD.bazel new file mode 100644 index 000000000000..fe0776c0e179 --- /dev/null +++ b/plugins/devkit/intellij.kotlin.devkit/k1/BUILD.bazel @@ -0,0 +1,62 @@ +### auto-generated section `build intellij.kotlin.devkit.k1` start +load("@rules_jvm//:jvm.bzl", "jvm_library", "jvm_resources", "jvm_test") + +jvm_resources( + name = "kotlin-devkit-k1_resources", + files = glob(["resources/**/*"]), + strip_prefix = "resources" +) + +jvm_library( + name = "kotlin-devkit-k1", + module_name = "intellij.kotlin.devkit.k1", + visibility = ["//visibility:public"], + srcs = glob(["src/**/*.kt", "src/**/*.java"], allow_empty = True), + deps = [ + "@lib//:kotlin-stdlib", + "@lib//:kotlinc-kotlin-compiler-common-provided", + "@lib//:kotlinc-kotlin-compiler-fe10-provided", + "//platform/refactoring", + "//platform/lang-impl", + "//plugins/devkit/intellij.kotlin.devkit:kotlin-devkit", + "//plugins/kotlin/idea", + "//plugins/kotlin/base/code-insight:kotlin-base-code-insight", + "//plugins/kotlin/base/fe10/analysis:kotlin-base-fe10-analysis", + ], + runtime_deps = [":kotlin-devkit-k1_resources"] +) + +jvm_library( + name = "kotlin-devkit-k1_test_lib", + visibility = ["//visibility:public"], + srcs = glob(["test/**/*.kt", "test/**/*.java"], allow_empty = True), + associates = [":kotlin-devkit-k1"], + deps = [ + "@lib//:kotlin-stdlib", + "@lib//:kotlinc-kotlin-compiler-common-provided", + "@lib//:kotlinc-kotlin-compiler-fe10-provided", + "//platform/refactoring", + "//platform/lang-impl", + "//plugins/devkit/intellij.kotlin.devkit:kotlin-devkit", + "//plugins/kotlin/idea", + "//plugins/kotlin/base/code-insight:kotlin-base-code-insight", + "//plugins/kotlin/base/code-insight:kotlin-base-code-insight_test_lib", + "//plugins/kotlin/base/fe10/analysis:kotlin-base-fe10-analysis", + "//plugins/devkit/devkit-kotlin-tests:kotlin-tests_test_lib", + "//plugins/devkit/devkit-tests:testFramework_test_lib", + "//plugins/kotlin/base/plugin:kotlin-base-plugin", + "//plugins/kotlin/base/plugin:kotlin-base-plugin_test_lib", + "//plugins/kotlin/test-framework:test-framework_test_lib", + "//plugins/kotlin/plugin/k1:kotlin-plugin-k1", + "//platform/testFramework", + "//platform/testFramework:testFramework_test_lib", + "//plugins/kotlin/base/test:kotlin-base-test_test_lib", + ], + runtime_deps = [":kotlin-devkit-k1_resources"] +) + +jvm_test( + name = "kotlin-devkit-k1_test", + runtime_deps = [":kotlin-devkit-k1_test_lib"] +) +### auto-generated section `build intellij.kotlin.devkit.k1` end \ No newline at end of file diff --git a/plugins/devkit/intellij.kotlin.devkit/k2/BUILD.bazel b/plugins/devkit/intellij.kotlin.devkit/k2/BUILD.bazel new file mode 100644 index 000000000000..983b0792a75d --- /dev/null +++ b/plugins/devkit/intellij.kotlin.devkit/k2/BUILD.bazel @@ -0,0 +1,40 @@ +### auto-generated section `build intellij.kotlin.devkit.k2` start +load("//build:compiler-options.bzl", "create_kotlinc_options") +load("@rules_jvm//:jvm.bzl", "jvm_library", "jvm_resources") + +create_kotlinc_options( + name = "custom", + jvm_target = 17, + 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 = "kotlin-devkit-k2_resources", + files = glob(["resources/**/*"]), + strip_prefix = "resources" +) + +jvm_library( + name = "kotlin-devkit-k2", + module_name = "intellij.kotlin.devkit.k2", + visibility = ["//visibility:public"], + srcs = glob(["src/**/*.kt", "src/**/*.java"], allow_empty = True), + kotlinc_opts = ":custom", + deps = [ + "@lib//:kotlin-stdlib", + "@lib//:kotlinc-kotlin-compiler-common-provided", + "@lib//:kotlinc-analysis-api-provided", + "//platform/refactoring", + "//platform/lang-impl", + "//plugins/devkit/intellij.kotlin.devkit:kotlin-devkit", + "//plugins/kotlin/refactorings/kotlin.refactorings.common:kotlin-refactorings-common", + "//plugins/kotlin/refactorings/kotlin.refactorings.move.k2:kotlin-refactorings-move-k2", + ], + runtime_deps = [":kotlin-devkit-k2_resources"] +) +### auto-generated section `build intellij.kotlin.devkit.k2` end \ No newline at end of file diff --git a/python/BUILD.bazel b/python/BUILD.bazel index 68c0e098ca7d..a542b9f2cd83 100644 --- a/python/BUILD.bazel +++ b/python/BUILD.bazel @@ -254,6 +254,7 @@ jvm_library( "//python/python-exec-service:community-execService", "//python/services/system-python:python-community-services-systemPython", "//python/services/internal-impl:python-community-services-internal-impl", + "@lib//:io-github-z4kn4fein-semver-jvm", ], exports = [ "//python/openapi:community",