Merge "Fix cargo2android's license block preservation"

This commit is contained in:
Treehugger Robot
2021-04-07 21:39:51 +00:00
committed by Gerrit Code Review

View File

@@ -1131,8 +1131,8 @@ class Runner(object):
# Firstly skip ANDROID_BP_HEADER # Firstly skip ANDROID_BP_HEADER
while line.startswith('//'): while line.startswith('//'):
line = intf.readline() line = intf.readline()
# Read all lines until we see a rust_* rule. # Read all lines until we see a rust_* or genrule rule.
while line != '' and not line.startswith('rust_'): while line != '' and not (line.startswith('rust_') or line.startswith('genrule {')):
license += line license += line
line = intf.readline() line = intf.readline()
return license.strip() return license.strip()