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

merge code to master #1999

Merged
merged 2 commits into from
Jan 3, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 7 additions & 1 deletion WeexSDK.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,13 @@ Pod::Spec.new do |s|
'weex_core/Source/third_party/**/*.{h,hpp,m,mm,c,cpp,cc}',
'weex_core/Source/include/**/*.{h,hpp,m,mm,c,cpp,cc}'
s.exclude_files = 'weex_core/Source/**/*android.{h,hpp,m,mm,c,cpp,cc}',
'weex_core/Source/core/network/android/'
'weex_core/Source/base/android',
'weex_core/Source/base/crash',
'weex_core/Source/base/utils',
'weex_core/Source/third_party/IPC',
'weex_core/Source/core/network/android/',
'weex_core/Source/include/JavaScriptCore/',
'weex_core/Source/include/wtf'

s.private_header_files = 'ios/sdk/WeexSDK/Sources/Component/RecycleList/WXJSASTParser.h'
s.public_header_files = 'ios/sdk/WeexSDK/Sources/WeexSDK.h',
Expand Down
2 changes: 1 addition & 1 deletion android/sdk/assets/weex-main-jsfm.js

Large diffs are not rendered by default.

24 changes: 18 additions & 6 deletions android/sdk/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,12 @@ checkstyle {
version = project.hasProperty('weexVersion')? project.getProperty('weexVersion') : "0.20.0.1"

android {

delete 'libs/armeabi/libweexcore.so'
delete 'libs/armeabi-v7a/libweexcore.so'
delete 'libs/x86/libweexcore.so'
delete 'libs/armeabi/libweexjss.so'
delete 'libs/armeabi-v7a/libweexjss.so'
delete 'libs/x86/libweexjss.so'

compileSdkVersion project.compileSdkVersion
buildToolsVersion project.buildToolsVersion
Expand Down Expand Up @@ -123,6 +125,15 @@ android {
def ARMEABI_Size = new File(projectDir,"libs/armeabi/libweexcore.so").length();
def ARMEABIV7_Size = new File(projectDir,"libs/armeabi-v7/libweexcore.so").length();
def X86_Size = new File(projectDir,"libs/x86/libweexcore.so").length();
def ndkversion = 16;
def api_level = "";
def compile_tool = "clang";
def cxx_stl = "c++_static";
if (ndkversion < 16) {
api_level = "android-14";
} else {
api_level = "android-19";
}
println "ARMEABI_Size: "+ARMEABI_Size;
println "ARMEABIV7_Size:" + ARMEABIV7_Size;
println "X86_Size:" + X86_Size;
Expand All @@ -146,10 +157,11 @@ android {

externalNativeBuild {
cmake {
arguments '-DANDROID_PLATFORM=android-14',
'-DANDROID_TOOLCHAIN=gcc',
'-DANDROID_STL=gnustl_static',
'-DCMAKE_BUILD_TYPE=Release'
arguments '-DANDROID_PLATFORM='+"${api_level}",
'-DANDROID_TOOLCHAIN='+"${compile_tool}",
'-DANDROID_STL='+"${cxx_stl}",
'-DCMAKE_BUILD_TYPE=Release',
'-DENABLE_ASAN=false'
}
}
}
Expand Down Expand Up @@ -358,4 +370,4 @@ bintray {
name = project.version
}
}
}
}
Binary file modified android/sdk/libs/armeabi-v7a/libJavaScriptCore.so
Binary file not shown.
Binary file added android/sdk/libs/armeabi-v7a/libWTF.so
Binary file not shown.
Binary file modified android/sdk/libs/armeabi-v7a/libweexjss.so
100755 → 100644
Binary file not shown.
Binary file modified android/sdk/libs/armeabi/libJavaScriptCore.so
Binary file not shown.
Binary file added android/sdk/libs/armeabi/libWTF.so
Binary file not shown.
Binary file modified android/sdk/libs/armeabi/libweexjss.so
100755 → 100644
Binary file not shown.
Binary file modified android/sdk/libs/x86/libJavaScriptCore.so
100644 → 100755
Binary file not shown.
Binary file added android/sdk/libs/x86/libWTF.so
Binary file not shown.
Binary file modified android/sdk/libs/x86/libweexjss.so
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public class NativeRenderObjectUtils {
public static native boolean nativeRenderObjectHasNewLayout(long ptr);
public static native int nativeRenderObjectChildCount(long ptr);
public static native long nativeRenderObjectGetChild(long ptr, int index);
public static native long nativeRenderObjectUpdateComponent(long ptr, WXComponent component);
public static native void nativeRenderObjectUpdateComponent(long ptr, WXComponent component);
public static native void nativeRenderObjectChildWaste(long ptr, boolean waster);


Expand Down
36 changes: 2 additions & 34 deletions ios/playground/WeexDemo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,6 @@
775BEE781C1E8ECC008D1629 /* Frameworks */,
775BEE791C1E8ECC008D1629 /* Resources */,
C715566148067A7FFAB7797D /* [CP] Copy Pods Resources */,
ED72EE9F9A66E17E73D6C3BC /* [CP] Embed Pods Frameworks */,
);
buildRules = (
);
Expand Down Expand Up @@ -430,7 +429,6 @@
84361D3C1CA10F8E00F43825 /* Frameworks */,
84361D431CA10F8E00F43825 /* Resources */,
84361D6F1CA10F8E00F43825 /* [CP] Copy Pods Resources */,
EC0A67104CF45CC2B03DF0BE /* [CP] Embed Pods Frameworks */,
);
buildRules = (
);
Expand Down Expand Up @@ -542,7 +540,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n";
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
84361D6F1CA10F8E00F43825 /* [CP] Copy Pods Resources */ = {
Expand Down Expand Up @@ -592,7 +590,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n";
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
C715566148067A7FFAB7797D /* [CP] Copy Pods Resources */ = {
Expand Down Expand Up @@ -627,36 +625,6 @@
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-WeexDemo/Pods-WeexDemo-resources.sh\"\n";
showEnvVarsInLog = 0;
};
EC0A67104CF45CC2B03DF0BE /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-WeexUITestDemo/Pods-WeexUITestDemo-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
ED72EE9F9A66E17E73D6C3BC /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-WeexDemo/Pods-WeexDemo-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
Expand Down
1 change: 0 additions & 1 deletion ios/playground/WeexDemo/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
#import "WXWebSocketDefaultImpl.h"
#import <WeexPluginLoader/WeexPluginLoader.h>


#ifdef DEBUG
#import "DebugAnalyzer.h"
#endif
Expand Down
4 changes: 2 additions & 2 deletions ios/sdk/WeexSDK/Sources/Bridge/WXCoreBridge.mm
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
#import "WXSDKEngine.h"
#import "WXAppMonitorProtocol.h"

#include "base/CoreConstants.h"
#include "base/core_constants.h"
#include "base/time_utils.h"
#include "core/manager/weex_core_manager.h"
#include "core/render/manager/render_manager.h"
#include "core/render/page/render_page.h"
Expand All @@ -43,7 +44,6 @@
#include "core/data_render/vnode/vnode_render_manager.h"
#include "core/bridge/platform/core_side_in_platform.h"
#include "core/bridge/script/core_side_in_script.h"
#include "base/TimeUtils.h"
#include "core/network/http_module.h"

#import <objc/runtime.h>
Expand Down
18 changes: 0 additions & 18 deletions weex_core/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,21 +1,3 @@
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
cmake_minimum_required(VERSION 3.4.1)
project(WeexCore)
add_subdirectory(Source)
95 changes: 40 additions & 55 deletions weex_core/Source/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,23 +1,6 @@
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
cmake_minimum_required(VERSION 3.4.1)
set(WEEXCORE_LIBRARY_NAME weexcore)
set(WEEX_CORE_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})

