Skip to content

Commit 8043af0

Browse files
authored
[7.x] Backport ProguardSpecInfo (#232)
Starlark implementation makes it possible to use the provider without enabling `--experimental_google_legacy_api`. Tested: protocolbuffers/protobuf#18861
1 parent 8b35164 commit 8043af0

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

java/common/proguard_spec_info.bzl

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,14 @@
1313
# limitations under the License.
1414
"""ProguardSpecInfo provider"""
1515

16-
ProguardSpecInfo = ProguardSpecProvider
16+
def _proguard_spec_info_init(specs):
17+
# The constructor supports positional parameter, i.e ProguardSpecInfo([file])
18+
return {"specs": specs}
19+
20+
ProguardSpecInfo, _ = provider(
21+
doc = "Information about proguard specs for Android binaries.",
22+
fields = {
23+
"specs": "A list of proguard specs files",
24+
},
25+
init = _proguard_spec_info_init,
26+
)

0 commit comments

Comments
 (0)