add doric remote js executor interface; update gradle

This commit is contained in:
王劲鹏
2019-10-12 19:52:27 +08:00
parent f9b599e7cf
commit f5177d2c15
9 changed files with 2085 additions and 42 deletions

View File

@@ -51,7 +51,7 @@ public class DoricJSEngine implements Handler.Callback, DoricTimerExtension.Time
private void initJSExecutor() {
mDoricJSE = new DoricJSExecutor();
mDoricJSE = new DoricNativeJSExecutor();
mDoricJSE.injectGlobalJSFunction(DoricConstant.INJECT_LOG, new JavaFunction() {
@Override
public JavaValue exec(JSDecoder[] args) {

View File

@@ -11,11 +11,11 @@ import com.github.pengfeizhou.jscore.JavaValue;
* @Author: pengfei.zhou
* @CreateDate: 2019-07-18
*/
public class DoricJSExecutor implements IDoricJSE {
public class DoricNativeJSExecutor implements IDoricJSE {
private final JSExecutor mJSExecutor;
public DoricJSExecutor() {
public DoricNativeJSExecutor() {
this.mJSExecutor = JSExecutor.create();
}

View File

@@ -0,0 +1,39 @@
package com.github.penfeizhou.doric.engine;
import com.github.pengfeizhou.jscore.JSDecoder;
import com.github.pengfeizhou.jscore.JSRuntimeException;
import com.github.pengfeizhou.jscore.JavaFunction;
import com.github.pengfeizhou.jscore.JavaValue;
public class DoricRemoteJSExecutor implements IDoricJSE {
@Override
public String loadJS(String script, String source) throws JSRuntimeException {
return null;
}
@Override
public JSDecoder evaluateJS(String script, String source, boolean hashKey) throws JSRuntimeException {
return null;
}
@Override
public void injectGlobalJSFunction(String name, JavaFunction javaFunction) {
}
@Override
public void injectGlobalJSObject(String name, JavaValue javaValue) {
}
@Override
public JSDecoder invokeMethod(String objectName, String functionName, JavaValue[] javaValues, boolean hashKey) throws JSRuntimeException {
return null;
}
@Override
public void teardown() {
}
}