message("${ANDROID_STL} ")
if ("${ANDROID_STL}" STREQUAL "c++_static")
Expand All @@ -31,22 +14,26 @@ add_compile_options(-fexceptions)
add_definitions(-DGNU_SUPPORT=1)
add_definitions(-DJSONCPP_NO_LOCALE_SUPPORT=1)
add_definitions(-DDEBUG=1)
add_definitions(-DOS_ANDROID=1)

add_definitions(-DRENDER_LOG=0)
add_definitions(-DPERFORMANCE_LOG=0)
add_definitions(-DLAYOUT_LOG=0)
add_definitions(-DJSAPI_LOG=0)
add_definitions(-DDOM_PARSER_LOG=0)

set(LOCAL_LIBRARIES_DIR ${CMAKE_CURRENT_SOURCE_DIR}/libs/${ANDROID_ABI})

if ("${ANDROID_ABI}" STREQUAL "x86")
# todo
else ()
if ("${ENABLE_ASAN}" STREQUAL "true")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address -fno-omit-frame-pointer -g3 -fPIC")
endif ()
endif ()

add_compile_options(-fexceptions)

set(COMMON_SRCS
./base/time_point.cc
./base/thread/thread_impl_posix.cc
./base/thread/thread_impl_android.cc
./base/message_loop/message_loop.cc
./base/message_loop/message_pump_posix.cc
./base/message_loop/message_pump_android.cc
./base/third_party/icu/icu_utf.cpp
./core/render/manager/render_manager.cpp
./core/render/page/render_page.cpp

Expand Down Expand Up @@ -91,12 +78,7 @@ set(COMMON_SRCS
./core/data_render/class_array.cc
./core/data_render/class_json.cc
./core/data_render/class_string.cc
./core/data_render/class_regex.cc
./core/data_render/class_console.cc
./core/data_render/class_window.cc
./core/data_render/class_math.cc
./core/data_render/class_factory.cc
./core/data_render/class_function.cc
./core/data_render/class_object.cc
./core/data_render/code_generator.cc
./core/data_render/exec_state.cc
Expand All @@ -115,43 +97,48 @@ set(COMMON_SRCS
./core/data_render/table.cc
./core/data_render/token.cc
./core/data_render/tokenizer.cc
./core/data_render/op_code.cc
./core/data_render/vm.cc
./core/data_render/binary_file.cc
./core/data_render/class_console.cc
./core/data_render/class_function.cc
./core/data_render/class_math.cc
./core/data_render/class_regex.cc
./core/data_render/class_window.cc
./core/data_render/exec_state_binary.cc
./core/data_render/exec_state_section.cc
./core/data_render/op_code.cc
./core/data_render/vnode/vnode.cc
./core/data_render/vnode/vcomponent.cc
./core/data_render/vnode/vnode_exec_env.cc
./core/data_render/vnode/vnode_render_manager.cc
./core/data_render/vnode/vnode_render_context.cc

./core/network/http_module.cc
)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/base)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/wson)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/wson)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/third_party/json11)
#link_directories(${LOCAL_LIBRARIES_DIR})

