add devkit to example app
This commit is contained in:
parent
55c5bf2a7b
commit
365b89cfa6
10
doric-android/doric/proguard-rules.pro
vendored
10
doric-android/doric/proguard-rules.pro
vendored
@ -19,13 +19,13 @@
|
|||||||
# If you keep the line number information, uncomment this to
|
# If you keep the line number information, uncomment this to
|
||||||
# hide the original source file name.
|
# hide the original source file name.
|
||||||
#-renamesourcefileattribute SourceFile
|
#-renamesourcefileattribute SourceFile
|
||||||
-keep class com.github.penfeizhou.doric.extension.bridge.DoricPlugin
|
-keep class pub.doric.extension.bridge.DoricPlugin
|
||||||
-keep class com.github.penfeizhou.doric.extension.bridge.DoricMethod
|
-keep class pub.doric.extension.bridge.DoricMethod
|
||||||
|
|
||||||
-keep @com.github.penfeizhou.doric.extension.bridge.DoricPlugin class * {*;}
|
-keep @pub.doric.extension.bridge.DoricPlugin class * {*;}
|
||||||
|
|
||||||
-keepclasseswithmembers @com.github.penfeizhou.doric.extension.bridge.DoricPlugin class * {*;}
|
-keepclasseswithmembers @pub.doric.extension.bridge.DoricPlugin class * {*;}
|
||||||
|
|
||||||
-keep class * {
|
-keep class * {
|
||||||
@com.github.penfeizhou.doric.extension.bridge.DoricMethod <fields>;
|
@pub.doric.extension.bridge.DoricMethod <fields>;
|
||||||
}
|
}
|
@ -8,6 +8,7 @@
|
|||||||
android:icon="@mipmap/ic_launcher"
|
android:icon="@mipmap/ic_launcher"
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
android:roundIcon="@mipmap/ic_launcher_round"
|
android:roundIcon="@mipmap/ic_launcher_round"
|
||||||
|
android:networkSecurityConfig="@xml/network_security_config"
|
||||||
android:supportsRtl="true"
|
android:supportsRtl="true"
|
||||||
android:theme="@style/AppTheme">
|
android:theme="@style/AppTheme">
|
||||||
<activity android:name=".MainActivity">
|
<activity android:name=".MainActivity">
|
||||||
|
@ -1,8 +1,14 @@
|
|||||||
package pub.doric.example;
|
package pub.doric.example;
|
||||||
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.view.View;
|
||||||
|
import android.view.ViewGroup;
|
||||||
|
import android.widget.TextView;
|
||||||
|
|
||||||
import pub.doric.DoricActivity;
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
import pub.doric.DoricFragment;
|
||||||
|
import pub.doric.devkit.DoricDev;
|
||||||
|
import pub.doric.navbar.BaseDoricNavBar;
|
||||||
|
|
||||||
public class MainActivity extends AppCompatActivity {
|
public class MainActivity extends AppCompatActivity {
|
||||||
private final String BUNDLE_NAME = "__$__";
|
private final String BUNDLE_NAME = "__$__";
|
||||||
@ -13,7 +19,22 @@ public class MainActivity extends AppCompatActivity {
|
|||||||
getIntent().putExtra("source", source);
|
getIntent().putExtra("source", source);
|
||||||
getIntent().putExtra("alias", BUNDLE_NAME);
|
getIntent().putExtra("alias", BUNDLE_NAME);
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
setContentView(R.layout.activity_main);
|
||||||
|
this.getSupportFragmentManager().beginTransaction().add(R.id.container, new DoricFragment()).commit();
|
||||||
BaseDoricNavBar doricNavBar = findViewById(R.id.doric_nav_bar);
|
BaseDoricNavBar doricNavBar = findViewById(R.id.doric_nav_bar);
|
||||||
doricNavBar.setBackIconVisible(false);
|
doricNavBar.setBackIconVisible(false);
|
||||||
|
|
||||||
|
TextView textView = new TextView(this);
|
||||||
|
textView.setText("Devkit");
|
||||||
|
textView.setOnClickListener(new View.OnClickListener() {
|
||||||
|
@Override
|
||||||
|
public void onClick(View v) {
|
||||||
|
DoricDev.getInstance().openDevMode();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
textView.setLayoutParams(new ViewGroup.LayoutParams(
|
||||||
|
ViewGroup.LayoutParams.WRAP_CONTENT,
|
||||||
|
ViewGroup.LayoutParams.WRAP_CONTENT));
|
||||||
|
doricNavBar.setRight(textView);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<network-security-config>
|
||||||
|
<base-config cleartextTrafficPermitted="true" />
|
||||||
|
</network-security-config>
|
2
doric-web/dist/index.js
vendored
2
doric-web/dist/index.js
vendored
@ -4005,7 +4005,7 @@ return __module.exports;
|
|||||||
var doric_web = (function (exports, axios, sandbox) {
|
var doric_web = (function (exports, axios, sandbox) {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
axios = axios && axios.hasOwnProperty('default') ? axios['default'] : axios;
|
axios = axios && Object.prototype.hasOwnProperty.call(axios, 'default') ? axios['default'] : axios;
|
||||||
|
|
||||||
class DoricPlugin {
|
class DoricPlugin {
|
||||||
constructor(context) {
|
constructor(context) {
|
||||||
|
2
doric-web/dist/index.js.map
vendored
2
doric-web/dist/index.js.map
vendored
File diff suppressed because one or more lines are too long
1
setup.sh
1
setup.sh
@ -8,4 +8,5 @@ CURRENT_DIR=$(cd $(dirname $0); pwd)
|
|||||||
|
|
||||||
cd $CURRENT_DIR/doric-js && npm install && npm run build
|
cd $CURRENT_DIR/doric-js && npm install && npm run build
|
||||||
cd $CURRENT_DIR/doric-demo && npm install && npm run build
|
cd $CURRENT_DIR/doric-demo && npm install && npm run build
|
||||||
|
cd $CURRENT_DIR/doric-web && npm install && npm run build
|
||||||
cd $CURRENT_DIR/doric-cli && npm install && npm link
|
cd $CURRENT_DIR/doric-cli && npm install && npm link
|
Reference in New Issue
Block a user