Skip to content

Commit

Permalink
Include mutator annotations in jazzer-api
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
fmeum authored and oetr committed Jan 17, 2025
1 parent a2083fb commit 7f9015b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
17 changes: 12 additions & 5 deletions deploy/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,11 @@ java_export(
pom_template = "//deploy:jazzer-api.pom",
toolchains = [":jazzer_version"],
visibility = ["//visibility:public"],
runtime_deps = ["//src/main/java/com/code_intelligence/jazzer/api"],
exports = [
"//src/main/java/com/code_intelligence/jazzer/api",
"//src/main/java/com/code_intelligence/jazzer/mutation/annotation",
"//src/main/java/com/code_intelligence/jazzer/mutation/annotation/proto",
],
)

java_export(
Expand Down Expand Up @@ -95,13 +99,16 @@ java_export(
pom_template = "jazzer-junit.pom",
toolchains = [":jazzer_version"],
visibility = ["//visibility:public"],
runtime_deps = [
# These deps' only effect is to include a dependency on the 'jazzer' and 'jazzer-api' Maven artifacts in the
# POM.
"//deploy:jazzer",
exports = [
# Maven users should not need to depend on jazzer-api directly if they already directly depend on jazzer-junit,
# both for convenience and backwards compatibility.
"//deploy:jazzer-api",
"//src/main/java/com/code_intelligence/jazzer/junit",
],
runtime_deps = [
# This dep's only effect is to include a dependency on the 'jazzer' Maven artifacts in the POM.
"//deploy:jazzer",
],
)

sh_test(
Expand Down
3 changes: 3 additions & 0 deletions deploy/jazzer-api_artifact_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ JAR="$2/bin/jar"
-e '^com/code_intelligence/$' \
-e '^com/code_intelligence/jazzer/$' \
-e '^com/code_intelligence/jazzer/api/' \
-e '^com/code_intelligence/jazzer/mutation/$' \
-e '^com/code_intelligence/jazzer/mutation/annotation/' \
-e '^com/code_intelligence/jazzer/mutation/utils/' \
-e '^jaz/' \
-e '^META-INF/$' \
-e '^META-INF/MANIFEST.MF$'

0 comments on commit 7f9015b

Please sign in to comment.