Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(framework): adjust the directory structure for the framework #2349

Merged
merged 40 commits into from
Aug 11, 2022
Merged
Show file tree
Hide file tree
Changes from 22 commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
c80235e
feat(framework): adjust the directory structure for the framework
churchill-zhang Aug 1, 2022
701bdf6
feat(driver): modify turbo compilation macros
churchill-zhang Aug 4, 2022
bdee9e7
refactor(ios): refactor ios demo
ozonelmy Aug 4, 2022
e736ed1
refactor(ios): refactor ios demo
ozonelmy Aug 4, 2022
ff537b9
feat(framework): modify the framework directory structure
churchill-zhang Aug 5, 2022
c51f0c2
feat(android): move driver js file to framework
siguangli2018 Aug 5, 2022
63bcbfb
refactor(ios): remove unnessessary files
ozonelmy Aug 5, 2022
bff41b2
refactor(ios): add ignored config
ozonelmy Aug 5, 2022
f996046
feat(dom): revert change
churchill-zhang Aug 5, 2022
ae0883a
feat(driver): modify cmakelist dependencies
churchill-zhang Aug 5, 2022
2a10f4e
fix(android): change bunlde copy dir
siguangli2018 Aug 5, 2022
b38c7fe
Merge branch 'feature/framework' of https://github.com/churchill-zhan…
siguangli2018 Aug 5, 2022
4ba892e
feat(driver): remove driver.h
churchill-zhang Aug 5, 2022
c94ab3b
feat(framework): remove unnecessary codes
churchill-zhang Aug 5, 2022
f82186b
refactor(js,example): refactor js & demo structure
zoomchan-cxj Aug 8, 2022
6dde569
refactor(ios): apply file structure change
ozonelmy Aug 8, 2022
baf6027
Merge branch 'v3.0-dev' into feature/framework
churchill-zhang Aug 8, 2022
a23dc30
chore(license): add some js file license
zoomchan-cxj Aug 8, 2022
3126f29
fix(android): security codeql use hippy-framework
siguangli2018 Aug 9, 2022
00c87d3
feat(driver): add Apache License
churchill-zhang Aug 9, 2022
90150e4
feat(android): add Apache License
siguangli2018 Aug 9, 2022
dce7c99
Merge branch 'v3.0-dev' into feature/framework
siguangli2018 Aug 10, 2022
17f86cf
refactor(ios): remove personal profile config
ozonelmy Aug 10, 2022
2eb2904
feat(driver): add runtime slot
churchill-zhang Aug 10, 2022
aa405ba
Merge remote-tracking branch 'tencent/v3.0-dev' into feature/framework
omega-xiao Aug 11, 2022
a085ca3
feat(framework): rename package name
churchill-zhang Aug 11, 2022
c5c2508
fix(driver): remove ENABLE_TURBO for driver CMakeLists and add HasDat…
churchill-zhang Aug 11, 2022
49ac66e
refactor(ios): remove hippyrootviewmanager.mm in project
ozonelmy Aug 11, 2022
86572bb
refactor(ios): remove unnessessary xcode proj config
ozonelmy Aug 11, 2022
5dd8f2b
chore(ios): add unnessessary project config into gitignore
ozonelmy Aug 11, 2022
c1ec230
feat(core): refactor runtime
churchill-zhang Aug 11, 2022
c07ee57
fix(voltron): fix voltron
churchill-zhang Aug 11, 2022
6ec1da1
feat(core): refactor CMakeList
churchill-zhang Aug 11, 2022
6010154
feat(driver): refactor HasData
churchill-zhang Aug 11, 2022
eb92a69
fix(framework): fix comment errors
churchill-zhang Aug 11, 2022
97f4ad4
fix(driver): fix CMakeLists dep
churchill-zhang Aug 11, 2022
8efb293
fix(framework): fix compile errors
churchill-zhang Aug 11, 2022
5fe860e
fix(core): temp 1111111111
churchill-zhang Aug 11, 2022
d06018d
fix(base): fix unimplemented error
churchill-zhang Aug 11, 2022
418815d
fix(base): fix FOOTSTONE_UNIMPLEMENTED bug
churchill-zhang Aug 11, 2022
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
  •  
  •  
  •  
18 changes: 9 additions & 9 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,15 @@ CMakeLists.txt @medns
# dom related
/dom/ @churchill-zhang @ilikethese @medns

# js core related
/driver/js/core/ @churchill-zhang @ilikethese
/driver/js/core/js/ @zoomchan-cxj
# driver related
/driver/js/ @churchill-zhang @ilikethese
/driver/js/lib/ @zoomchan-cxj

