Extensions for CompaJScriptBase are loaded manually with static method:
CompaJScriptBase.addExtension(new MathExtension());
They should be loaded with ServiceLoader automatically inside GroovyTranslator and then added to CompaJScriptBase with CompaJScriptBase.extend(Extension).
ServiceLoader requires file descriptor with name tech.hiddenproject.compaj.lang.extension.Extension placed in resources folder inside lang module. This file should contain fully qualified class names of all Extension classes, each on new line:
tech.hiddenproject.compaj.extension.ComplexExtension
tech.hiddenproject.compaj.extension.MathExtension
etc...
Extensions for
CompaJScriptBaseare loaded manually with static method:They should be loaded with
ServiceLoaderautomatically insideGroovyTranslatorand then added toCompaJScriptBasewithCompaJScriptBase.extend(Extension).ServiceLoaderrequires file descriptor with nametech.hiddenproject.compaj.lang.extension.Extensionplaced inresourcesfolder insidelangmodule. This file should contain fully qualified class names of allExtensionclasses, each on new line: