Merge "Fix cargo2android's license block preservation" am: dddc6e0873

Original change: https://android-review.googlesource.com/c/platform/development/+/1663858

Change-Id: I961b9db90f9e3fd1adc680be560bcc48c05cfff1
This commit is contained in:
Treehugger Robot
2021-04-07 22:56:27 +00:00
committed by Automerger Merge Worker

View File

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