# examples related
/driver/js/examples/android-demo/ @siguangli
/driver/js/examples/android-demo/res/ @zoomchan-cxj
/driver/js/examples/ios-demo/ @ozonelmy
/driver/js/examples/ios-demo/res/ @zoomchan-cxj
/framework/examples/android-demo/ @siguangli
/framework/examples/ios-demo/ @ozonelmy
/framework/examples/android-demo/res/ @zoomchan-cxj
/framework/examples/ios-demo/res/ @zoomchan-cxj
/driver/js/examples/hippy-react-demo/ @zoomchan-cxj
/driver/js/examples/hippy-vue-demo/ @zoomchan-cxj

Expand All @@ -64,7 +64,7 @@ CMakeLists.txt @medns
/layout/ @ilikethese @churchill-zhang

# android related
/driver/js/android/ @siguangli
/framework/android/ @siguangli
/renderer/native/android/ @siguangli
/gradle/ @siguangli
/gradle.properties @siguangli
Expand All @@ -74,7 +74,7 @@ CMakeLists.txt @medns
/setting.gradle @siguangli

# ios related
/driver/js/ios/ @ozonelmy
/framework/ios/ @ozonelmy
/renderer/native/ios/ @ozonelmy
/hippy.podspec @ozonelmy

Expand Down
5 changes: 3 additions & 2 deletions .github/license-check.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@
".github/**",
".husky/**",
"docs/**",
"driver/js/examples/android-demo/res/**",
"driver/js/examples/ios-demo/res/**",
"static/**",
"framework/examples/android-demo/res/**",
"framework/examples/ios-demo/res/**",
"driver/js/examples/hippy-**-demo/**",
"driver/js/flutter/example/**"
]
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/android_build_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@ on:
- v3.0-dev
- v3.0
paths:
- 'driver/js/android/**'
- 'driver/js/core/**'
- 'framework/android/**'
- 'driver/js/lib/**'
- 'driver/js/src/**'
- 'driver/js/include/**'
- 'driver/js/CMakeLists.txt'
- 'dom/**'
- 'layout/engine/**'
- 'modules/android/**'
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/android_build_tests_bypass.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@ on:
- v3.0-dev
- v3.0
paths-ignore:
- 'driver/js/android/**'
- 'driver/js/core/**'
- 'framework/android/**'
- 'driver/js/lib/**'
- 'driver/js/src/**'
- 'driver/js/include/**'
- 'driver/js/CMakeLists.txt'
- 'dom/**'
- 'layout/engine/**'
- 'modules/android/**'
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/frontend_build_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@ on:
paths:
- 'driver/js/packages/**'
- 'driver/js/examples/hippy-*-demo/**'
- 'driver/js/core/js/**/*.js'
- 'driver/js/lib/**/*.js'
- 'driver/js/scripts/**/*.js'
- 'package*.json'
- 'scripts/**/*.js'
defaults:
run:
working-directory: driver/js
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/frontend_build_tests_bypass.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@ on:
paths-ignore:
- 'driver/js/packages/**'
- 'driver/js/examples/hippy-*-demo/**'
- 'driver/js/core/js/**/*.js'
- 'driver/js/lib/**/*.js'
- 'driver/js/scripts/**/*.js'
- 'package*.json'
- 'scripts/**/*.js'
jobs:
frontend_build_tests:
runs-on: ubuntu-latest
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/ios_build_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@ on:
- v3.0-dev
- v3.0
paths:
- 'driver/js/ios/**'
- 'driver/js/core/**'
- 'framework/ios/**'
- 'driver/js/lib/**'
- 'driver/js/src/**'
- 'driver/js/include/**'
- 'driver/js/CMakeLists.txt'
- 'dom/**'
- 'layout/engine/**'
- 'modules/ios/**'
Expand All @@ -28,4 +31,4 @@ jobs:
lfs: true
- name: Build
run: |
pushd driver/js/examples/ios-demo && pod install && xcodebuild build -destination 'name=iPhone 11' -scheme 'HippyDemo' -workspace 'HippyDemo.xcworkspace' && popd
pushd framework/examples/ios-demo && pod install && xcodebuild build -destination 'name=iPhone 11' -scheme 'HippyDemo' -workspace 'HippyDemo.xcworkspace' && popd
7 changes: 5 additions & 2 deletions .github/workflows/ios_build_tests_bypass.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@ on:
- v3.0-dev
- v3.0
paths-ignore:
- 'driver/js/ios/**'
- 'driver/js/core/**'
- 'framework/ios/**'
- 'driver/js/lib/**'
- 'driver/js/src/**'
- 'driver/js/include/**'
- 'driver/js/CMakeLists.txt'
- 'dom/**'
- 'layout/engine/**'
- 'modules/ios/**'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/security_codeql_analyses.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ jobs:
- name: Build C++
if: steps.detect_languages.outputs.language == 'cpp'
run: |
./gradlew hippy-driver::buildCMakeRelease
./gradlew hippy-framework::buildCMakeRelease
- name: Perform CodeQL Analysis
if: steps.detect_languages.outputs.language
uses: github/codeql-action/analyze@v2
Expand Down
42 changes: 21 additions & 21 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,28 +22,28 @@ layout/cproject
layout/.project
layout/.settings

