aboutsummaryrefslogtreecommitdiff
path: root/WORKSPACE
blob: e7a7d09930b362c4bd29e346928e1c30e6aa3fd3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
# Copyright 2022 Google LLC. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the License);
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

workspace(name = "rules_kotlin")

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")

http_archive(
    name = "rules_jvm_external",
    strip_prefix = "rules_jvm_external-5.2",
    sha256 = "3824ac95d9edf8465c7a42b7fcb88a5c6b85d2bac0e98b941ba13f235216f313",
    url = "https://github.com/bazelbuild/rules_jvm_external/archive/5.2.zip",
)
load("@rules_jvm_external//:repositories.bzl", "rules_jvm_external_deps")
rules_jvm_external_deps()
load("@rules_jvm_external//:setup.bzl", "rules_jvm_external_setup")
rules_jvm_external_setup()
load("@rules_jvm_external//:defs.bzl", "maven_install")

http_archive(
    name = "bazel_skylib",
    sha256 = "f7be3474d42aae265405a592bb7da8e171919d74c16f082a5457840f06054728",
    urls = [
        "https://github.com/bazelbuild/bazel-skylib/releases/download/1.2.1/bazel-skylib-1.2.1.tar.gz",
    ],
)
load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace")
bazel_skylib_workspace()

http_archive(
    name = "bazel_platforms",
    sha256 = "379113459b0feaf6bfbb584a91874c065078aa673222846ac765f86661c27407",
    urls = [
        "https://github.com/bazelbuild/platforms/releases/download/0.0.5/platforms-0.0.5.tar.gz",
    ],
)

http_archive(
    name = "rules_java",
    urls = [
      "https://mirror.bazel.build/github.com/bazelbuild/rules_java/releases/download/5.5.0/rules_java-5.5.0.tar.gz",
      "https://github.com/bazelbuild/rules_java/releases/download/5.5.0/rules_java-5.5.0.tar.gz",
    ],
    sha256 = "bcfabfb407cb0c8820141310faa102f7fb92cc806b0f0e26a625196101b0b57e",
)
load("@rules_java//java:repositories.bzl", "java_tools_repos")
java_tools_repos()

http_archive(
    name = "dagger",
    strip_prefix = "dagger-dagger-2.44.2",
    build_file = "@//bazel:dagger.BUILD",
    sha256 = "cbff42063bfce78a08871d5a329476eb38c96af9cf20d21f8b412fee76296181",
    urls = ["https://github.com/google/dagger/archive/dagger-2.44.2.zip"],
)
load("@dagger//:workspace_defs.bzl", "DAGGER_ARTIFACTS", "DAGGER_REPOSITORIES")

load("@//toolchains/kotlin_jvm:kt_jvm_toolchains.bzl", "KT_VERSION")
http_archive(
    name = "kotlinc",
    build_file = "@//bazel:kotlinc.BUILD",
    sha256 = "7d74863deecf8e0f28ea54c3735feab003d0eac67e8d3a791254b16889c20342",
    strip_prefix = "kotlinc",
    urls = [
        "https://github.com/JetBrains/kotlin/releases/download/v{0}/kotlin-compiler-{0}.zip".format(KT_VERSION[1:].replace("_", ".")),
    ],
)

register_toolchains("@//toolchains/kotlin_jvm:all")

maven_install(
    artifacts = DAGGER_ARTIFACTS + [
        "com.google.auto.service:auto-service-annotations:1.0.1",
        "com.google.auto.service:auto-service:1.0.1",
        "com.google.auto.value:auto-value:1.9",
        "com.google.testing.compile:compile-testing:0.19",
        "com.google.truth:truth:1.1.3",
        "info.picocli:picocli:4.6.3",
        "javax.inject:jsr330-api:0.9",
        "junit:junit:4.13.2",
        "org.jacoco:org.jacoco.agent:0.8.8",
        "org.jacoco:org.jacoco.cli:0.8.8",
        "org.jetbrains.kotlinx:kotlinx-metadata-jvm:0.4.2",
        "org.mockito:mockito-core:4.5.1",
    ],
    repositories = DAGGER_REPOSITORIES + [
        "https://repository.mulesoft.org/nexus/content/repositories/public",
    ],
    override_targets = {
        "org.jetbrains.kotlin:annotations": "@kotlinc//:annotations",
        "org.jetbrains.kotlin:kotlin-reflect": "@kotlinc//:kotlin_reflect",
        "org.jetbrains.kotlin:kotlin-stdlib": "@kotlinc//:kotlin_stdlib",
        "org.jetbrains.kotlin:kotlin-stdlib-jdk7": "@kotlinc//:kotlin_stdlib_jdk7",
        "org.jetbrains.kotlin:kotlin-stdlib-jdk8": "@kotlinc//:kotlin_stdlib_jdk8",
        "org.jetbrains.kotlin:kotlin-test": "@kotlinc//:kotlin_test",
    },
)