aboutsummaryrefslogtreecommitdiff
path: root/java_src/tools
diff options
context:
space:
mode:
authorthaidn <thaidn@google.com>2021-01-20 15:50:31 -0800
committerCopybara-Service <copybara-worker@google.com>2021-01-20 15:51:00 -0800
commit8d4650f8365d34fadfe3d1e291a6b4eca1115b97 (patch)
tree2f39ae15affc12e7dac99d458472d20db6a7040d /java_src/tools
parent57c7e904b33b880e7422f581f3f48ac56d1d36fb (diff)
downloadtink-8d4650f8365d34fadfe3d1e291a6b4eca1115b97.tar.gz
Exclude build-data.properties from Maven packages by default.
This should fix https://github.com/google/tink/issues/452. PiperOrigin-RevId: 352893170
Diffstat (limited to 'java_src/tools')
-rw-r--r--java_src/tools/java_single_jar.bzl6
1 files changed, 6 insertions, 0 deletions
diff --git a/java_src/tools/java_single_jar.bzl b/java_src/tools/java_single_jar.bzl
index bc4244d63..5093ee5ac 100644
--- a/java_src/tools/java_single_jar.bzl
+++ b/java_src/tools/java_single_jar.bzl
@@ -64,6 +64,9 @@ def _java_single_jar(ctx):
for p in ctx.attr.root_packages:
args.add("--include_prefixes", p.replace(".", "/"))
+ if ctx.attr.exclude_build_data:
+ args.add("--exclude_build_data")
+
ctx.actions.run(
inputs = inputs.to_list() + resource_files,
outputs = [ctx.outputs.jar],
@@ -89,6 +92,7 @@ java_single_jar = rule(
"source_jar": attr.bool(default = False),
"compress": attr.string(default = "preserve"),
"root_packages": attr.string_list(),
+ "exclude_build_data": attr.bool(default = True),
},
outputs = {
"jar": "%{name}.jar",
@@ -112,6 +116,8 @@ Args:
source_jar: Whether to combine only the source jars of input to create a single
output source jar. The compiled code jars of input will be ignored.
root_packages: Java packages to include in generated jar.
+ exclude_build_data: Whether to omit the build-data.properties file generated
+ by default.
Outputs:
{name}.jar: A single jar containing all of the input.