SET(FINAL_ADD_LIBRARY
${COMMON_SRCS}
)
SET(FINAL_TARGET_LINK_LIBRARIES wson json11)

if (ANDROID)
if(ANDROID)
add_definitions(-DOS_ANDROID=1)
## add_subdirectory for subdirectory has a CMakeLists.txt
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/IPC)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/third_party/IPC)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/android/jsengine)
## include_directories for include head file
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/IPC)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/third_party/IPC)

set (ANDROID_SRCS
./android/jniprebuild/jni_load.cc
./android/base/jni/android_jni.cpp
./android/base/jni/jbytearray_ref.cpp
./android/base/jni/scoped_java_ref.cpp
./android/base/base64/base64.cpp
./android/base/base64/modp_base64/modp_b64.cc
./android/base/string/scoped_jstring.cpp
./android/weex_extend_js_api.h
./android/weex_extend_js_api.cpp
./android/base/string/scoped_jstring_utf8.cpp
./android/base/string/jstring_cache.cpp
./android/base/string/scoped_jstring.cpp
./android/wrap/content_box_measurement_impl_android.cpp
./android/wrap/wx_debug_js_bridge.cpp
./android/wrap/native_render_object_utils_impl_android.cpp
Expand All @@ -168,23 +155,20 @@ if (ANDROID)
./android/utils/cache_utils.cpp
./android/utils/params_utils.cpp
./android/utils/so_utils.cpp
./android/utils/IPCStringResult.cpp
./android/utils/ipc_string_result.cpp
./android/wrap/log_utils.cpp
./android/wrap/hash_set.cpp
./android/wrap/wx_map.cpp
./android/wrap/wx_js_object.cpp
./android/wrap/wx_bridge.cpp
./android/wrap/wx_params.cpp
./android/base/jni_type.cpp
./android/multiprocess/weex_js_connection.cpp
./android/utils/jni_load.cc

./core/data_render/vnode/android/vcomponent_lifecycle_listener.cc
./core/data_render/vnode/android/vnode_on_event_listener.cc
./core/data_render/vnode/android/conversion.cc
./core/network/android/default_request_handler.cc

./android/jsengine/multiprocess/WeexJSConnection.cpp
./android/jsengine/multiprocess/ExtendJSApi.cpp

)
SET(FINAL_ADD_LIBRARY
${FINAL_ADD_LIBRARY}
Expand All @@ -193,19 +177,20 @@ if (ANDROID)

SET(FINAL_TARGET_LINK_LIBRARIES
${FINAL_TARGET_LINK_LIBRARIES}
weexbase
wson
android
weexipc
#weexjss
log
c
z
)
endif(ANDROID)

endif (ANDROID)

##if(iOS)
add_definitions(-DTARGET_OS_IPHONE=1)

##endif(iOS)
#if(iOS)
#add_definitions(-DTARGET_OS_IPHONE=1)
#endif(iOS)


add_library(${WEEXCORE_LIBRARY_NAME} SHARED ${FINAL_ADD_LIBRARY})
Expand Down
Loading