From f319df71dd53e14f8bd077fac37b6f0e2523105c Mon Sep 17 00:00:00 2001 From: "publish-to-bcr-bot[bot]" <112732530+publish-to-bcr-bot[bot]@users.noreply.github.com> Date: Fri, 20 Oct 2023 20:18:25 +0000 Subject: [PATCH] Publish bazelbuild/rules_kotlin@v1.9.0 (#1041) Co-authored-by: Ben Lee --- modules/rules_kotlin/1.9.0/MODULE.bazel | 71 +++++++++++++++++++ .../patches/module_dot_bazel_version.patch | 12 ++++ modules/rules_kotlin/1.9.0/presubmit.yml | 12 ++++ modules/rules_kotlin/1.9.0/source.json | 8 +++ modules/rules_kotlin/metadata.json | 27 +++++++ 5 files changed, 130 insertions(+) create mode 100644 modules/rules_kotlin/1.9.0/MODULE.bazel create mode 100644 modules/rules_kotlin/1.9.0/patches/module_dot_bazel_version.patch create mode 100644 modules/rules_kotlin/1.9.0/presubmit.yml create mode 100644 modules/rules_kotlin/1.9.0/source.json create mode 100644 modules/rules_kotlin/metadata.json diff --git a/modules/rules_kotlin/1.9.0/MODULE.bazel b/modules/rules_kotlin/1.9.0/MODULE.bazel new file mode 100644 index 00000000000..59d0cca1107 --- /dev/null +++ b/modules/rules_kotlin/1.9.0/MODULE.bazel @@ -0,0 +1,71 @@ +module( + name = "rules_kotlin", + version = "1.9.0", + compatibility_level = 1, + repo_name = "rules_kotlin", +) + +bazel_dep(name = "platforms", version = "0.0.6") +bazel_dep(name = "bazel_skylib", version = "1.4.2") +bazel_dep(name = "rules_java", version = "6.4.0") +bazel_dep(name = "rules_python", version = "0.23.1") +bazel_dep(name = "rules_cc", version = "0.0.8") + +rules_kotlin_extensions = use_extension("//src/main/starlark/core/repositories:bzlmod_setup.bzl", "rules_kotlin_extensions") +use_repo( + rules_kotlin_extensions, + "buildkite_config", + "com_github_google_ksp", + "com_github_jetbrains_kotlin", + "com_github_pinterest_ktlint", + "kt_java_stub_template", + "rules_android", +) + +register_toolchains("//kotlin/internal:default_toolchain") + +# TODO(bencodes) We should be able to remove this once rules_android has rolled out official Bzlmod support +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") + +# Development dependencies +# TODO(bencodes) A bunch of these dependencies need to be marked as dev_dependencies but before we can do that +# we need to sort out a few cases around how these rules are consumed in various ways. + +bazel_dep(name = "rules_jvm_external", version = "5.3") + +maven = use_extension("@rules_jvm_external//:extensions.bzl", "maven") +maven.install( + name = "kotlin_rules_maven", + artifacts = [ + "com.google.code.findbugs:jsr305:3.0.2", + "junit:junit:4.13-beta-3", + "com.google.protobuf:protobuf-java:3.6.0", + "com.google.protobuf:protobuf-java-util:3.6.0", + "com.google.guava:guava:27.1-jre", + "com.google.truth:truth:0.45", + "com.google.auto.service:auto-service:1.0.1", + "com.google.auto.service:auto-service-annotations:1.0.1", + "com.google.auto.value:auto-value:1.10.1", + "com.google.auto.value:auto-value-annotations:1.10.1", + "com.google.dagger:dagger:2.43.2", + "com.google.dagger:dagger-compiler:2.43.2", + "com.google.dagger:dagger-producers:2.43.2", + "javax.annotation:javax.annotation-api:1.3.2", + "javax.inject:javax.inject:1", + "org.pantsbuild:jarjar:1.7.2", + "org.jetbrains.kotlinx:atomicfu-js:0.15.2", + "org.jetbrains.kotlinx:kotlinx-serialization-runtime:1.0-M1-1.4.0-rc", + ], + fetch_sources = True, + repositories = [ + "https://maven-central.storage.googleapis.com/repos/central/data/", + "https://maven.google.com", + "https://repo1.maven.org/maven2", + ], +) +use_repo(maven, "kotlin_rules_maven") + +bazel_dep(name = "rules_pkg", version = "0.7.0") +bazel_dep(name = "stardoc", version = "0.5.6", repo_name = "io_bazel_stardoc") +bazel_dep(name = "rules_proto", version = "5.3.0-21.7") diff --git a/modules/rules_kotlin/1.9.0/patches/module_dot_bazel_version.patch b/modules/rules_kotlin/1.9.0/patches/module_dot_bazel_version.patch new file mode 100644 index 00000000000..c7149a1dea9 --- /dev/null +++ b/modules/rules_kotlin/1.9.0/patches/module_dot_bazel_version.patch @@ -0,0 +1,12 @@ +=================================================================== +--- a/MODULE.bazel ++++ b/MODULE.bazel +@@ -1,7 +1,7 @@ + module( + name = "rules_kotlin", +- version = "1.8.1", ++ version = "1.9.0", + compatibility_level = 1, + repo_name = "rules_kotlin", + ) + diff --git a/modules/rules_kotlin/1.9.0/presubmit.yml b/modules/rules_kotlin/1.9.0/presubmit.yml new file mode 100644 index 00000000000..462beee113d --- /dev/null +++ b/modules/rules_kotlin/1.9.0/presubmit.yml @@ -0,0 +1,12 @@ +matrix: + platform: [ "macos", "ubuntu2004" ] + +tasks: + verify_targets: + name: "Verify build targets" + platform: ${{ platform }} + build_flags: + - "--enable_bzlmod=true" + build_targets: + - "@rules_kotlin//kotlin/..." + - "@rules_kotlin//src/..." diff --git a/modules/rules_kotlin/1.9.0/source.json b/modules/rules_kotlin/1.9.0/source.json new file mode 100644 index 00000000000..4eba9340b58 --- /dev/null +++ b/modules/rules_kotlin/1.9.0/source.json @@ -0,0 +1,8 @@ +{ + "integrity": "sha256-V2bx5Zms9VGqVvSdq5q5EIJpsDxVdJbFSsr0H5jiuNY=", + "url": "https://github.com/bazelbuild/rules_kotlin/releases/download/v1.9.0/rules_kotlin-v1.9.0.tar.gz", + "patches": { + "module_dot_bazel_version.patch": "sha256-nDFDlp2ujd74k9mEF0Bh7pZqBt+CUCF2bZHIaFgM25g=" + }, + "patch_strip": 1 +} diff --git a/modules/rules_kotlin/metadata.json b/modules/rules_kotlin/metadata.json new file mode 100644 index 00000000000..be0d97b06c9 --- /dev/null +++ b/modules/rules_kotlin/metadata.json @@ -0,0 +1,27 @@ +{ + "homepage": "https://github.com/bazelbuild/rules_kotlin", + "maintainers": [ + { + "email": "ben@ben.cm", + "github": "Bencodes", + "name": "Ben Lee" + }, + { + "email": "corbin@mcneely-smith.com", + "github": "restingbull", + "name": "Corbin McNeely-Smith" + }, + { + "email": "nk@snap.com", + "github": "nkoroste", + "name": "Nick Korostelev" + } + ], + "repository": [ + "github:bazelbuild/rules_kotlin" + ], + "versions": [ + "1.9.0" + ], + "yanked_versions": {} +}