assets bundle
This commit is contained in:
parent
f1efee6a3e
commit
73b9d97e6d
@ -16,11 +16,6 @@ android {
|
|||||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
sourceSets {
|
|
||||||
main {
|
|
||||||
assets.srcDirs = [project.rootDir.getParent() + "/js-framework/demo"]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
1
Android/app/src/main/assets/demo
Symbolic link
1
Android/app/src/main/assets/demo
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../../../../../js-framework/demo
|
@ -19,7 +19,7 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
setContentView(R.layout.activity_main);
|
setContentView(R.layout.activity_main);
|
||||||
DoricContext doricContext = DoricContext.create(this, DoricUtils.readAssetFile("demo.js"), "demo");
|
DoricContext doricContext = DoricContext.create(this, DoricUtils.readAssetFile("demo/demo.js"), "demo");
|
||||||
doricContext.callEntity("__init__", new JSONBuilder()
|
doricContext.callEntity("__init__", new JSONBuilder()
|
||||||
.put("width", ViewGroup.LayoutParams.MATCH_PARENT)
|
.put("width", ViewGroup.LayoutParams.MATCH_PARENT)
|
||||||
.put("height", ViewGroup.LayoutParams.MATCH_PARENT));
|
.put("height", ViewGroup.LayoutParams.MATCH_PARENT));
|
||||||
|
@ -21,11 +21,6 @@ android {
|
|||||||
consumerProguardFiles 'proguard-rules.pro'
|
consumerProguardFiles 'proguard-rules.pro'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
sourceSets {
|
|
||||||
main {
|
|
||||||
assets.srcDirs = [project.rootDir.getParent() + "/js-framework/bundle"]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
afterEvaluate {
|
afterEvaluate {
|
||||||
|
1
Android/doric/src/main/assets/bundle
Symbolic link
1
Android/doric/src/main/assets/bundle
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../../../../../js-framework/bundle
|
@ -6,8 +6,8 @@ package com.github.penfeizhou.doric.utils;
|
|||||||
* @CreateDate: 2019-07-18
|
* @CreateDate: 2019-07-18
|
||||||
*/
|
*/
|
||||||
public class DoricConstant {
|
public class DoricConstant {
|
||||||
public static final String DORIC_BUNDLE_SANDBOX = "doric-sandbox.js";
|
public static final String DORIC_BUNDLE_SANDBOX = "bundle/doric-sandbox.js";
|
||||||
public static final String DORIC_BUNDLE_LIB = "doric-lib.js";
|
public static final String DORIC_BUNDLE_LIB = "bundle/doric-lib.js";
|
||||||
public static final String DORIC_MODULE_LIB = "./index";
|
public static final String DORIC_MODULE_LIB = "./index";
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user