|
|
|
|
@ -2,8 +2,6 @@ package com.hiker.drpy; |
|
|
|
|
|
|
|
|
|
import android.content.Context; |
|
|
|
|
|
|
|
|
|
import androidx.annotation.Keep; |
|
|
|
|
|
|
|
|
|
import com.whl.quickjs.android.QuickJSLoader; |
|
|
|
|
import com.whl.quickjs.wrapper.JSModule; |
|
|
|
|
|
|
|
|
|
@ -13,17 +11,7 @@ public class Loader { |
|
|
|
|
QuickJSLoader.init(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Keep |
|
|
|
|
public void init(Context context) { |
|
|
|
|
setModuleLoader(context); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
@Keep |
|
|
|
|
public Spider spider(String api, String ext) { |
|
|
|
|
return new Spider(api, ext); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void setModuleLoader(Context context) { |
|
|
|
|
JSModule.setModuleLoader(new JSModule.ModuleLoader() { |
|
|
|
|
@Override |
|
|
|
|
public String convertModuleName(String moduleBaseName, String moduleName) { |
|
|
|
|
|