Defer \n quoting generatedContents until creating the ninja rule
Previously, when writing to generatedContents \n characters were quoted (replaced with \\n) so as to allow them to be preserved through ninja/rsp/bash and were unquoted (replaced \\n with \n) just before redirecting to the output file. That meant that any code which wanted to access the contents for other purposes, e.g. testing had to unquote \\n. This change moves the quoting to be part of the code that generates the ninja rule which simplifies any other code that has to access the contents. Without quoting the generated Android.bp files are not formatted properly, are all on one line and completely unreadable. Bug: 156286550 Test: m art-module-sdk and check generated Android.bp file to make sure it is properly formatted. Merged-In: I768c3b96ed08a3daf251730e2a10d9d72338c49a Change-Id: I768c3b96ed08a3daf251730e2a10d9d72338c49a (cherry picked from commit 1110827b)
Loading
Please register or sign in to comment