driver/js/android/maven-auth.properties
driver/js/android/local.properties
driver/js/android/.cxx/*
driver/js/android/libs/armeabi-v7a/libhippybridge.so
driver/js/android/libs/arm64-v8a/libhippybridge.so
driver/js/android/libs/x86/libhippybridge.so
driver/js/android/libs/x86_64/libhippybridge.so
driver/js/android/cmake-build-debug/*
driver/js/android/src/main/jni/.vs
driver/js/android/src/main/jni/cmake-build-debug/*
framework/android/maven-auth.properties
framework/android/local.properties
framework/android/.cxx/*
framework/android/libs/armeabi-v7a/libhippybridge.so
framework/android/libs/arm64-v8a/libhippybridge.so
framework/android/libs/x86/libhippybridge.so
framework/android/libs/x86_64/libhippybridge.so
framework/android/cmake-build-debug/*
framework/android/src/main/jni/.vs
framework/android/src/main/jni/cmake-build-debug/*

driver/js/examples/*/res/vendor-manifest.json
driver/js/examples/android-demo/src/main/assets/
driver/js/examples/android-demo/libs/*
driver/js/examples/android-demo/maven-auth.properties
driver/js/examples/android-demo/.cxx/
driver/js/examples/ios-demo/HippyDemo.xcodeproj/project.xcworkspace/xcuserdata/*
driver/js/examples/ios-demo/HippyDemo.xcodeproj/xcuserdata/*
driver/js/examples/ios-demo/HippyDemo.xcworkspace/*
driver/js/examples/ios-demo/Pods/*
driver/js/examples/ios-demo/Podfile.lock
driver/js/examples/ios-demo/devtools_backend/*
framework/examples/*/res/vendor-manifest.json
framework/examples/android-demo/src/main/assets/
framework/examples/android-demo/libs/*
framework/examples/android-demo/maven-auth.properties
framework/examples/android-demo/.cxx/
framework/examples/ios-demo/HippyDemo.xcodeproj/project.xcworkspace/xcuserdata/*
framework/examples/ios-demo/HippyDemo.xcodeproj/xcuserdata/*
framework/examples/ios-demo/HippyDemo.xcworkspace/*
framework/examples/ios-demo/Pods/*
framework/examples/ios-demo/Podfile.lock
framework/examples/ios-demo/devtools_backend/*

driver/js/packages/hippy-vue-loader/remote-debug-profile/*

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ For iOS, we recommend to use iOS simulator when first try. However, you can chan

3. Choose a demo to build with `npm run buildexample [hippy-react-demo|hippy-vue-demo]`.

4. Install CocoaPods with `brew install cocoapods`, install cmake with `brew install cmake`, and then configure CocoaPods dependencies with `pod install` at `driver/js/examples/ios-demo` directory.
4. Install CocoaPods with `brew install cocoapods`, install cmake with `brew install cmake`, and then configure CocoaPods dependencies with `pod install` at `framework/examples/ios-demo` directory.

5. Start the Xcode and build the iOS app with `open driver/js/examples/ios-demo/HippyDemo.xcworkspace`.
5. Start the Xcode and build the iOS app with `open framework/examples/ios-demo/HippyDemo.xcworkspace`.

> If `Step 2` throw error, you can `cd` to `driver/js/examples` hippy-react-demo or hippy-vue-demo, and run `npm install --legacy-peer-deps` to install demo dependencies first.
>
Expand Down
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ task clean(type: Delete) {
}

project.afterEvaluate {
delete 'driver/js/examples/android-demo/src/main/assets'
delete 'framework/examples/android-demo/src/main/assets'
copy{
from "driver/js/examples/android-demo/res"
into "driver/js/examples/android-demo/src/main/assets"
from "framework/examples/android-demo/res"
into "framework/examples/android-demo/src/main/assets"
}
}
2 changes: 1 addition & 1 deletion buildconfig/cmake/GlobalPackagesModule.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ endfunction()

function(GlobalPackages_Add_jni)
if (NOT TARGET jni)
InfraPackage_Add(JNI
InfraPackage_Add(COMMON_JNI
LOCAL "${PROJECT_ROOT_DIR}/modules/android/jni")
endif()
endfunction()
Expand Down
20 changes: 20 additions & 0 deletions commitlint.config.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
/*
* Tencent is pleased to support the open source community by making
* Hippy available.
*
* Copyright (C) 2017-2022 THL A29 Limited, a Tencent company.
* All rights reserved.
*
* Licensed 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.
*/

