You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@sunflowerseat nope. These rules didn't help me too. I decided to use another library: implementation group: 'org.mozilla', name: 'rhino', version: '1.7.10'
You'll need to change your code slightly.
Mine looks like this:
val mozillaContext = org.mozilla.javascript.Context.enter()
mozillaContext.optimizationLevel = -1
val scope: Scriptable = mozillaContext.initStandardObjects()
val result = mozillaContext.evaluateString(scope, formula, "<cmd>", 1, null).toString()
I'm using proguard and cannot create engine using this code:
ScriptEngineManager().getEngineByName("rhino")
The string above always return null.
I have added these rules into my
proguard-rules.pro
file:The text was updated successfully, but these errors were encountered: