This is an automated email from the ASF dual-hosted git repository.

luckychen pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-weex.git


The following commit(s) were added to refs/heads/master by this push:
     new 685ec8a  [Android] Download JSC header files from remote during 
compiling (#2960)
685ec8a is described below

commit 685ec8acd3dd5ca107e802ca578924bc7361b82d
Author: YorkShen <[email protected]>
AuthorDate: Sat Oct 12 14:25:15 2019 +0800

    [Android] Download JSC header files from remote during compiling (#2960)
    
    * [Android] use jsc api header.h for runtimeMode
    
    * Fix the problem of task update.
    
    * Remove header files for good.
    
    * Update .gitignore
    
    * Update CMake.
    
    * Update copy rule
    
    * Create Dir by manual
    
    * Revert "Create Dir by manual"
    
    This reverts commit f4896078416f18511ce5a5adc4ef638b8ecbf197.
    
    * Add log
    
    * Fix clean problem.
    
    * Fix task dependency problem
    
    * Fix cleanCopyProguard problem
---
 LICENSE                                    | 299 -----------------------------
 android/sdk/build.gradle                   |   5 +-
 android/sdk/buildSrc/download_jsc.gradle   |  26 ++-
 android/sdk/buildSrc/packageName.gradle    |  17 +-
 scripts/release_files.rules                |   9 +-
 weex_core/.gitignore                       |   2 +
 weex_core/Source/js_runtime/CMakeLists.txt |   3 +-
 7 files changed, 44 insertions(+), 317 deletions(-)

diff --git a/LICENSE b/LICENSE
index 0f64676..cf60cd5 100644
--- a/LICENSE
+++ b/LICENSE
@@ -408,305 +408,6 @@ This product bundles chromium v66.0.3344.2, which is 
available under a "BSD-styl
 This product bundles Android Open Source Project vandroid-4.2.2_r1, which is 
available under a "BSD" license. For details, see 
https://android.googlesource.com/platform/bionic/+/android-4.2.2_r1/libc/README 
and following files:
   weex_core/Source/IPC/futex.h
 
-This product bundles Webkit 2.17.4, which is available under a "BSD-style" 
license. For details, reference https://webkit.org/licensing-webkit/ for 
license and see 
https://svn.webkit.org/repository/webkit/releases/WebKitGTK/webkit-2.17.4 for 
following files:
-
-   Bmalloc in WebKit:
-      weex_core/Source/android/jsengine/dependence/bmalloc:
-         CMakeLists.txt
-         ChangeLog
-         Makefile
-
-      weex_core/Source/android/jsengine/dependence/bmalloc/Configurations:
-         Base.xcconfig
-         DebugRelease.xcconfig
-         bmalloc.xcconfig
-         mbmalloc.xcconfig
-
-      weex_core/Source/android/jsengine/dependence/bmalloc/bmalloc:
-         Algorithm.h
-         Allocator.cpp
-         Allocator.h
-         AsyncTask.h
-         AvailableMemory.cpp
-         AvailableMemory.h
-         BAssert.h
-         BPlatform.h
-         BumpAllocator.h
-         BumpRange.h
-         Cache.cpp
-         Cache.h
-         Chunk.h
-         Deallocator.cpp
-         Deallocator.h
-         DebugHeap.cpp
-         DebugHeap.h
-         Environment.cpp
-         Environment.h
-         FixedVector.h
-         Heap.cpp
-         Heap.h
-         Inline.h
-         LargeMap.cpp
-         LargeMap.h
-         LargeRange.h
-         LineMetadata.h
-         List.h
-         Logging.cpp
-         Logging.h
-         Map.h
-         Mutex.h
-         Object.h
-         ObjectType.cpp
-         ObjectType.h
-         PerProcess.h
-         PerThread.h
-         Range.h
-         ScopeExit.h
-         Sizes.h
-         SmallLine.h
-         SmallPage.h
-         StaticMutex.cpp
-         StaticMutex.h
-         Syscall.h
-         VMAllocate.h
-         VMHeap.cpp
-         VMHeap.h
-         Vector.h
-         Zone.cpp
-         Zone.h
-         bmalloc.h
-         mbmalloc.cpp
-
-      weex_core/Source/android/jsengine/dependence/bmalloc/bmalloc/darwin:
-         BSoftLinking.h
-
-      weex_core/Source/android/jsengine/dependence/bmalloc/bmalloc.xcodeproj:
-         project.pbxproj
-
-   ICU in WebKit:
-      weex_core/Source/android/jsengine/dependence/icu:
-         LICENSE
-         README
-
-      weex_core/Source/android/jsengine/dependence/icu/unicode:
-         localpointer.h
-         parseerr.h
-         platform.h
-         ptypes.h
-         putil.h
-         ucal.h
-         uchar.h
-         ucnv.h
-         ucnv_err.h
-         ucol.h
-         uconfig.h
-         ucurr.h
-         udat.h
-         udatpg.h
-         udisplaycontext.h
-         uenum.h
-         uformattable.h
-         uiter.h
-         uloc.h
-         umachine.h
-         umisc.h
-         unorm.h
-         unorm2.h
-         unum.h
-         unumsys.h
-         urename.h
-         uscript.h
-         uset.h
-         ustring.h
-         utf.h
-         utf16.h
-         utf8.h
-         utf_old.h
-         utypes.h
-         uvernum.h
-         uversion.h
-   
-   JavaScriptCore in WebKit:
-      weex_core/Source/include/JavaScriptCore/API:
-         APICallbackFunction.h
-         APICast.h
-         APIUtils.h
-         JSAPIWrapperObject.h
-         JSBase.h
-         JSBasePrivate.h
-         JSCTestRunnerUtils.h
-         JSCallbackConstructor.h
-         JSCallbackFunction.h
-         JSCallbackObject.h
-         JSCallbackObjectFunctions.h
-         JSClassRef.h
-         JSContext.h
-         JSContextInternal.h
-         JSContextPrivate.h
-         JSContextRef.h
-         JSContextRefInspectorSupport.h
-         JSContextRefInternal.h
-         JSContextRefPrivate.h
-         JSExport.h
-         JSManagedValue.h
-         JSManagedValueInternal.h
-         JSObjectRef.h
-         JSObjectRefPrivate.h
-         JSRemoteInspector.h
-         JSRetainPtr.h
-         JSScriptRefPrivate.h
-         JSStringRef.h
-         JSStringRefBSTR.h
-         JSStringRefCF.h
-         JSStringRefPrivate.h
-         JSTypedArray.h
-         JSValue.h
-         JSValueInternal.h
-         JSValueRef.h
-         JSVirtualMachine.h
-         JSVirtualMachineInternal.h
-         JSWeakObjectMapRefInternal.h
-         JSWeakObjectMapRefPrivate.h
-         JSWrapperMap.h
-         JavaScript.h
-         JavaScriptCore.h
-         ObjCCallbackFunction.h
-         ObjcRuntimeExtras.h
-         OpaqueJSString.h
-         WebKitAvailability.h
-
-      weex_core/Source/include/JavaScriptCore/ForwardingHeaders/JavaScriptCore:
-         APICast.h
-         JSBase.h
-         JSCTestRunnerUtils.h
-         JSContextRef.h
-         JSObjectRef.h
-         JSObjectRefPrivate.h
-         JSRetainPtr.h
-         JSStringRef.h
-         JSStringRefCF.h
-         JSTypedArray.h
-         JSValueRef.h
-         JavaScript.h
-         JavaScriptCore.h
-         OpaqueJSString.h
-         WebKitAvailability.h
-
-   Other files in Webkit:
-      weex_core/Source/android/jsengine/dependence:
-         OptionsCommon.cmake
-         OptionsJSCOnly.cmake
-
-   The copyright for files above is listed below:
-      weex_core/Source/android/jsengine/dependence/icu:
-         COPYRIGHT AND PERMISSION NOTICE
-
-         Copyright (c) 1995-2006 International Business Machines Corporation 
and others
-
-         All rights reserved.
-
-         Permission is hereby granted, free of charge, to any person obtaining 
a copy of this
-         software and associated documentation files (the "Software"), to deal 
in the Software
-         without restriction, including without limitation the rights to use, 
copy, modify,
-         merge, publish, distribute, and/or sell copies of the Software, and 
to permit persons
-         to whom the Software is furnished to do so, provided that the above 
copyright notice(s)
-         and this permission notice appear in all copies of the Software and 
that both the above
-         copyright notice(s) and this permission notice appear in supporting 
documentation.
-
-         THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 
EXPRESS OR IMPLIED,
-         INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
FITNESS FOR A PARTICULAR
-         PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL 
THE COPYRIGHT HOLDER
-         OR HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY 
SPECIAL INDIRECT OR
-         CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS 
OF USE, DATA OR
-         PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 
TORTIOUS ACTION, ARISING
-         OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-
-         Except as contained in this notice, the name of a copyright holder 
shall not be used in
-         advertising or otherwise to promote the sale, use or other dealings 
in this Software
-         without prior written authorization of the copyright holder.
-      
-      weex_core/Source/include/JavaScriptCore:
-
-         /*
-         * Copyright (C) 2005, 2006, 2007, 2010 Apple Inc. All rights reserved.
-         * Copyright (C) 2006 Apple Inc.  All rights reserved.
-         * Copyright (C) 2006, 2007 Apple Inc. All rights reserved.
-         * Copyright (C) 2006, 2008 Apple Inc. All rights reserved.
-         * Copyright (C) 2006, 2008, 2016 Apple Inc. All rights reserved.
-         * Copyright (C) 2006-2016 Apple Inc. All rights reserved.
-         * Copyright (C) 2007 Apple Inc.  All rights reserved.
-         * Copyright (C) 2008 Apple Inc.  All rights reserved.
-         * Copyright (C) 2008, 2009, 2010, 2014 Apple Inc. All Rights Reserved.
-         * Copyright (C) 2009 Apple Inc.  All rights reserved.
-         * Copyright (C) 2010 Apple Inc. All rights reserved.
-         * Copyright (C) 2012 Apple Inc. All rights reserved.
-         * Copyright (C) 2013 Apple Inc. All rights reserved.
-         * Copyright (C) 2013, 2016 Apple Inc. All rights reserved.
-         * Copyright (C) 2013, 2017 Apple Inc. All rights reserved.
-         * Copyright (C) 2014 Apple Inc. All rights reserved.
-         * Copyright (C) 2015 Apple Inc.  All rights reserved.
-         * Copyright (C) 2015-2016 Apple Inc. All rights reserved.
-         * Copyright (C) 2016 Apple Inc. All rights reserved.
-         * Copyright (C) 2007 Eric Seidel <[email protected]>
-         * Copyright (C) 2007 Eric Seidel <[email protected]>
-         * Copyright (C) 2008 Alp Toker <[email protected]>
-         * Copyright (C) 2008 Kelvin W Sherlock ([email protected])
-         * Copyright (C) 2015 Dominic Szablewski ([email protected])
-         *
-         * Redistribution and use in source and binary forms, with or without
-         * modification, are permitted provided that the following conditions
-         * are met:
-         * 1. Redistributions of source code must retain the above copyright
-         *    notice, this list of conditions and the following disclaimer.
-         * 2. Redistributions in binary form must reproduce the above copyright
-         *    notice, this list of conditions and the following disclaimer in 
the
-         *    documentation and/or other materials provided with the 
distribution.
-         *
-         * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
-         * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-         * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-         * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
-         * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
SPECIAL,
-         * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-         * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-         * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
-         * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-         * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE 
USE
-         * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH 
DAMAGE. 
-         */
-
-         weex_core/Source/android/jsengine/dependence/bmalloc:
-
-         /*
-         * Copyright (C) 2007, 2008, 2011-2016 Apple Inc. All rights reserved.
-         * Copyright (C) 2012-2017 Apple Inc. All rights reserved.
-         * Copyright (C) 2014 Apple Inc. All rights reserved.
-         * Copyright (C) 2014, 2015 Apple Inc. All rights reserved.
-         * Copyright (C) 2014, 2016 Apple Inc. All rights reserved.
-         * Copyright (C) 2014-2016 Apple Inc. All rights reserved.
-         * Copyright (C) 2016 Apple Inc. All rights reserved.
-         *
-         * Redistribution and use in source and binary forms, with or without
-         * modification, are permitted provided that the following conditions
-         * are met:
-         * 1.  Redistributions of source code must retain the above copyright
-         *     notice, this list of conditions and the following disclaimer.
-         * 2.  Redistributions in binary form must reproduce the above 
copyright
-         *     notice, this list of conditions and the following disclaimer in 
the
-         *     documentation and/or other materials provided with the 
distribution.
-         *
-         * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS 
IS'' AND ANY
-         * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
IMPLIED
-         * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
ARE
-         * DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS BE 
LIABLE FOR ANY
-         * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 
DAMAGES
-         * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 
SERVICES;
-         * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 
CAUSED AND ON
-         * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR 
TORT
-         * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE 
USE OF THIS
-         * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-         */
-
 This product bundles files from Boost under "Boost Software License". For more 
details, reference http://www.boost.org/LICENSE_1_0.txt
   weex_core/Source/js_runtime/utils/base64.hpp
 
diff --git a/android/sdk/build.gradle b/android/sdk/build.gradle
index d1660f0..eb179e6 100755
--- a/android/sdk/build.gradle
+++ b/android/sdk/build.gradle
@@ -30,8 +30,8 @@ apply from: 'buildSrc/asan.gradle'
 apply from: 'buildSrc/jcenter.gradle'
 apply from: 'buildSrc/unstripped.gradle'
 apply from: 'buildSrc/checkStyle.gradle'
-apply from: 'buildSrc/packageName.gradle'
 apply from: 'buildSrc/download_jsc.gradle'
+apply from: 'buildSrc/packageName.gradle'
 
 version = project.hasProperty('weexVersion') ? 
project.getProperty('weexVersion') : '0.26.0.1'
 
@@ -284,5 +284,4 @@ task weex_core_license(type: 
com.hierynomus.gradle.license.tasks.LicenseFormat)
                      'Source/include/JavaScriptCore/**/*.cpp'])
 }
 
