sbt/scripts/javalib.py

23 lines
567 B
Python
Raw Normal View History

2019-05-14 14:04:52 +02:00
"""
Utility that lists all non-implementation specific classes in javalib.
It must be run from the root of the Scala Native checkout.
"""
import subprocess,os
cwd = os.getcwd()
target = cwd + "/javalib/target/scala-2.11/classes/"
paths = subprocess.check_output(["find", target, "-name", "*.nir"])
classes = sorted(list(set(
line.replace(target, "").replace(".nir", "").lstrip("/").rstrip("$").replace("/", ".")
for line in paths.split("\n")
if "$$anon" not in line and "java/" in line
)))
for cls in classes:
print("* ``{}``".format(cls))