summaryrefslogtreecommitdiff
path: root/annotations/generate_annotated_java_files.py
diff options
context:
space:
mode:
authorPete Gillin <peteg@google.com>2018-08-20 18:37:27 +0100
committerPete Gillin <peteg@google.com>2018-08-20 18:44:31 +0100
commit5b5ebf32eba5855e7d810827fb5de9bf22a38325 (patch)
tree583927227cb195244e68af003b7f08683dd9655d /annotations/generate_annotated_java_files.py
parent4b9fd680ca2f0442d123e216d791b5e6808fd71c (diff)
Remove ojluni.jaif and associated machinery.
This removes ojluni.jaif, which no longer contains any annotations data. It removes annotated_java_files.bp, which contained a list of files mentioned in ojluni.jaif. It removes the tooling and build rules around keeping annotated_java_files.bp up to date. And it removes all references to the generated source files from the libcore droiddoc targets. Bug: 111639530 Test: `make docs` output is unaffected Test: `make core-docs` Change-Id: I44ae36c3940abb0173a64669564b244b72c7ff9f
Diffstat (limited to 'annotations/generate_annotated_java_files.py')
-rwxr-xr-xannotations/generate_annotated_java_files.py36
1 files changed, 0 insertions, 36 deletions
diff --git a/annotations/generate_annotated_java_files.py b/annotations/generate_annotated_java_files.py
deleted file mode 100755
index 2f12eea105..0000000000
--- a/annotations/generate_annotated_java_files.py
+++ /dev/null
@@ -1,36 +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 = set()
-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(':')]
-
- # In case of nested classes, discard substring after nested class name separator
- nested_class_separator_index = current_class.find('$')
- if nested_class_separator_index != -1:
- current_class = current_class[:nested_class_separator_index]
-
- srcs_list.add(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)