diff --git a/BUILD.gn b/BUILD.gn index 620ec4c0958f6c6bc3d9af689f8e7d9754be1f76..852d27a29d06b3a52aec588d3c7106c7c1273377 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -12,7 +12,6 @@ # limitations under the License. import("//build/ohos.gni") -import("//foundation/arkui/ace_engine/ace_config.gni") prebuilt_js_path = get_label_info(":gen_snapshot", "target_out_dir") + "/dist/strip.native.min.js" @@ -28,7 +27,6 @@ action("gen_node_modules") { } action("gen_snapshot") { - deps = [ "//third_party/css-what:css_what_sources" ] script = "//third_party/jsframework/js_framework_build.sh" js_framework = "//third_party/jsframework/runtime" @@ -50,7 +48,16 @@ action("gen_snapshot") { eslint = "//third_party/jsframework/.eslintrc" babel = "//third_party/jsframework/.babelrc" test_file = "//third_party/jsframework/test" - css_what = "//third_party/css-what" + css_what = "" + + if (ohos_indep_compiler_enable) { + external_deps = [ "css-what:css_what_sources" ] + css_what = "obj/binarys/third_party/css-what/innerapis/css_what_sources/src" + is_indep_compiler = "true" + } else { + deps = [ "//third_party/css-what:css_what_sources" ] + is_indep_compiler = "false" + } args = [ rebase_path(nodejs_path, root_build_dir), @@ -65,7 +72,8 @@ action("gen_snapshot") { is_mac, rebase_path("//prebuilts", root_build_dir), rebase_path(buildfile_native_min, root_build_dir), - rebase_path(css_what, root_build_dir), + css_what, + is_indep_compiler ] inputs = [ @@ -263,5 +271,6 @@ ohos_prebuilt_etc("ark_build") { source = ark_abc_path if (!is_arkui_x) { part_name = "jsframework" + subsystem_name = "thirdparty" } } diff --git a/bundle.json b/bundle.json index cf195612e0c84c14234f54a07b77d4b09e948018..e85fba4d6e34374de2cd6c2633438be7eb6dc801 100644 --- a/bundle.json +++ b/bundle.json @@ -20,7 +20,9 @@ "rom": "", "ram": "", "deps": { - "components": [], + "components": [ + "css-what" + ], "third_party": [] }, "build": { diff --git a/js_framework_build.sh b/js_framework_build.sh index 95192d6a9c1d9431e9c3151b64685d6088618d41..850127c3650271acfa3ddf67e2e1fa4d49a41537 100755 --- a/js_framework_build.sh +++ b/js_framework_build.sh @@ -18,6 +18,10 @@ prebuilts_path=${11} # copy dependency file to generate dir of gn # the params come from .gn +if [ "${14}" == 'true' ];then + rm -rf $2/src +fi + # copy runtime to target out, and runtime/css-what is solt link, copy it always follow symbolic links in SOURCE if [ "${10}" == 'true' ];then cp -R -L $2 $8 @@ -25,6 +29,10 @@ else cp -r -L $2 $8 fi +if [ "${14}" == 'true' ];then + cp -r -L ${13} obj/third_party/jsframework/runtime +fi + # $2 => node $4 => node_modules cp -f $4 $8