Skip to content

Commit

Permalink
Make rules_jvm_external a dev dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
fmeum committed Oct 21, 2021
1 parent fae2c95 commit c138d62
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 31 deletions.
20 changes: 13 additions & 7 deletions BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
load("@bazel_tools//tools/build_defs/pkg:pkg.bzl", "pkg_tar")
load("@io_bazel_rules_kotlin//kotlin:kotlin.bzl", "define_kt_toolchain")
load("@io_bazel_rules_kotlin//kotlin/internal:opts.bzl", "kt_javac_options", "kt_kotlinc_options")
load("@rules_jvm_external//:defs.bzl", "java_export")
load("//:maven.bzl", "JAZZER_API_COORDINATES")

exports_files(["LICENSE"])

Expand Down Expand Up @@ -57,13 +59,6 @@ exports_files([
"jazzer-api.pom",
])

# To publish a new release to Maven, run:
# bazel run --config=maven --define "maven_user=..." --define "maven_password=..." --define gpg_sign=true //:jazzer-api.publish
alias(
name = "jazzer-api.publish",
actual = "//agent/src/main/java/com/code_intelligence/jazzer/api:api_export.publish",
)

config_setting(
name = "clang",
flag_values = {"@bazel_tools//tools/cpp:compiler": "clang"},
Expand All @@ -86,3 +81,14 @@ platform(
"@bazel_tools//tools/cpp:clang-cl",
],
)

# To publish a new release of the Jazzer API to Maven, run:
# bazel run --config=maven --define "maven_user=..." --define "maven_password=..." --define gpg_sign=true //:api.publish
# Build //:api-docs.jar to generate javadocs for the API.
java_export(
name = "api",
maven_coordinates = JAZZER_API_COORDINATES,
pom_template = "//:jazzer-api.pom",
visibility = ["//visibility:public"],
runtime_deps = ["//agent/src/main/java/com/code_intelligence/jazzer/api"],
)
7 changes: 7 additions & 0 deletions WORKSPACE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,13 @@ http_archive(
url = "https://github.com/bazelbuild/rules_foreign_cc/archive/76198edc790de8e8514bddaa3895d1145fccd6aa.tar.gz",
)

http_archive(
name = "rules_jvm_external",
sha256 = "f36441aa876c4f6427bfb2d1f2d723b48e9d930b62662bf723ddfb8fc80f0140",
strip_prefix = "rules_jvm_external-4.1",
url = "https://github.com/bazelbuild/rules_jvm_external/archive/4.1.zip",
)

http_archive(
name = "libjpeg_turbo",
build_file = "//third_party:libjpeg_turbo.BUILD",
Expand Down
16 changes: 0 additions & 16 deletions agent/src/main/java/com/code_intelligence/jazzer/api/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,21 +1,5 @@
load("@rules_jvm_external//:defs.bzl", "javadoc", "java_export")
load("//:maven.bzl", "JAZZER_API_COORDINATES")

java_library(
name = "api",
srcs = glob(["*.java"]),
visibility = ["//visibility:public"],
)

javadoc(
name = "api_javadoc",
deps = [":api"],
)

java_export(
name = "api_export",
srcs = glob(["*.java"]),
maven_coordinates = JAZZER_API_COORDINATES,
pom_template = "//:jazzer-api.pom",
visibility = ["//visibility:public"],
)
8 changes: 0 additions & 8 deletions repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,6 @@ def jazzer_dependencies():
],
)

maybe(
http_archive,
name = "rules_jvm_external",
sha256 = "f36441aa876c4f6427bfb2d1f2d723b48e9d930b62662bf723ddfb8fc80f0140",
strip_prefix = "rules_jvm_external-4.1",
url = "https://github.com/bazelbuild/rules_jvm_external/archive/4.1.zip",
)

maybe(
http_archive,
name = "io_bazel_rules_kotlin",
Expand Down

0 comments on commit c138d62

Please sign in to comment.