config Entry
This commit is contained in:
10
Android/doric/proguard-rules.pro
vendored
10
Android/doric/proguard-rules.pro
vendored
@@ -19,3 +19,13 @@
|
||||
# If you keep the line number information, uncomment this to
|
||||
# hide the original source file name.
|
||||
#-renamesourcefileattribute SourceFile
|
||||
-keep class com.github.penfeizhou.doric.extension.bridge.DoricPlugin
|
||||
-keep class com.github.penfeizhou.doric.extension.bridge.DoricMethod
|
||||
|
||||
-keep @com.github.penfeizhou.doric.extension.bridge.DoricPlugin class * {*;}
|
||||
|
||||
-keepclasseswithmembers @com.github.penfeizhou.doric.extension.bridge.DoricPlugin class * {*;}
|
||||
|
||||
-keep class * {
|
||||
@com.github.penfeizhou.doric.extension.bridge.DoricMethod <fields>;
|
||||
}
|
@@ -166,7 +166,7 @@ public class DoricJSEngine implements Handler.Callback, DoricTimerExtension.Time
|
||||
}
|
||||
|
||||
private String packageContextScript(String contextId, String content) {
|
||||
return String.format(DoricConstant.TEMPLATE_CONTEXT_CREATE, content, contextId, contextId);
|
||||
return String.format(DoricConstant.TEMPLATE_CONTEXT_CREATE, content, contextId, contextId, contextId);
|
||||
}
|
||||
|
||||
private String packageModuleScript(String moduleName, String content) {
|
||||
|
@@ -18,11 +18,12 @@ public class DoricConstant {
|
||||
public static final String INJECT_BRIDGE = "nativeBridge";
|
||||
|
||||
public static final String TEMPLATE_CONTEXT_CREATE = "Reflect.apply(" +
|
||||
"function(doric,context,require,exports){" + "\n" +
|
||||
"function(doric,context,Entry,require,exports){" + "\n" +
|
||||
"%s" + "\n" +
|
||||
"},doric.jsObtainContext(\"%s\"),[" +
|
||||
"undefined," +
|
||||
"doric.jsObtainContext(\"%s\")," +
|
||||
"doric.jsObtainEntry(\"%s\")," +
|
||||
"doric.__require__" +
|
||||
",{}" +
|
||||
"])";
|
||||
|
Reference in New Issue
Block a user