aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Peut <timpeut@google.com>2023-08-10 13:14:06 -0700
committerCopybara-Service <copybara-worker@google.com>2023-08-10 13:16:14 -0700
commita11a4d581454f67bee8d654c4e10d6570874ab92 (patch)
tree3ac996a9e99ed900bc37379e286ea294062eb166
parent15edd918ad3ca4295e02eb67d65f71244174b32b (diff)
downloadbazelbuild-rules_android-a11a4d581454f67bee8d654c4e10d6570874ab92.tar.gz
Create temporary provider to wire through proguard outputs.
This is primarily useful for testing. Will be replaced by a native provider. PiperOrigin-RevId: 555622864 Change-Id: I98414f6938b98638f6a7e6f993789d0f491a79d8
-rw-r--r--rules/proguard.bzl16
1 files changed, 16 insertions, 0 deletions
diff --git a/rules/proguard.bzl b/rules/proguard.bzl
index 0f644cb..1892fc9 100644
--- a/rules/proguard.bzl
+++ b/rules/proguard.bzl
@@ -27,6 +27,21 @@ _ProguardSpecContextInfo = provider(
),
)
+_ProguardOutputInfo = provider(
+ doc = "Temporary provider to hold all proguard outputs. Will be replaced by a native " +
+ "provider. Useful for testing.",
+ fields = dict(
+ input_jar = "The input program jar, unoptimized",
+ output_jar = "The optimized output jar",
+ mapping = "Output proguard map",
+ proto_mapping = "Output proto mapping",
+ seeds = "Output seeds",
+ usage = "Output usage",
+ library_jar = "Merged library jar",
+ config = "Output config",
+ ),
+)
+
def _validate_proguard_spec(
ctx,
out_validated_proguard_spec,
@@ -331,5 +346,6 @@ testing = struct(
validate_proguard_spec = _validate_proguard_spec,
collect_transitive_proguard_specs = _collect_transitive_proguard_specs,
optimization_action = _optimization_action,
+ ProguardOutputInfo = _ProguardOutputInfo,
ProguardSpecContextInfo = _ProguardSpecContextInfo,
)