Skip to content
This repository has been archived by the owner on Jun 3, 2021. It is now read-only.

Commit

Permalink
Merge heron into master (#2636)
Browse files Browse the repository at this point in the history
  • Loading branch information
zshshr authored and YorkShen committed Jul 2, 2019
1 parent 48a7cb7 commit 67bad4f
Show file tree
Hide file tree
Showing 434 changed files with 131,940 additions and 470 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,13 @@ android/playground/app/gradlew.bat
android/playground/app/gradle/wrapper/gradle-wrapper.jar
android/playground/app/gradle/wrapper/gradle-wrapper.properties
android/sdk/.externalNativeBuild/ndkBuild/
android/HeronAndroid/.externalNativeBuild/

# release
apache_release_temp
RELEASE_NOTE.md
RELEASE_AUDIT.LOG

android/commons/bin/
android/playground/app/bin/
android/playground/app/bin/
weex_core/test/out/
1 change: 1 addition & 0 deletions WeexSDK.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ Pod::Spec.new do |s|
'ios/sdk/WeexSDK/Sources/Manager/WXSDKManager.h',
'ios/sdk/WeexSDK/Sources/Manager/WXBridgeManager.h',
'ios/sdk/WeexSDK/Sources/Manager/WXComponentManager.h',
'ios/sdk/WeexSDK/Sources/Manager/WXHandlerFactory.h',
'ios/sdk/WeexSDK/Sources/Manager/WXComponentFactory.h',
'ios/sdk/WeexSDK/Sources/Manager/WXInvocationConfig.h',
'ios/sdk/WeexSDK/Sources/Engine/WXSDKEngine.h',
Expand Down
1 change: 1 addition & 0 deletions android/playground/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ dependencies {

implementation project(':commons')
implementation project(':weex_sdk')
// implementation project(':HeronAndroid')
//https://github.com/weexteam/weex-analyzer-android
//Weex-Analyzer provides several convenient tools such as Memory Monitor
// to optimize your application. It's not available by default,you can
Expand Down
298 changes: 298 additions & 0 deletions android/playground/app/src/main/assets/videoplus.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,298 @@
// { "framework": "Vue" }
"use weex:vue";

/******/
(function(modules) { // webpackBootstrap
/******/ // The module cache
/******/
var installedModules = {};
/******/
/******/ // The require function
/******/
function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/
if (installedModules[moduleId]) {
/******/
return installedModules[moduleId].exports;
/******/
}
/******/ // Create a new module (and put it into the cache)
/******/
var module = installedModules[moduleId] = {
/******/
i: moduleId,
/******/
l: false,
/******/
exports: {}
/******/
};
/******/
/******/ // Execute the module function
/******/
modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ // Flag the module as loaded
/******/
module.l = true;
/******/
/******/ // Return the exports of the module
/******/
return module.exports;
/******/
}
/******/
/******/
/******/ // expose the modules object (__webpack_modules__)
/******/
__webpack_require__.m = modules;
/******/
/******/ // expose the module cache
/******/
__webpack_require__.c = installedModules;
/******/
/******/ // define getter function for harmony exports
/******/
__webpack_require__.d = function(exports, name, getter) {
/******/
if (!__webpack_require__.o(exports, name)) {
/******/
Object.defineProperty(exports, name, {
/******/
configurable: false,
/******/
enumerable: true,
/******/
get: getter
/******/
});
/******/
}
/******/
};
/******/
/******/ // getDefaultExport function for compatibility with non-harmony modules
/******/
__webpack_require__.n = function(module) {
/******/
var getter = module && module.__esModule ?
/******/
function getDefault() {
return module['default'];
} :
/******/
function getModuleExports() {
return module;
};
/******/
__webpack_require__.d(getter, 'a', getter);
/******/
return getter;
/******/
};
/******/
/******/ // Object.prototype.hasOwnProperty.call
/******/
__webpack_require__.o = function(object, property) {
return Object.prototype.hasOwnProperty.call(object, property);
};
/******/
/******/ // __webpack_public_path__
/******/
__webpack_require__.p = "";
/******/
/******/ // Load entry module and return exports
/******/
return __webpack_require__(__webpack_require__.s = 0);
/******/
})
/************************************************************************/
/******/
([
/* 0 */
/***/
(function(module, exports, __webpack_require__) {

"use strict";


var _App = __webpack_require__(1);

var _App2 = _interopRequireDefault(_App);

function _interopRequireDefault(obj) {
return obj && obj.__esModule ? obj : {
default: obj
};
}

_App2.default.el = '#root';
new Vue(_App2.default);

/***/
}),
/* 1 */
/***/
(function(module, exports, __webpack_require__) {

var __vue_exports__, __vue_options__
var __vue_styles__ = []

/* styles */
__vue_styles__.push(__webpack_require__(2))

/* script */
__vue_exports__ = __webpack_require__(3)

/* template */
var __vue_template__ = __webpack_require__(4)
__vue_options__ = __vue_exports__ = __vue_exports__ || {}
if (
typeof __vue_exports__.default === "object" ||
typeof __vue_exports__.default === "function"
) {
if (Object.keys(__vue_exports__).some(function(key) {
return key !== "default" && key !== "__esModule"
})) {
console.error("named exports are not supported in *.vue files.")
}
__vue_options__ = __vue_exports__ = __vue_exports__.default
}
if (typeof __vue_options__ === "function") {
__vue_options__ = __vue_options__.options
}
__vue_options__.__file = "/usr/src/app/raw/072b3765e21f00b469b67c324c6e3dde/App.vue"
__vue_options__.render = __vue_template__.render
__vue_options__.staticRenderFns = __vue_template__.staticRenderFns
__vue_options__._scopeId = "data-v-f7ea0eb2"
__vue_options__.style = __vue_options__.style || {}
__vue_styles__.forEach(function(module) {
for (var name in module) {
__vue_options__.style[name] = module[name]
}
})
if (typeof __register_static_styles__ === "function") {
__register_static_styles__(__vue_options__._scopeId, __vue_styles__)
}

module.exports = __vue_exports__


/***/
}),
/* 2 */
/***/
(function(module, exports) {

module.exports = {
"video": {
"width": "630",
"height": "350",
"marginTop": "60",
"marginLeft": "60",
"backgroundColor":"red"
},
"info": {
"marginTop": "40",
"fontSize": "40",
"textAlign": "center"
}
}

/***/
}),
/* 3 */
/***/
(function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
value: true
});
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//

exports.default = {
data: function data() {
return {
state: '----',
src: 'http://flv2.bn.netease.com/videolib3/1611/01/XGqSL5981/SD/XGqSL5981-mobile.mp4'
};
},

methods: {
onstart: function onstart(event) {
this.state = 'onstart';
},
onpause: function onpause(event) {
this.state = 'onpause';
},
onfinish: function onfinish(event) {
this.state = 'onfinish';
},
onfail: function onfail(event) {
this.state = 'onfinish';
}
}
};

/***/
}),
/* 4 */
/***/
(function(module, exports) {

module.exports = {
render: function() {
var _vm = this;
var _h = _vm.$createElement;
var _c = _vm._self._c || _h;
return _c('div', [_c('videoplus', {
staticClass: ["video"],
attrs: {
"src": _vm.src,
"autoplay": "",
"controls": ""
},
on: {
"start": _vm.onstart,
"pause": _vm.onpause,
"finish": _vm.onfinish,
"fail": _vm.onfail
}
}), _c('text', {
staticClass: ["info"]
}, [_vm._v("state: " + _vm._s(_vm.state))])], 1)
},
staticRenderFns: []
}
module.exports.render._withStripped = true

/***/
})
/******/
]);
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import android.app.Activity;
import android.app.Application;
import android.os.Bundle;
import android.util.Log;
import android.support.multidex.MultiDex;
import android.text.TextUtils;
import com.alibaba.android.bindingx.plugin.weex.BindingX;
Expand Down Expand Up @@ -52,6 +53,8 @@
import com.taobao.weex.common.WXException;
import com.taobao.weex.performance.WXAnalyzerDataTransfer;

import java.lang.reflect.Method;

public class WXApplication extends Application {

@Override
Expand Down Expand Up @@ -118,6 +121,8 @@ public void onCreate() {
//Typeface nativeFont = Typeface.createFromAsset(getAssets(), "font/native_font.ttf");
//WXEnvironment.setGlobalFontFamily("bolezhusun", nativeFont);

startHeron();

} catch (WXException e) {
e.printStackTrace();
}
Expand Down Expand Up @@ -187,4 +192,16 @@ private void initDebugEnvironment(boolean connectable, boolean debuggable, Strin
}
}

private void startHeron(){
try{
Class<?> heronInitClass = getClassLoader().loadClass("com/taobao/weex/heron/picasso/RenderPicassoInit");
Method method = heronInitClass.getMethod("initApplication", Application.class);
method.setAccessible(true);
method.invoke(null,this);
Log.e("Weex", "Weex Heron Render Init Success");
}catch (Exception e){
Log.e("Weex", "Weex Heron Render Mode Not Found", e);
}
}

}
Loading

0 comments on commit 67bad4f

Please sign in to comment.