• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2022 Google LLC. All rights reserved.
2#
3# Licensed under the Apache License, Version 2.0 (the License);
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7#     http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15workspace(name = "rules_kotlin")
16
17load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
18
19http_archive(
20    name = "rules_jvm_external",
21    strip_prefix = "rules_jvm_external-4.2",
22    sha256 = "cd1a77b7b02e8e008439ca76fd34f5b07aecb8c752961f9640dea15e9e5ba1ca",
23    url = "https://github.com/bazelbuild/rules_jvm_external/archive/4.2.zip",
24)
25load("@rules_jvm_external//:repositories.bzl", "rules_jvm_external_deps")
26rules_jvm_external_deps()
27load("@rules_jvm_external//:setup.bzl", "rules_jvm_external_setup")
28rules_jvm_external_setup()
29load("@rules_jvm_external//:defs.bzl", "maven_install")
30
31http_archive(
32    name = "bazel_skylib",
33    sha256 = "f7be3474d42aae265405a592bb7da8e171919d74c16f082a5457840f06054728",
34    urls = [
35        "https://github.com/bazelbuild/bazel-skylib/releases/download/1.2.1/bazel-skylib-1.2.1.tar.gz",
36    ],
37)
38load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace")
39bazel_skylib_workspace()
40
41http_archive(
42    name = "bazel_platforms",
43    sha256 = "379113459b0feaf6bfbb584a91874c065078aa673222846ac765f86661c27407",
44    urls = [
45        "https://github.com/bazelbuild/platforms/releases/download/0.0.5/platforms-0.0.5.tar.gz",
46    ],
47)
48
49http_archive(
50    name = "rules_java",
51    urls = [
52      "https://mirror.bazel.build/github.com/bazelbuild/rules_java/releases/download/5.0.0/rules_java-5.0.0.tar.gz",
53      "https://github.com/bazelbuild/rules_java/releases/download/5.0.0/rules_java-5.0.0.tar.gz",
54    ],
55    sha256 = "8c376f1e4ab7d7d8b1880e4ef8fc170862be91b7c683af97ca2768df546bb073",
56)
57load("@rules_java//java:repositories.bzl", "java_tools_repos")
58java_tools_repos()
59
60http_archive(
61    name = "dagger",
62    strip_prefix = "dagger-dagger-2.44.2",
63    build_file = "@//bazel:dagger.BUILD",
64    sha256 = "cbff42063bfce78a08871d5a329476eb38c96af9cf20d21f8b412fee76296181",
65    urls = ["https://github.com/google/dagger/archive/dagger-2.44.2.zip"],
66)
67load("@dagger//:workspace_defs.bzl", "DAGGER_ARTIFACTS", "DAGGER_REPOSITORIES")
68
69load("@//toolchains/kotlin_jvm:kt_jvm_toolchains.bzl", "KT_VERSION")
70http_archive(
71    name = "kotlinc",
72    build_file = "@//bazel:kotlinc.BUILD",
73    sha256 = "4c3fa7bc1bb9ef3058a2319d8bcc3b7196079f88e92fdcd8d304a46f4b6b5787",
74    strip_prefix = "kotlinc",
75    urls = [
76        "https://github.com/JetBrains/kotlin/releases/download/v{0}/kotlin-compiler-{0}.zip".format(KT_VERSION[1:].replace("_", ".")),
77    ],
78)
79
80register_toolchains("@//toolchains/kotlin_jvm:all")
81
82maven_install(
83    artifacts = DAGGER_ARTIFACTS + [
84        "com.google.auto.service:auto-service-annotations:1.0.1",
85        "com.google.auto.service:auto-service:1.0.1",
86        "com.google.auto.value:auto-value:1.9",
87        "com.google.testing.compile:compile-testing:0.19",
88        "com.google.truth:truth:1.1.3",
89        "info.picocli:picocli:4.6.3",
90        "javax.inject:jsr330-api:0.9",
91        "junit:junit:4.13.2",
92        "org.jacoco:org.jacoco.agent:0.8.8",
93        "org.jacoco:org.jacoco.cli:0.8.8",
94        "org.jetbrains.kotlinx:kotlinx-metadata-jvm:0.4.2",
95        "org.mockito:mockito-core:4.5.1",
96    ],
97    repositories = DAGGER_REPOSITORIES + [
98        "https://repository.mulesoft.org/nexus/content/repositories/public",
99    ],
100    override_targets = {
101        "org.jetbrains.kotlin:annotations": "@kotlinc//:annotations",
102        "org.jetbrains.kotlin:kotlin-reflect": "@kotlinc//:kotlin_reflect",
103        "org.jetbrains.kotlin:kotlin-stdlib": "@kotlinc//:kotlin_stdlib",
104        "org.jetbrains.kotlin:kotlin-stdlib-jdk7": "@kotlinc//:kotlin_stdlib_jdk7",
105        "org.jetbrains.kotlin:kotlin-stdlib-jdk8": "@kotlinc//:kotlin_stdlib_jdk8",
106        "org.jetbrains.kotlin:kotlin-test": "@kotlinc//:kotlin_test",
107    },
108)
109
110