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

Commit

Permalink
[Android] Download JSC header files from remote during compiling (#2960)
Browse files Browse the repository at this point in the history
* [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 f489607.

* Add log

* Fix clean problem.

* Fix task dependency problem

* Fix cleanCopyProguard problem
  • Loading branch information
YorkShen authored and lucky-chen committed Oct 12, 2019
1 parent 739e07f commit 685ec8a
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 317 deletions.
299 changes: 0 additions & 299 deletions LICENSE
Expand Up @@ -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 <eric@webkit.org>
* Copyright (C) 2007 Eric Seidel <eric@webkit.org>
* Copyright (C) 2008 Alp Toker <alp@atoker.com>
* Copyright (C) 2008 Kelvin W Sherlock (ksherlock@gmail.com)
* Copyright (C) 2015 Dominic Szablewski (dominic@phoboslab.org)
*
* 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

Expand Down
5 changes: 2 additions & 3 deletions android/sdk/build.gradle
Expand Up @@ -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'

Expand Down Expand Up @@ -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
preBuild.dependsOn copyASanLib, checkNdkVersion, licenseFormat
26 changes: 21 additions & 5 deletions android/sdk/buildSrc/download_jsc.gradle
Expand Up @@ -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)
Expand All @@ -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)
}
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

0 comments on commit 685ec8a

Please sign in to comment.