1/*
2 * Copyright (c) 2024 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 *     http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16package ohos;
17
18/**
19 * ModuleJsonInfo
20 *
21 * @since 2024-06-18
22 */
23public class ModuleJsonInfo {
24    private String moduleType = "";
25    private String moduleName = "";
26    private boolean compressNativeLibs = false;
27    private boolean generateBuildHash = false;
28
29    public String getModuleType() {
30        return moduleType;
31    }
32
33    public void setModuleType(String moduleType) {
34        this.moduleType = moduleType;
35    }
36
37    public String getModuleName() {
38        return moduleName;
39    }
40
41    public void setModuleName(String moduleName) {
42        this.moduleName = moduleName;
43    }
44
45    public boolean isCompressNativeLibs() {
46        return compressNativeLibs;
47    }
48
49    public void setCompressNativeLibs(boolean compressNativeLibs) {
50        this.compressNativeLibs = compressNativeLibs;
51    }
52
53    public boolean isGenerateBuildHash() {
54        return generateBuildHash;
55    }
56
57    public void setGenerateBuildHash(boolean generateBuildHash) {
58        this.generateBuildHash = generateBuildHash;
59    }
60
61    /**
62     * check the module type is shared or not
63     *
64     * @return true if module type is shared
65     */
66    public boolean isShared() {
67        return moduleType != null && moduleType.equals(Constants.TYPE_SHARED);
68    }
69}
70