/* eslint-disable no-control-regex */
function asciiAndEmojiCheck(message) {
const asciiAndEmojiReg = /^((\ud83c[\udf00-\udfff])|(\ud83d[\udc00-\ude4f\ude80-\udeff])|[\u2600-\u2B55]|[\x00-\xff])*$/i;
Expand Down
5 changes: 0 additions & 5 deletions dom/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,6 @@ GlobalPackages_Add(footstone)
target_link_libraries(${PROJECT_NAME} PRIVATE footstone)
# endregion

# region core base
# TODO: will be removed when the JNI library is complete
target_include_directories(${PROJECT_NAME} PRIVATE ${PROJECT_ROOT_DIR}/driver/js/core/include)
# endregion

# region layout engine
if (NOT DEFINED LAYOUT_ENGINE)
set(LAYOUT_ENGINE "Taitank")
Expand Down
1 change: 0 additions & 1 deletion driver/js/.eslintignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
node_modules*
docs/
dist/
coverage
packages/hippy-vue/types
Expand Down
20 changes: 20 additions & 0 deletions driver/js/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
/*
* Tencent is pleased to support the open source community by making
* Hippy available.
*
* Copyright (C) 2017-2022 THL A29 Limited, a Tencent company.
* All rights reserved.
*
* Licensed 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.
*/

const path = require('path');

function resolveVue(p) {
Expand Down
26 changes: 7 additions & 19 deletions driver/js/core/CMakeLists.txt → driver/js/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@

cmake_minimum_required(VERSION 3.14)

project("core")
project("js_driver")

get_filename_component(PROJECT_ROOT_DIR "${PROJECT_SOURCE_DIR}/../../.." REALPATH)
get_filename_component(PROJECT_ROOT_DIR "${PROJECT_SOURCE_DIR}/../.." REALPATH)

include("${PROJECT_ROOT_DIR}/buildconfig/cmake/GlobalPackagesModule.cmake")
include("${PROJECT_ROOT_DIR}/buildconfig/cmake/compiler_toolchain.cmake")
Expand All @@ -38,6 +38,9 @@ target_link_libraries(${PROJECT_NAME} PRIVATE android log)
if (ENABLE_INSPECTOR)
target_compile_definitions(${PROJECT_NAME} PUBLIC "ENABLE_INSPECTOR")
endif ()
if (ENABLE_TURBO)
target_compile_definitions(${PROJECT_NAME} PUBLIC "ENABLE_TURBO")
endif ()
# endregion

# region vm
Expand All @@ -61,16 +64,6 @@ GlobalPackages_Add(footstone)
target_link_libraries(${PROJECT_NAME} PRIVATE footstone)
# endregion

# region jni
GlobalPackages_Add(jni)
target_link_libraries(${PROJECT_NAME} PRIVATE jni)
# endregion

# region jni common
# TODO: will be removed when the JNI library is complete
target_include_directories(${PROJECT_NAME} PRIVATE ${PROJECT_ROOT_DIR}/driver/js/android/src/main/jni/include)
# endregion

# region devtools
if (ENABLE_INSPECTOR)
add_subdirectory(${PROJECT_ROOT_DIR}/devtools/devtools-backend ${CMAKE_CURRENT_BINARY_DIR}/devtools/devtools-backend)
Expand All @@ -79,13 +72,8 @@ endif ()
# endregion

# region dom
add_subdirectory(${PROJECT_ROOT_DIR}/dom ${CMAKE_CURRENT_BINARY_DIR}/dom)
target_link_libraries(${PROJECT_NAME} PUBLIC dom)
# endregion

# region native renderer
add_subdirectory(${PROJECT_ROOT_DIR}/renderer/native/android/src/main/jni ${CMAKE_CURRENT_BINARY_DIR}/renderer/native)
target_link_libraries(${PROJECT_NAME} PUBLIC native_renderer)
GlobalPackages_Add(dom)
target_include_directories(${PROJECT_NAME} PRIVATE ${PROJECT_ROOT_DIR}/dom/include)
# endregion

# region source set
Expand Down

This file was deleted.

This file was deleted.

Loading