diff --git a/README.md b/README.md index ec2a0d0..c47b552 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,6 @@ mvn clean verify # run the interpreter -java -jar target/transcendental-lisp-*-SNAPSHOT.jar +java -jar target/transcendental-lisp-*.jar ``` \ No newline at end of file diff --git a/pom.xml b/pom.xml index 7b167c8..f9a1a55 100644 --- a/pom.xml +++ b/pom.xml @@ -6,13 +6,13 @@ com.gitlab.mike-cifelli transcendental-lisp - 1.2.0 + 1.2.1 UTF-8 1.2.71 5.2.0 - false + true @@ -139,7 +139,7 @@ org.apache.maven.plugins maven-shade-plugin - 3.1.0 + 3.2.0 package @@ -156,6 +156,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -166,6 +193,12 @@ ${kotlin.version} + + org.jetbrains.kotlin + kotlin-reflect + ${kotlin.version} + + com.googlecode.lanterna lanterna @@ -173,9 +206,9 @@ - org.reflections - reflections - 0.9.9 + io.github.classgraph + classgraph + 4.4.7 diff --git a/src/main/kotlin/table/FunctionTable.kt b/src/main/kotlin/table/FunctionTable.kt index 104be72..861424e 100644 --- a/src/main/kotlin/table/FunctionTable.kt +++ b/src/main/kotlin/table/FunctionTable.kt @@ -3,14 +3,21 @@ package table import error.CriticalLispException import function.FunctionNames import function.LispFunction -import org.reflections.Reflections +import io.github.classgraph.ClassGraph object FunctionTable { private val table = mutableMapOf() - private val allBuiltIns = with(Reflections("function.builtin")) { - getTypesAnnotatedWith(FunctionNames::class.java) + private val classGraph = ClassGraph() + .disableJarScanning() + .enableClassInfo() + .enableAnnotationInfo() + .whitelistPackages("function.builtin") + + private val allBuiltIns = with(classGraph.scan()) { + getClassesWithAnnotation(FunctionNames::class.qualifiedName) + .map { it.loadClass() } .filterIsInstance>() .toSet() }