diff --git a/ohos/app/app.gni b/ohos/app/app.gni index 7a0907587e7ca13904610dc9a89678edc3fdd51f..7395f444f7c6abd1e0fd8020e4aada7b82712441 100644 --- a/ohos/app/app.gni +++ b/ohos/app/app.gni @@ -464,11 +464,6 @@ template("ohos_app") { product = invoker.product } - module_target = "default" - if (defined(invoker.module_target)) { - module_target = invoker.module_target - } - if (defined(invoker.deps)) { deps += invoker.deps } diff --git a/ohos/app/app_internal.gni b/ohos/app/app_internal.gni index e24f78272631ee22c150e0e6fadccaf46b64adde..ff699a76e00cb8bdb3b3094a2eac44f9a9cefc47 100644 --- a/ohos/app/app_internal.gni +++ b/ohos/app/app_internal.gni @@ -616,7 +616,6 @@ template("compile_app") { "build_modules", "hvigor_home", "product", - "module_target", ]) script = "//build/scripts/compile_app.py" outputs = [ unsigned_hap_path_list ] @@ -636,8 +635,6 @@ template("compile_app") { ohpm_registry, "--product", product, - "--module-target", - module_target, ] if (defined(hvigor_home) && hvigor_home != "") { diff --git a/scripts/compile_app.py b/scripts/compile_app.py index c128e3b38db12b1b0548a853732594b6126bd67a..347dbd523d3123ecb046dc670782cf4102436162 100755 --- a/scripts/compile_app.py +++ b/scripts/compile_app.py @@ -55,7 +55,6 @@ def parse_args(args): parser.add_argument('--target-out-dir', help='base output dir') parser.add_argument('--target-app-dir', help='target output dir') parser.add_argument('--product', help='set product value of hvigor cmd, default or others') - parser.add_argument('--module-target', help='set module target of unsigned hap path') options = parser.parse_args(args) return options @@ -147,14 +146,13 @@ def get_unsigned_hap_path(project_name: str, src_path: str, cwd: str, options): unsigned_hap_path = os.path.join( cwd, src_path, 'build/default/outputs/ohosTest') else: - module_target = options.module_target if options.target_app_dir and ((hvigor_version and float(hvigor_version[:3]) > 4.1) or model_version): new_src_path = os.path.join(options.target_out_dir, options.target_app_dir, project_name, src_path) unsigned_hap_path = os.path.join( - new_src_path, f'build/{product_value}/outputs/{module_target}') + new_src_path, f'build/{product_value}/outputs/default') else: unsigned_hap_path = os.path.join( - cwd, src_path, f'build/{product_value}/outputs/{module_target}') + cwd, src_path, f'build/{product_value}/outputs/default') return unsigned_hap_path @@ -171,8 +169,6 @@ def gen_unsigned_hap_path_json(build_profile: str, cwd: str, options): build_info = json5.load(input_f) modules_list = build_info.get('modules') for module in modules_list: - if module.get('name') not in options.build_modules and not options.test_hap: - continue src_path = module.get('srcPath') project_name = options.build_profile.replace("/build-profile.json5", "").split("/")[-1] unsigned_hap_path = get_unsigned_hap_path(project_name, src_path, cwd, options)