- add sources.
[platform/framework/web/crosswalk.git] / src / build / android / gyp / ant.py
1 #!/usr/bin/env python
2 #
3 # Copyright 2013 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file.
6
7 """An Ant wrapper that suppresses useless Ant output.
8
9 Ant build scripts output "BUILD SUCCESSFUL" and build timing at the end of
10 every build. In the Android build, this just adds a lot of useless noise to the
11 build output. This script forwards its arguments to ant, and prints Ant's
12 output up until the BUILD SUCCESSFUL line.
13 """
14
15 import sys
16
17 from util import build_utils
18
19
20 def main(argv):
21   stdout = build_utils.CheckCallDie(['ant'] + argv[1:], suppress_output=True)
22   stdout = stdout.strip().split('\n')
23   for line in stdout:
24     if line.strip() == 'BUILD SUCCESSFUL':
25       break
26     print line
27
28
29 if __name__ == '__main__':
30   sys.exit(main(sys.argv))