diff --git a/base_sdk/BUILD.gn b/base_sdk/BUILD.gn index e7bf7a8cc3d937e3be925cbec191d1328c7192f0..1da4bed5fbd2093b9bb61a4fcdce94aea86acda6 100644 --- a/base_sdk/BUILD.gn +++ b/base_sdk/BUILD.gn @@ -36,6 +36,7 @@ generate_static_abc("base_transfer") { files = [ "./transfer/@ohos.transfer.ets", "./transfer/register.ets", + "./transfer/kitRegister/abilitykit.ets", "./transfer/kitRegister/arkts.ets", "./transfer/kitRegister/registerMain.ets", "./transfer/kitRegister/arkui.ets", diff --git a/base_sdk/transfer/kitRegister/abilitykit.ets b/base_sdk/transfer/kitRegister/abilitykit.ets new file mode 100644 index 0000000000000000000000000000000000000000..03550f355e2dbfdaf88724e924851ee6bdc515f0 --- /dev/null +++ b/base_sdk/transfer/kitRegister/abilitykit.ets @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * 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. + */ +import { registerStaticCB, registerDynamicCB } from '../register.ets'; + +export function registerAbilityKit() { + registerStaticCB('AbilityKit.UIAbilityContext', 'application.UIAbilityContext', 'UIAbilityContext', 'transferStatic'); + registerDynamicCB('AbilityKit.UIAbilityContext', 'application.UIAbilityContext', 'UIAbilityContext', 'transferDynamic'); + + registerStaticCB('AbilityKit.Context', 'application.Context', 'Context', 'transferStatic'); + registerDynamicCB('AbilityKit.Context', 'application.Context', 'Context', 'transferDynamic'); + + registerStaticCB('AbilityKit.ApplicationContext', 'application.ApplicationContext', 'ApplicationContext', 'transferStatic'); + registerDynamicCB('AbilityKit.ApplicationContext', 'application.ApplicationContext', 'ApplicationContext', 'transferDynamic'); + + registerStaticCB('AbilityKit.AbilityStageContext', 'application.AbilityStageContext', 'AbilityStageContext', 'transferStatic'); + registerDynamicCB('AbilityKit.AbilityStageContext', 'application.AbilityStageContext', 'AbilityStageContext', 'transferDynamic'); +} diff --git a/base_sdk/transfer/kitRegister/registerMain.ets b/base_sdk/transfer/kitRegister/registerMain.ets index 8320f58bbd9671036d2ea2f06452eff13ce6cb25..c0bd9b74523b0561f194c9701d73a2bb16e389ed 100644 --- a/base_sdk/transfer/kitRegister/registerMain.ets +++ b/base_sdk/transfer/kitRegister/registerMain.ets @@ -12,10 +12,13 @@ * See the License for the specific language governing permissions and * limitations under the License. */ + import { registerArkTS } from './arkts.ets'; import { registerArkUI } from './arkui.ets'; +import { registerAbilityKit } from './abilitykit.ets'; export function registerMain(){ registerArkTS(); registerArkUI(); + registerAbilityKit(); } \ No newline at end of file