adapt L0-L1 to bundle.json

Signed-off-by: winnieHu <huyu35@huawei.com>
This commit is contained in:
winnieHu 2022-03-10 20:45:35 +08:00
parent d7ea54521b
commit afc1a7df60
4 changed files with 50 additions and 50 deletions

View File

@ -11,41 +11,28 @@
# See the License for the specific language governing permissions and
# limitations under the License.
if (defined(ohos_lite)) {
import("//build/lite/config/component/lite_component.gni")
lite_component("deviceauth_lite") {
features = [ "services:deviceauth" ]
if (ohos_kernel_type == "linux" || ohos_kernel_type == "liteos_a") {
features += [
"services:deviceauth_service",
"services:deviceauth_sdk",
]
}
}
} else {
import("//build/ohos.gni")
import("deviceauth_env.gni")
import("//build/ohos.gni")
import("deviceauth_env.gni")
group("deviceauth_sdk_build") {
if (os_level == "standard" || os_level == "small") {
deps = [ "services:deviceauth_sdk" ]
}
}
group("deviceauth_service_build") {
if (os_level == "standard" || os_level == "small") {
deps = [ "services:deviceauth_service" ]
}
}
group("deviceauth_build") {
deps = [ "services:deviceauth" ]
}
group("deviceauth_test_build") {
if (os_level == "standard") {
testonly = true
deps = [ "test/unittest/deviceauth:deviceauth_llt" ]
}
group("deviceauth_sdk_build") {
if (os_level == "standard" || os_level == "small") {
deps = [ "services:deviceauth_sdk" ]
}
}
group("deviceauth_service_build") {
if (os_level == "standard" || os_level == "small") {
deps = [ "services:deviceauth_service" ]
}
}
group("deviceauth_build") {
deps = [ "services:deviceauth" ]
}
group("deviceauth_test_build") {
if (os_level == "standard") {
testonly = true
deps = [ "test/unittest/deviceauth:deviceauth_llt" ]
}
}

View File

@ -45,7 +45,8 @@
"sub_component": [
"//base/security/deviceauth:deviceauth_sdk_build",
"//base/security/deviceauth:deviceauth_service_build",
"//base/security/deviceauth:deviceauth_build"
"//base/security/deviceauth:deviceauth_build",
"//base/security/deviceauth/frameworks/deviceauth_lite:hichainsdk"
],
"inner_kits": [
{
@ -60,7 +61,8 @@
}
],
"test": [
"//base/security/deviceauth:deviceauth_test_build"
"//base/security/deviceauth:deviceauth_test_build",
"//base/security/deviceauth/frameworks/deviceauth_lite:deviceauth_lite_test_build"
]
}
}

22
frameworks/deviceauth_lite/BUILD.gn Executable file → Normal file
View File

@ -13,13 +13,21 @@
# limitations under the License.
#
import("//build/lite/config/component/lite_component.gni")
import("//build/ohos.gni")
lite_component("hichainsdk") {
features = [
"//base/security/deviceauth/frameworks/deviceauth_lite/source:hichainsdk",
]
if (ohos_build_type == "debug" && ohos_kernel_type == "liteos_a") {
features += [ "//base/security/deviceauth/frameworks/deviceauth_lite/unittest:deviceauth_test" ]
group("hichainsdk") {
deps = []
if (os_level == "mini" || os_level == "small") {
deps += [
"//base/security/deviceauth/frameworks/deviceauth_lite/source:hichainsdk",
]
}
}
group("deviceauth_lite_test_build") {
testonly = true
deps = []
if (os_level == "small") {
deps += [ "//base/security/deviceauth/frameworks/deviceauth_lite/unittest:deviceauth_test" ]
}
}

View File

@ -11,19 +11,15 @@
# See the License for the specific language governing permissions and
# limitations under the License.
if (defined(ohos_lite)) {
import("//build/lite/config/component/lite_component.gni")
} else {
import("//build/ohos.gni")
}
import("//base/security/deviceauth/deps_adapter/deviceauth_hals.gni")
import("//build/ohos.gni")
import("deviceauth.gni")
config("deviceauth_config") {
include_dirs = [ "//base/security/deviceauth/interfaces/innerkits" ]
}
include_dirs = inc_path + hals_inc_path
if (defined(ohos_lite)) {
if (os_level == "mini" || os_level == "small") {
static_library("deviceauth") {
public_configs = [ ":deviceauth_config" ]
include_dirs += [
@ -62,6 +58,13 @@ if (defined(ohos_lite)) {
}
}
if (os_level == "mini") {
group("deviceauth_sdk") {
}
group("deviceauth_service") {
}
}
if (ohos_kernel_type == "linux" || ohos_kernel_type == "liteos_a") {
executable("deviceauth_service") {
include_dirs += [