add doric remote js executor interface; update gradle
This commit is contained in:
parent
f9b599e7cf
commit
f5177d2c15
@ -7,7 +7,7 @@ buildscript {
|
|||||||
|
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:3.4.1'
|
classpath 'com.android.tools.build:gradle:3.5.1'
|
||||||
|
|
||||||
// NOTE: Do not place your application dependencies here; they belong
|
// NOTE: Do not place your application dependencies here; they belong
|
||||||
// in the individual module build.gradle files
|
// in the individual module build.gradle files
|
||||||
|
@ -51,7 +51,7 @@ public class DoricJSEngine implements Handler.Callback, DoricTimerExtension.Time
|
|||||||
|
|
||||||
|
|
||||||
private void initJSExecutor() {
|
private void initJSExecutor() {
|
||||||
mDoricJSE = new DoricJSExecutor();
|
mDoricJSE = new DoricNativeJSExecutor();
|
||||||
mDoricJSE.injectGlobalJSFunction(DoricConstant.INJECT_LOG, new JavaFunction() {
|
mDoricJSE.injectGlobalJSFunction(DoricConstant.INJECT_LOG, new JavaFunction() {
|
||||||
@Override
|
@Override
|
||||||
public JavaValue exec(JSDecoder[] args) {
|
public JavaValue exec(JSDecoder[] args) {
|
||||||
|
@ -11,11 +11,11 @@ import com.github.pengfeizhou.jscore.JavaValue;
|
|||||||
* @Author: pengfei.zhou
|
* @Author: pengfei.zhou
|
||||||
* @CreateDate: 2019-07-18
|
* @CreateDate: 2019-07-18
|
||||||
*/
|
*/
|
||||||
public class DoricJSExecutor implements IDoricJSE {
|
public class DoricNativeJSExecutor implements IDoricJSE {
|
||||||
|
|
||||||
private final JSExecutor mJSExecutor;
|
private final JSExecutor mJSExecutor;
|
||||||
|
|
||||||
public DoricJSExecutor() {
|
public DoricNativeJSExecutor() {
|
||||||
this.mJSExecutor = JSExecutor.create();
|
this.mJSExecutor = JSExecutor.create();
|
||||||
}
|
}
|
||||||
|
|
@ -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() {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -1,6 +1,6 @@
|
|||||||
#Thu Jul 18 13:18:02 CST 2019
|
#Sat Oct 12 19:23:56 CST 2019
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-5.4.1-all.zip
|
||||||
|
2039
demo/package-lock.json
generated
2039
demo/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
35
js-framework/package-lock.json
generated
35
js-framework/package-lock.json
generated
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"name": "doric-js-framework",
|
"name": "doric",
|
||||||
"version": "0.1.0",
|
"version": "0.1.0",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
@ -1071,14 +1071,6 @@
|
|||||||
"resolved": "http://registry.npm.taobao.org/is-primitive/download/is-primitive-2.0.0.tgz",
|
"resolved": "http://registry.npm.taobao.org/is-primitive/download/is-primitive-2.0.0.tgz",
|
||||||
"integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU="
|
"integrity": "sha1-IHurkWOEmcB7Kt8kCkGochADRXU="
|
||||||
},
|
},
|
||||||
"is-reference": {
|
|
||||||
"version": "1.1.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/is-reference/-/is-reference-1.1.3.tgz",
|
|
||||||
"integrity": "sha512-W1iHHv/oyBb2pPxkBxtaewxa1BC58Pn5J0hogyCdefwUIvb6R+TGbAcIa4qPNYLqLhb3EnOgUf2MQkkF76BcKw==",
|
|
||||||
"requires": {
|
|
||||||
"@types/estree": "0.0.39"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"is-windows": {
|
"is-windows": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
"resolved": "http://registry.npm.taobao.org/is-windows/download/is-windows-1.0.2.tgz",
|
"resolved": "http://registry.npm.taobao.org/is-windows/download/is-windows-1.0.2.tgz",
|
||||||
@ -1105,14 +1097,6 @@
|
|||||||
"is-buffer": "^1.1.5"
|
"is-buffer": "^1.1.5"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"magic-string": {
|
|
||||||
"version": "0.25.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.3.tgz",
|
|
||||||
"integrity": "sha512-6QK0OpF/phMz0Q2AxILkX2mFhi7m+WMwTRg0LQKq/WBB0cDP4rYH3Wp4/d3OTXlrPLVJT/RFqj8tFeAR4nk8AA==",
|
|
||||||
"requires": {
|
|
||||||
"sourcemap-codec": "^1.4.4"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"map-cache": {
|
"map-cache": {
|
||||||
"version": "0.2.2",
|
"version": "0.2.2",
|
||||||
"resolved": "http://registry.npm.taobao.org/map-cache/download/map-cache-0.2.2.tgz",
|
"resolved": "http://registry.npm.taobao.org/map-cache/download/map-cache-0.2.2.tgz",
|
||||||
@ -1690,18 +1674,6 @@
|
|||||||
"acorn": "^6.2.0"
|
"acorn": "^6.2.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"rollup-plugin-commonjs": {
|
|
||||||
"version": "10.0.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/rollup-plugin-commonjs/-/rollup-plugin-commonjs-10.0.1.tgz",
|
|
||||||
"integrity": "sha512-x0PcCVdEc4J8igv1qe2vttz8JKAKcTs3wfIA3L8xEty3VzxgORLrzZrNWaVMc+pBC4U3aDOb9BnWLAQ8J11vkA==",
|
|
||||||
"requires": {
|
|
||||||
"estree-walker": "^0.6.1",
|
|
||||||
"is-reference": "^1.1.2",
|
|
||||||
"magic-string": "^0.25.2",
|
|
||||||
"resolve": "^1.11.0",
|
|
||||||
"rollup-pluginutils": "^2.8.1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"rollup-plugin-node-resolve": {
|
"rollup-plugin-node-resolve": {
|
||||||
"version": "5.2.0",
|
"version": "5.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-5.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-5.2.0.tgz",
|
||||||
@ -1885,11 +1857,6 @@
|
|||||||
"resolved": "http://registry.npm.taobao.org/source-map-url/download/source-map-url-0.4.0.tgz",
|
"resolved": "http://registry.npm.taobao.org/source-map-url/download/source-map-url-0.4.0.tgz",
|
||||||
"integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM="
|
"integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM="
|
||||||
},
|
},
|
||||||
"sourcemap-codec": {
|
|
||||||
"version": "1.4.6",
|
|
||||||
"resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.6.tgz",
|
|
||||||
"integrity": "sha512-1ZooVLYFxC448piVLBbtOxFcXwnymH9oUF8nRd3CuYDVvkRBxRl6pB4Mtas5a4drtL+E8LDgFkQNcgIw6tc8Hg=="
|
|
||||||
},
|
|
||||||
"split-string": {
|
"split-string": {
|
||||||
"version": "3.1.0",
|
"version": "3.1.0",
|
||||||
"resolved": "https://registry.npm.taobao.org/split-string/download/split-string-3.1.0.tgz",
|
"resolved": "https://registry.npm.taobao.org/split-string/download/split-string-3.1.0.tgz",
|
||||||
|
@ -27,4 +27,4 @@
|
|||||||
"tslib": "^1.10.0",
|
"tslib": "^1.10.0",
|
||||||
"typescript": "^3.5.3"
|
"typescript": "^3.5.3"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user