Skip to content

Commit

Permalink
Merge pull request #155 from grab/fix-modifiing-attrs
Browse files Browse the repository at this point in the history
fix add value to attributes
  • Loading branch information
mohammadkahelghi-grabtaxi authored Mar 20, 2024
2 parents 092435f + 574dd05 commit 04571be
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions rules/kotlin/kotlin.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,10 @@ def kt_jvm_library_interal(
tags = tags + [LINT_ENABLED]
deps = deps + [lint_sources_target]

attrs = add_value(attrs, "deps", deps)
attrs = add_value(attrs, "tags", tags)
attrs["deps"] = deps
attrs["tags"] = tags

kt_jvm_library(
name = name,
**attrs
)

def add_value(attrs, name, value):
if name in attrs and attrs[name] != None:
attrs[name] += value
else:
attrs[name] = value
return attrs

0 comments on commit 04571be

Please sign in to comment.