Skip to content

Commit 40dd7da

Browse files
committed
Include mutator annotations in jazzer-api
Also uses `exports` rather than `runtime_deps` to mark those dependencies that users of the Maven artifact should be allowed to compile against (rather than just being available on the runtime classpath). This is necessary after bazel-contrib/rules_jvm_external@7b0abdc.
1 parent a5b7a45 commit 40dd7da

File tree

2 files changed

+15
-5
lines changed

2 files changed

+15
-5
lines changed

deploy/BUILD.bazel

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,11 @@ java_export(
4040
pom_template = "//deploy:jazzer-api.pom",
4141
toolchains = [":jazzer_version"],
4242
visibility = ["//visibility:public"],
43-
runtime_deps = ["//src/main/java/com/code_intelligence/jazzer/api"],
43+
exports = [
44+
"//src/main/java/com/code_intelligence/jazzer/api",
45+
"//src/main/java/com/code_intelligence/jazzer/mutation/annotation",
46+
"//src/main/java/com/code_intelligence/jazzer/mutation/annotation/proto",
47+
],
4448
)
4549

4650
java_export(
@@ -95,13 +99,16 @@ java_export(
9599
pom_template = "jazzer-junit.pom",
96100
toolchains = [":jazzer_version"],
97101
visibility = ["//visibility:public"],
98-
runtime_deps = [
99-
# These deps' only effect is to include a dependency on the 'jazzer' and 'jazzer-api' Maven artifacts in the
100-
# POM.
101-
"//deploy:jazzer",
102+
exports = [
103+
# Maven users should not need to depend on jazzer-api directly if they already directly depend on jazzer-junit,
104+
# both for convenience and backwards compatibility.
102105
"//deploy:jazzer-api",
103106
"//src/main/java/com/code_intelligence/jazzer/junit",
104107
],
108+
runtime_deps = [
109+
# This dep's only effect is to include a dependency on the 'jazzer' Maven artifacts in the POM.
110+
"//deploy:jazzer",
111+
],
105112
)
106113

107114
sh_test(

deploy/jazzer-api_artifact_test.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ JAR="$2/bin/jar"
2727
-e '^com/code_intelligence/$' \
2828
-e '^com/code_intelligence/jazzer/$' \
2929
-e '^com/code_intelligence/jazzer/api/' \
30+
-e '^com/code_intelligence/jazzer/mutation/$' \
31+
-e '^com/code_intelligence/jazzer/mutation/annotation/' \
32+
-e '^com/code_intelligence/jazzer/mutation/utils/' \
3033
-e '^jaz/' \
3134
-e '^META-INF/$' \
3235
-e '^META-INF/MANIFEST.MF$'

0 commit comments

Comments
 (0)