summaryrefslogtreecommitdiff
path: root/annotations/generate_annotated_java_files.py
diff options
context:
space:
mode:
authorColin Cross <ccross@android.com>2017-10-27 16:37:28 +0000
committerColin Cross <ccross@android.com>2017-10-27 16:37:28 +0000
commit554d65461915e1f9d2197a13d4ef39fa9964c809 (patch)
tree2de76cd89c116b318804e3a4761a4a3c4de5ae14 /annotations/generate_annotated_java_files.py
parenteb55e5c38f1c374897a60f17627a153480e608bd (diff)
Revert "Add makefile targets for ojluni jaif-annotated source files."
This reverts commit eb55e5c38f1c374897a60f17627a153480e608bd. Reason for revert: Broke builds with absolute OUT_DIR, I'll reapply with a fix. Change-Id: Ie7cf38cb097bf9665e6e745707b705be24b77605
Diffstat (limited to 'annotations/generate_annotated_java_files.py')
-rwxr-xr-xannotations/generate_annotated_java_files.py30
1 files changed, 0 insertions, 30 deletions
diff --git a/annotations/generate_annotated_java_files.py b/annotations/generate_annotated_java_files.py
deleted file mode 100755
index de8b131da6..0000000000
--- a/annotations/generate_annotated_java_files.py
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/usr/bin/env python
-
-"""Generate annotated_java_files.bp from a jaif file."""
-import os
-
-PACKAGE_STRING = 'package '
-CLASS_STRING = 'class '
-SRC_PREFIX = 'ojluni/src/main/java/'
-
-BP_TEMPLATE = '''filegroup {
- name: "annotated_ojluni_files",
- export_to_make_var: "annotated_ojluni_files",
- srcs: [
-%s
- ],
-}'''
-
-srcs_list = []
-current_package = None
-with open(os.sys.argv[1], 'r') as jaif_file:
- for line in jaif_file:
- if line.startswith(PACKAGE_STRING):
- current_package = line[len(PACKAGE_STRING): line.find(':')]
- if line.startswith(CLASS_STRING) and current_package is not None:
- current_class = line[len(CLASS_STRING): line.find(':')]
- srcs_list.append(SRC_PREFIX + current_package.replace('.', '/') + '/' + current_class + '.java')
-
-print '// Do not edit; generated using libcore/annotations/generate_annotated_java_files.py'
-print BP_TEMPLATE % ('\n'.join([' "' + src_entry + '",' for src_entry in sorted(srcs_list)]),)
-os.sys.exit(0)