-preBuild.dependsOn copyAndRenameCppSourceFile, copyAndRenamePackage, 
copyManifest, copyProguard,
-        copyASanLib, checkNdkVersion, licenseFormat, copyJscToJniDir
\ No newline at end of file
+preBuild.dependsOn copyASanLib, checkNdkVersion, licenseFormat
\ No newline at end of file
diff --git a/android/sdk/buildSrc/download_jsc.gradle 
b/android/sdk/buildSrc/download_jsc.gradle
index 229c12d..fdb7ad0 100644
--- a/android/sdk/buildSrc/download_jsc.gradle
+++ b/android/sdk/buildSrc/download_jsc.gradle
@@ -25,11 +25,16 @@ task download(){
 task unzipJSC(type: Copy, dependsOn: download) {
     from jsc_file.name.endsWith(".aar") ? jsc_file : tarTree(jsc_file)
     into jsc_dir
-    include "**/*${aar_name}*.aar"
+    include "**/*${aar_name}*.aar", '**/include/*.h'
     includeEmptyDirs false
     eachFile {
-        it.path = it.name
-        it.name = "${aar_name}.aar"
+        if(it.name.endsWith('.aar')) {
+            it.path = it.name
+            it.name = "${aar_name}.aar"
+        }
+        else if(it.name.endsWith('.h')){
+            it.path= 'include/' + it.name
+        }
     }
     inputs.file(jsc_file)
     outputs.file(aar_file)
@@ -53,5 +58,16 @@ task copyJscToJniDir(type: Copy, dependsOn: unzipJSC) {
         it.relativePath = new RelativePath(true, path_list[0], path_list[1])
     }
     inputs.file(aar_file)
-    outputs.dir(libsDir)
-}
\ No newline at end of file
+    outputs.upToDateWhen {false}
+}
+
+task copyJSCHeaderToWeexCore(type: Copy, dependsOn: unzipJSC) {
+    from new File(jsc_dir, 'include')
+    into '../../weex_core/Source/include/JSCHeaderNew/JavaScriptCore'
+    includeEmptyDirs false
+    inputs.dir(new File(jsc_dir, 'include'))
+    outputs.upToDateWhen {false}
+}
+
+preBuild.dependsOn copyJscToJniDir, copyJSCHeaderToWeexCore
+clean.dependsOn cleanCopyJscToJniDir, cleanCopyJSCHeaderToWeexCore
\ No newline at end of file
diff --git a/android/sdk/buildSrc/packageName.gradle 
b/android/sdk/buildSrc/packageName.gradle
index d03cca7..cae55df 100644
--- a/android/sdk/buildSrc/packageName.gradle
+++ b/android/sdk/buildSrc/packageName.gradle
@@ -1,5 +1,6 @@
 task copyAndRenamePackage(type: Copy) {
     if(!project.useApachePackageName) {
+        inputs.dir new File('src/main/java/org/apache/weex')
         from new File('src/main/java/org/apache/weex')
         into new File('src/legacyRelease/java/com/taobao/weex')
         filter { String line ->
@@ -16,6 +17,7 @@ task copyAndRenamePackage(type: Copy) {
 
 task copyManifest(type: Copy){
     if(!project.useApachePackageName){
+        inputs.file new File('src/main/AndroidManifest.xml')
         from new File('src/main/AndroidManifest.xml')
         into new File('src/legacyRelease')
         filter { String line ->
@@ -28,6 +30,7 @@ task copyManifest(type: Copy){
 
 task copyProguard(type: Copy){
     if(!project.useApachePackageName){
+        inputs.file new File('proguard-rules.pro')
         from new File('proguard-rules.pro')
         into new File('.')
         rename 'proguard-rules.pro', 'proguard-rules-legacy.pro'
@@ -39,16 +42,23 @@ task copyProguard(type: Copy){
     }
 }
 
+task(cleanCopyProguard, overwrite: true, type: Delete){
+    delete 'proguard-rules-legacy.pro'
+}
+
 task copyOtherCppFile(type: Copy){
     if(!project.useApachePackageName) {
+        inputs.dir new File('../../weex_core')
         from new File('../../weex_core')
         into new File('src/legacyRelease/cpp')
         exclude '**/*.cpp', '**/*.cc', '**/*.c', '**/*.h', '**/*.hpp'
     }
 }
 
-task copyAndRenameCppSourceFile(type: Copy, dependsOn: copyOtherCppFile){
+task copyAndRenameCppSourceFile(type: Copy){
+    dependsOn copyOtherCppFile, copyJSCHeaderToWeexCore
     if(!project.useApachePackageName) {
+        inputs.dir new File('../../weex_core')
         from new File('../../weex_core')
         into new File('src/legacyRelease/cpp')
         include '**/*.cpp', '**/*.cc', '**/*.c', '**/*.h', '**/*.hpp'
@@ -68,4 +78,7 @@ gradle.taskGraph.beforeTask { Task task ->
     else if(task.name == 'assembleLegacyRelease'){
         throw new StopActionException('Not Supported. assembleLegacyRelease is 
not supported, please use the following command instead.\n assembleRelease 
-PapachePackageName="false"')
     }
-}
\ No newline at end of file
+}
+
+preBuild.dependsOn copyAndRenameCppSourceFile, copyAndRenamePackage, 
copyManifest, copyProguard
+clean.dependsOn cleanCopyAndRenamePackage, cleanCopyManifest, 
cleanCopyProguard, cleanCopyOtherCppFile, cleanCopyAndRenameCppSourceFile
\ No newline at end of file
diff --git a/scripts/release_files.rules b/scripts/release_files.rules
index 35c6987..1562aa0 100644
--- a/scripts/release_files.rules
+++ b/scripts/release_files.rules
@@ -53,13 +53,10 @@
 - weex_core/Source/base/android/jniprebuild/jni_files
 - weex_core/Source/base/android/jniprebuild/jni_generator.py
 - weex_core/Source/base/android/jniprebuild/prebuild.sh
-+ /weex_core/Source/include/JavaScriptCore/API/
-+ /weex_core/Source/include/JavaScriptCore/API/**
-+ /weex_core/Source/include/JavaScriptCore/ForwardingHeaders/
-+ /weex_core/Source/include/JavaScriptCore/ForwardingHeaders/JavaScriptCore/
-+ /weex_core/Source/include/JavaScriptCore/ForwardingHeaders/JavaScriptCore/**
-- /weex_core/Source/include/JavaScriptCore/**
+- /weex_core/Source/android/jsengine/dependence/
+- /weex_core/Source/include/JavaScriptCore/
 - /weex_core/Source/include/wtf/
+- /weex_core/Source/include/JSCHeaderNew/JavaScriptCore/
 + /weex_core
 + /weex_core/CMakeLists.txt
 + /weex_core/Source
diff --git a/weex_core/.gitignore b/weex_core/.gitignore
index ba15c87..766f1a1 100644
--- a/weex_core/.gitignore
+++ b/weex_core/.gitignore
@@ -3,3 +3,5 @@ build32/
 build64/
 cmake-build-debug
 cscope.out
+
+/Source/include/JSCHeaderNew/JavaScriptCore
\ No newline at end of file
diff --git a/weex_core/Source/js_runtime/CMakeLists.txt 
b/weex_core/Source/js_runtime/CMakeLists.txt
index 51f8e6d..139209a 100644
--- a/weex_core/Source/js_runtime/CMakeLists.txt
+++ b/weex_core/Source/js_runtime/CMakeLists.txt
@@ -86,8 +86,7 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)
 
 include_directories(${WEEX_CORE_SOURCE_DIR})
 include_directories(${WEEX_CORE_SOURCE_DIR}/include)
-include_directories(${WEEX_CORE_SOURCE_DIR}/include/JavaScriptCore)
-include_directories(${WEEX_CORE_SOURCE_DIR}/include/JavaScriptCore/ForwardingHeaders)
+include_directories(${WEEX_CORE_SOURCE_DIR}/include/JSCHeaderNew)
 
 
 

Reply via email to