• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2021-2023 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 
16 package ohos;
17 
18 import java.io.Closeable;
19 import java.io.File;
20 import java.io.IOException;
21 import java.util.ArrayList;
22 import java.util.List;
23 import java.util.Locale;
24 
25 /**
26  * common resource.
27  *
28  */
29 public class Utility {
30     static final String MODE_HAP = "hap";
31     static final String MODE_HAR = "har";
32     static final String MODE_APP = "app";
33     static final String MODE_FAST_APP = "fastApp";
34     static final String MODE_MULTI_APP = "multiApp";
35     static final String MODE_HQF = "hqf";
36     static final String MODE_APPQF = "appqf";
37     static final String MODE_RES = "res";
38     static final String MODE_HSP = "hsp";
39     static final String MODE_HAPADDITION = "hapAddition";
40     static final String VERSION_NORMALIZE = "versionNormalize";
41     static final String PACKAGE_NORMALIZE = "packageNormalize";
42     static final String FALSE_STRING = "false";
43     static final String TRUE_STRING = "true";
44 
45     private static final String INVALID_PATH = "invalid";
46     private static final String CMD_PREFIX = "--";
47     private static final Log LOG = new Log(Utility.class.toString());
48 
49     private String mode = "";
50     private String jsonPath = "";
51     private String profilePath = "";
52     private String soPath = "";
53     private String soDir = "";
54     private String abilitySoPath = "";
55     private String dexPath = "";
56     private String abcPath = "";
57     private String indexPath = "";
58     private String hapPath = "";
59     private String appPath = "";
60     private String libPath = "";
61     private String resPath = "";
62     private String resourcesPath = "";
63     private String assetsPath = "";
64     private String apkPath = "";
65     private String certificatePath = "";
66     private String signaturePath = "";
67     private String forceRewrite = "false";
68     private String outPath = "";
69     private String packInfoPath = "";
70     private String encryptPath = "";
71     private String binPath = "";
72     private boolean isCompressNativeLibs = false;
73     private String moduleName = "";
74     private String harPath = "";
75     private String hspPath = "";
76     private String jarPath = "";
77     private String txtPath = "";
78     private String parseMode = "";
79     private String deviceType = "";
80     private String hapName = "";
81     private String sharedLibsPath = "";
82     private String unpackApk = "false";
83     private String unpackCutEntryApk = "false";
84     private String entryCardPath = "";
85     private String packRes = "";
86     private String packResPath = "";
87     private String filePath = "";
88     private String jsPath = "";
89     private String etsPath = "";
90     private String hnpPath = "";
91     private String rpcidPath = "";
92     private int VersionCode = -1;
93     private String VersionName = "";
94     private boolean isModuleJson = false;
95     private String rpcid = FALSE_STRING;
96     private String libs = FALSE_STRING;
97     private String cpuAbi = "";
98     private boolean isParse = false;
99     private String appqfPath = "";
100     private String anPath = "";
101     private String apPath = "";
102     private Boolean isSharedApp = false;
103     private Boolean isAppService = false;
104     private String mainModuleLimit = "";
105     private String normalModuleLimit = "";
106     private String totalLimit = "";
107     private int compressLevel = 1;
108     private String pkgContextPath = "";
109     private String bundleName = "";
110     private String absoluteHapPath = "";
111     private boolean generateBuildHash = false;
112     private boolean buildHashFinish = false;
113 
114     private List<String> formattedCpuAbiList = new ArrayList<>();
115     private List<String> formattedSoPathList = new ArrayList<>();
116     private List<String> formattedAbilitySoPathList = new ArrayList<>();
117     private List<String> formattedDexPathList = new ArrayList<>();
118     private List<String> formattedAbcPathList = new ArrayList<>();
119     private List<String> formattedHapPathList = new ArrayList<>();
120     private List<String> formattedHspPathList = new ArrayList<>();
121     private List<String> formattedApkPathList = new ArrayList<>();
122     private List<String> formattedJarPathList = new ArrayList<>();
123     private List<String> formattedTxtPathList = new ArrayList<>();
124     private List<String> formattedEntryCardPathList = new ArrayList<>();
125     private List<String> formNameList = new ArrayList<>();
126     private List<String> formattedAppList = new ArrayList<>();
127     private List<String> formattedHapList = new ArrayList<>();
128 
129     private List<String> formatedDirList = new ArrayList<>();
130 
131     private List<String> formatedHQFList = new ArrayList<>();
132     private List<String> formatedABCList = new ArrayList<>();
133 
134     private String appList = "";
135     private String hapList = "";
136     private String dirList = "";
137     private String hqfList = "";
138     private String hspList = "";
139     private String inputList = "";
140     private String input = "";
141     private boolean statDuplicate = false;
142     private boolean statSuffix = false;
143     private String statFileSize = "";
144 
setIsParse(boolean isParse)145     public void setIsParse(boolean isParse) {
146         this.isParse = isParse;
147     }
148 
getIsParse()149     public boolean getIsParse() {
150         return isParse;
151     }
152 
getMode()153     public String getMode() {
154         return mode;
155     }
156 
setMode(String mode)157     public void setMode(String mode) {
158         if (!mode.startsWith(CMD_PREFIX)) {
159             this.mode = mode;
160         }
161     }
162 
getJsonPath()163     public String getJsonPath() {
164         return jsonPath;
165     }
166 
setJsonPath(String jsonPath)167     public void setJsonPath(String jsonPath) {
168         if (!jsonPath.startsWith(CMD_PREFIX)) {
169             this.jsonPath = getFormattedPath(jsonPath);
170         }
171     }
172 
getProfilePath()173     public String getProfilePath() {
174         return profilePath;
175     }
176 
setProfilePath(String profilePath)177     public void setProfilePath(String profilePath) {
178         if (!profilePath.startsWith(CMD_PREFIX)) {
179             this.profilePath = getFormattedPath(profilePath);
180         }
181     }
182 
getSoPath()183     public String getSoPath() {
184         return soPath;
185     }
186 
setSoPath(String soPath)187     public void setSoPath(String soPath) {
188         if (!soPath.startsWith(CMD_PREFIX)) {
189             this.soPath = soPath;
190         }
191     }
192 
getAbilitySoPath()193     public String getAbilitySoPath() {
194         return abilitySoPath;
195     }
196 
setAbilitySoPath(String abilitySoPath)197     public void setAbilitySoPath(String abilitySoPath) {
198         if (!abilitySoPath.startsWith(CMD_PREFIX)) {
199             this.abilitySoPath = abilitySoPath;
200         }
201     }
202 
getSoDir()203     public String getSoDir() {
204         return soDir;
205     }
206 
setSoDir(String soDir)207     public void setSoDir(String soDir) {
208         if (!soDir.startsWith(CMD_PREFIX)) {
209             this.soDir = soDir;
210         }
211     }
212 
getDexPath()213     public String getDexPath() {
214         return dexPath;
215     }
216 
setDexPath(String dexPath)217     public void setDexPath(String dexPath) {
218         if (!dexPath.startsWith(CMD_PREFIX)) {
219             this.dexPath = dexPath;
220         }
221     }
222 
getAbcPath()223     public String getAbcPath() {
224         return abcPath;
225     }
226 
setAbcPath(String abcPath)227     public void setAbcPath(String abcPath) {
228         if (!abcPath.startsWith(CMD_PREFIX)) {
229             this.abcPath = abcPath;
230         }
231     }
232 
getABCList()233     public List<String> getABCList() {
234         return formatedABCList;
235     }
236 
getFilePath()237     public String getFilePath() {
238         return filePath;
239     }
240 
setFilePath(String filePath)241     public void setFilePath(String filePath) {
242         if (!filePath.startsWith(CMD_PREFIX)) {
243             this.filePath = filePath;
244         }
245     }
246 
getIndexPath()247     public String getIndexPath() {
248         return indexPath;
249     }
250 
setIndexPath(String indexPath)251     public void setIndexPath(String indexPath) {
252         if (!indexPath.startsWith(CMD_PREFIX)) {
253             this.indexPath = getFormattedPath(indexPath);
254         }
255     }
256 
getBinPath()257     public String getBinPath() {
258         return binPath;
259     }
260 
setBinPath(String binPath)261     public void setBinPath(String binPath) {
262         if (!binPath.startsWith(CMD_PREFIX)) {
263             this.binPath = getFormattedPath(binPath);
264         }
265     }
266 
setIsModuleJson(boolean isModuleJson)267     public void setIsModuleJson(boolean isModuleJson) {
268         this.isModuleJson = isModuleJson;
269     }
270 
getIsModuleJson()271     public boolean getIsModuleJson() {
272         return isModuleJson;
273     }
274 
isCompressNativeLibs()275     public boolean isCompressNativeLibs() {
276         return isCompressNativeLibs;
277     }
278 
setIsCompressNativeLibs(boolean isCompress)279     public void setIsCompressNativeLibs(boolean isCompress) {
280         this.isCompressNativeLibs = isCompress;
281     }
282 
getHapPath()283     public String getHapPath() {
284         return hapPath;
285     }
286 
setHapPath(String hapPath)287     public void setHapPath(String hapPath) {
288         if (!hapPath.startsWith(CMD_PREFIX)) {
289             this.hapPath = hapPath;
290             if (MODE_HAPADDITION.equals(this.getMode())) {
291                 this.absoluteHapPath = getFormattedPath(hapPath);
292             }
293         }
294     }
295 
getAppPath()296     public String getAppPath() {
297         return appPath;
298     }
299 
setAppPath(String appPath)300     public void setAppPath(String appPath) {
301         if (!appPath.startsWith(CMD_PREFIX)) {
302             this.appPath = appPath;
303         }
304     }
305 
getLibPath()306     public String getLibPath() {
307         return libPath;
308     }
309 
setLibPath(String libPath)310     public void setLibPath(String libPath) {
311         if (!libPath.startsWith(CMD_PREFIX)) {
312             this.libPath = getFormattedPath(libPath);
313         }
314     }
315 
getResPath()316     public String getResPath() {
317         return resPath;
318     }
319 
setResPath(String resPath)320     public void setResPath(String resPath) {
321         if (!resPath.startsWith(CMD_PREFIX)) {
322             this.resPath = getFormattedPath(resPath);
323         }
324     }
325 
getResourcesPath()326     public String getResourcesPath() {
327         return resourcesPath;
328     }
329 
setResourcesPath(String resourcesPath)330     public void setResourcesPath(String resourcesPath) {
331         if (!resourcesPath.startsWith(CMD_PREFIX)) {
332             this.resourcesPath = getFormattedPath(resourcesPath);
333         }
334     }
335 
getAssetsPath()336     public String getAssetsPath() {
337         return assetsPath;
338     }
339 
setAssetsPath(String assetsPath)340     public void setAssetsPath(String assetsPath) {
341         if (!assetsPath.startsWith(CMD_PREFIX)) {
342             this.assetsPath = getFormattedPath(assetsPath);
343         }
344     }
345 
getModuleName()346     public String getModuleName() {
347         if (moduleName == null) {
348             moduleName = "";
349         }
350         return moduleName;
351     }
352 
setModuleName(String moduleName)353     public void setModuleName(String moduleName) {
354         this.moduleName = moduleName;
355     }
356 
getApkPath()357     public String getApkPath() {
358         return apkPath;
359     }
360 
setApkPath(String apkPath)361     public void setApkPath(String apkPath) {
362         if (!apkPath.startsWith(CMD_PREFIX)) {
363             this.apkPath = apkPath;
364         }
365     }
366 
getCertificatePath()367     public String getCertificatePath() {
368         return certificatePath;
369     }
370 
setCertificatePath(String certificatePath)371     public void setCertificatePath(String certificatePath) {
372         if (!certificatePath.startsWith(CMD_PREFIX)) {
373             this.certificatePath = getFormattedPath(certificatePath);
374         }
375     }
376 
getSignaturePath()377     public String getSignaturePath() {
378         return signaturePath;
379     }
380 
setSignaturePath(String signaturePath)381     public void setSignaturePath(String signaturePath) {
382         if (!signaturePath.startsWith(CMD_PREFIX)) {
383             this.signaturePath = getFormattedPath(signaturePath);
384         }
385     }
386 
getForceRewrite()387     public String getForceRewrite() {
388         return forceRewrite;
389     }
390 
setForceRewrite(String forceRewrite)391     public void setForceRewrite(String forceRewrite) {
392         if (!forceRewrite.startsWith(CMD_PREFIX)) {
393             this.forceRewrite = forceRewrite.toLowerCase(Locale.ENGLISH);
394         }
395     }
396 
getOutPath()397     public String getOutPath() {
398         return outPath;
399     }
400 
setOutPath(String outPath)401     public void setOutPath(String outPath) {
402         if (!outPath.startsWith(CMD_PREFIX)) {
403             this.outPath = getFormattedPath(outPath);
404         }
405     }
406 
getPackInfoPath()407     public String getPackInfoPath() {
408         return packInfoPath;
409     }
410 
setPackInfoPath(String packInfoPath)411     public void setPackInfoPath(String packInfoPath) {
412         if (!packInfoPath.startsWith(CMD_PREFIX)) {
413             this.packInfoPath = getFormattedPath(packInfoPath);
414         }
415     }
416 
getEncryptPath()417     public String getEncryptPath() {
418         return encryptPath;
419     }
420 
setEncryptPath(String encryptPath)421     public void setEncryptPath(String encryptPath) {
422         if (!encryptPath.startsWith(CMD_PREFIX)) {
423             this.encryptPath = getFormattedPath(encryptPath);
424         }
425     }
426 
getJarPath()427     public String getJarPath() {
428         return jarPath;
429     }
430 
setJarPath(String jarPath)431     public void setJarPath(String jarPath) {
432         if (!jarPath.startsWith(CMD_PREFIX)) {
433             this.jarPath = jarPath;
434         }
435     }
436 
getTxtPath()437     public String getTxtPath() {
438         return txtPath;
439     }
440 
setTxtPath(String txtPath)441     public void setTxtPath(String txtPath) {
442         if (!txtPath.startsWith(CMD_PREFIX)) {
443             this.txtPath = txtPath;
444         }
445     }
446 
getHarPath()447     public String getHarPath() {
448         return harPath;
449     }
450 
setHarPath(String harPath)451     public void setHarPath(String harPath) {
452         if (!harPath.startsWith(CMD_PREFIX)) {
453             this.harPath = harPath;
454         }
455     }
456 
setHspPath(String hspPath)457     public void setHspPath(String hspPath) {
458         if (!hspPath.startsWith(CMD_PREFIX)) {
459             this.hspPath = hspPath;
460         }
461     }
462 
getHspPath()463     public String getHspPath() {
464         return hspPath;
465     }
466 
getParseMode()467     public String getParseMode() {
468         return parseMode;
469     }
470 
setParseMode(String parseMode)471     public void setParseMode(String parseMode) {
472         if (!parseMode.startsWith(CMD_PREFIX)) {
473             this.parseMode = parseMode;
474         }
475     }
476 
getDeviceType()477     public String getDeviceType() {
478         return deviceType;
479     }
480 
setDeviceType(String deviceType)481     public void setDeviceType(String deviceType) {
482         if (!deviceType.startsWith(CMD_PREFIX)) {
483             this.deviceType = deviceType;
484         }
485     }
486 
getUnpackApk()487     public String getUnpackApk() {
488         return unpackApk;
489     }
490 
setUnpackApk(String unpackApk)491     public void setUnpackApk(String unpackApk) {
492         this.unpackApk = unpackApk;
493     }
494 
getUnpackCutEntryApk()495     public String getUnpackCutEntryApk() {
496         return unpackCutEntryApk;
497     }
498 
setUnpackCutEntryApk(String unpackCutEntryApk)499     public void setUnpackCutEntryApk(String unpackCutEntryApk) {
500         this.unpackCutEntryApk = unpackCutEntryApk;
501     }
502 
getHapName()503     public String getHapName() {
504         return hapName;
505     }
506 
setHapName(String hapName)507     public void setHapName(String hapName) {
508         if (!hapName.startsWith(CMD_PREFIX)) {
509             this.hapName = hapName;
510         }
511     }
512 
getSharedLibsPath()513     public String getSharedLibsPath() {
514         return sharedLibsPath;
515     }
516 
setSharedLibsPath(String sharedLibsPath)517     public void setSharedLibsPath(String sharedLibsPath) {
518         if (!sharedLibsPath.startsWith(CMD_PREFIX)) {
519             this.sharedLibsPath = sharedLibsPath;
520         }
521     }
522 
getEntryCardPath()523     public String getEntryCardPath() {
524         return entryCardPath;
525     }
526 
setEntryCardPath(String entryCardPath)527     public void setEntryCardPath(String entryCardPath) {
528         if (!entryCardPath.startsWith(CMD_PREFIX)) {
529             this.entryCardPath = entryCardPath;
530         }
531     }
532 
getPackRes()533     public String getPackRes() {
534         return packRes;
535     }
536 
setPackRes(String packRes)537     public void setPackRes(String packRes) {
538         this.packRes = packRes;
539     }
540 
getPackResPath()541     public String getPackResPath() {
542         return packResPath;
543     }
544 
setPackResPath(String packResPath)545     public void setPackResPath(String packResPath) {
546         this.packResPath = packResPath;
547     }
548 
getJsPath()549     public String getJsPath() { return jsPath; }
550 
setJsPath(String jsPath)551     public void setJsPath(String jsPath) { this.jsPath = jsPath; }
552 
getEtsPath()553     public String getEtsPath() { return etsPath; }
554 
setEtsPath(String etsPath)555     public void setEtsPath(String etsPath) { this.etsPath = etsPath; }
556 
getHnpPath()557     public String getHnpPath() { return hnpPath; }
558 
setHnpPath(String hnpPath)559     public void setHnpPath(String hnpPath) { this.hnpPath = hnpPath; }
560 
getRpcidPath()561     public String getRpcidPath() {
562         return rpcidPath;
563     }
564 
setRpcidPath(String rpcidPath)565     public void setRpcidPath(String rpcidPath) {
566         this.rpcidPath = rpcidPath;
567     }
568 
getRpcid()569     public String getRpcid() { return rpcid; }
570 
setRpcid(String rpcid)571     public void setRpcid(String rpcid) {
572         this.rpcid = rpcid;
573     }
574 
getLibs()575     public String getLibs() {
576         return libs;
577     }
578 
setLibs(String libs)579     public void setLibs(String libs) {
580         this.libs = libs;
581     }
582 
getCpuAbis()583     public String getCpuAbis() {
584         return cpuAbi;
585     }
586 
setCpuAbis(String cpuAbi)587     public void setCpuAbis(String cpuAbi) {
588         this.cpuAbi = cpuAbi;
589     }
590 
getVersionName()591     public String getVersionName() {
592         return VersionName;
593     }
594 
setVersionName(String VersionName)595     public void setVersionName(String VersionName) {
596         this.VersionName = VersionName;
597     }
598 
getVersionCode()599     public int getVersionCode() {
600         return VersionCode;
601     }
602 
setVersionCode(int VersionCode)603     public void setVersionCode(int VersionCode) {
604         this.VersionCode = VersionCode;
605     }
606 
getFormattedCpuAbiList()607     public List<String> getFormattedCpuAbiList() {
608         return formattedCpuAbiList;
609     }
610 
getFormattedSoPathList()611     public List<String> getFormattedSoPathList() {
612         return formattedSoPathList;
613     }
614 
getFormattedAbilitySoPathList()615     public List<String> getFormattedAbilitySoPathList() {
616         return formattedAbilitySoPathList;
617     }
618 
getFormattedDexPathList()619     public List<String> getFormattedDexPathList() {
620         return formattedDexPathList;
621     }
622 
getFormattedAbcPathList()623     public List<String> getFormattedAbcPathList() {
624         return formattedAbcPathList;
625     }
626 
getFormattedHapPathList()627     public List<String> getFormattedHapPathList() {
628         return formattedHapPathList;
629     }
630 
getFormattedHspPathList()631     public List<String> getFormattedHspPathList() {
632         return formattedHspPathList;
633     }
634 
getFormattedApkPathList()635     public List<String> getFormattedApkPathList() {
636         return formattedApkPathList;
637     }
638 
getFormattedJarPathList()639     public List<String> getFormattedJarPathList() {
640         return formattedJarPathList;
641     }
642 
getFormattedTxtPathList()643     public List<String> getFormattedTxtPathList() {
644         return formattedTxtPathList;
645     }
646 
getFormattedAppList()647     public List<String> getFormattedAppList() {
648         return formattedAppList;
649     }
650 
getFormattedHapList()651     public List<String> getFormattedHapList() {
652         return formattedHapList;
653     }
654 
setAppList(String appList)655     public void setAppList(String appList) {
656         this.appList = appList;
657     }
658 
getAppList()659     public String getAppList() {
660         return this.appList;
661     }
662 
setHapList(String hapList)663     public void setHapList(String hapList) {
664         this.hapList = hapList;
665     }
666 
getHapList()667     public String getHapList() {
668         return this.hapList;
669     }
670 
getDirList()671     public String getDirList() {
672         return this.dirList;
673     }
674 
setDirList(String dirList)675     public void setDirList(String dirList) {
676         this.dirList = dirList;
677     }
678 
getFormatedDirList()679     public List<String> getFormatedDirList() {
680         return this.formatedDirList;
681     }
682 
683     /**
684      * get dEntryCard path
685      *
686      * @return formattedEntryCardPathList
687      */
getformattedEntryCardPathList()688     public List<String> getformattedEntryCardPathList() {
689         return formattedEntryCardPathList;
690     }
691 
692     /**
693      * get canonical path
694      *
695      * @param path path input
696      * @return formatted path
697      */
getFormattedPath(String path)698     public String getFormattedPath(String path) {
699         if (path == null) {
700             return "";
701         }
702 
703         File file = new File(path);
704         String canonicalPath;
705         try {
706             canonicalPath = file.getCanonicalPath();
707         } catch (IOException exception) {
708             canonicalPath = INVALID_PATH;
709             LOG.error("Utility::getFormattedPath exception," + exception.getMessage());
710         }
711         return canonicalPath;
712     }
713 
714     /**
715      * close stream.
716      *
717      * @param stream stream to close
718      */
closeStream(Closeable stream)719     static void closeStream(Closeable stream) {
720         if (stream != null) {
721             try {
722                 stream.close();
723             } catch (IOException exception) {
724                 LOG.error(PackingToolErrMsg.CLOSE_STREAM_EXCEPTION.toString(
725                     "Close stream exist IOException: " + exception.getMessage()));
726             }
727         }
728     }
729 
730     /**
731      * Add form name.
732      *
733      * @param formName the name of form
734      */
addFormNameList(String formName)735     public void addFormNameList(String formName) {
736         this.formNameList.add(formName);
737     }
738 
739     /**
740      * Get all form names
741      *
742      * @return all form names
743      */
getFormNameList()744     public List<String> getFormNameList() {
745         return formNameList;
746     }
747 
getHqfList()748     public String getHqfList() {
749         return hqfList;
750     }
751 
setHqfList(String hqfList)752     public void setHqfList(String hqfList) {
753         this.hqfList = hqfList;
754     }
755 
getFormatedHQFList()756     public List<String> getFormatedHQFList() {
757         return formatedHQFList;
758     }
759 
setFormatedHQFList(List<String> formatedHQFList)760     public void setFormatedHQFList(List<String> formatedHQFList) {
761         this.formatedHQFList = formatedHQFList;
762     }
763 
setAPPQFPath(String appqfPath)764     public void setAPPQFPath(String appqfPath) {
765         this.appqfPath = appqfPath;
766     }
767 
getAPPQFPath()768     public String getAPPQFPath() {
769         return this.appqfPath;
770     }
771 
setANPath(String anPath)772     public void setANPath(String anPath) {
773         this.anPath = anPath;
774     }
775 
getANPath()776     public String getANPath() {
777         return this.anPath;
778     }
779 
setAPPath(String apPath)780     public void setAPPath(String apPath) {
781         this.apPath = apPath;
782     }
783 
getAPPath()784     public String getAPPath() {
785         return this.apPath;
786     }
787 
getAbsoluteHapPath()788     public String getAbsoluteHapPath() {
789         return this.absoluteHapPath;
790     }
791 
setAbsoluteHapPath(String absoluteHapPath)792     public void setAbsoluteHapPath(String absoluteHapPath) {
793         if (!absoluteHapPath.startsWith(CMD_PREFIX)) {
794             this.absoluteHapPath = getFormattedPath(absoluteHapPath);
795         }
796     }
797 
setIsSharedApp(boolean isSharedApp)798     public void setIsSharedApp(boolean isSharedApp) {
799         this.isSharedApp = isSharedApp;
800     }
801 
getSharedApp()802     public Boolean getSharedApp() {
803         return isSharedApp;
804     }
805 
setIsAppService(boolean isAppService)806     public void setIsAppService(boolean isAppService) {
807         this.isAppService = isAppService;
808     }
809 
getIsAppService()810     public Boolean getIsAppService() {
811         return isAppService;
812     }
813 
setMainModuleLimit(String limit)814     public void setMainModuleLimit(String limit) {
815         this.mainModuleLimit = limit;
816     }
817 
getMainModuleLimit()818     public String getMainModuleLimit() {
819         return mainModuleLimit;
820     }
821 
getNormalModuleLimit()822     public String getNormalModuleLimit() {
823         return normalModuleLimit;
824     }
825 
setNormalModuleLimit(String limit)826     public void setNormalModuleLimit(String limit) {
827         this.normalModuleLimit = limit;
828     }
829 
getTotalLimit()830     public String getTotalLimit() {
831         return totalLimit;
832     }
833 
setTotalLimit(String limit)834     public void setTotalLimit(String limit) {
835         this.totalLimit = limit;
836     }
837 
getCompressLevel()838     public int getCompressLevel() {
839         return compressLevel;
840     }
841 
setCompressLevel(int compressLevel)842     public void setCompressLevel(int compressLevel) {
843         this.compressLevel = compressLevel;
844     }
845 
getPkgContextPath()846     public String getPkgContextPath() {
847         return pkgContextPath;
848     }
849 
setPkgContextPath(String pkgContextPath)850     public void setPkgContextPath(String pkgContextPath) {
851         this.pkgContextPath = pkgContextPath;
852     }
853 
getBundleName()854     public String getBundleName() {
855         return bundleName;
856     }
857 
setBundleName(String bundleName)858     public void setBundleName(String bundleName) {
859         this.bundleName = bundleName;
860     }
861 
getHspList()862     public String getHspList() {
863         return hspList;
864     }
865 
setHspList(String hspList)866     public void setHspList(String hspList) {
867         this.hspList = hspList;
868     }
869 
setGenerateBuildHash(boolean generateBuildHash)870     public void setGenerateBuildHash(boolean generateBuildHash) {
871         this.generateBuildHash = generateBuildHash;
872     }
873 
getGenerateBuildHash()874     public boolean getGenerateBuildHash() {
875         return generateBuildHash;
876     }
877 
setBuildHashFinish(boolean buildHashFinish)878     public void setBuildHashFinish(boolean buildHashFinish) {
879         this.buildHashFinish = buildHashFinish;
880     }
881 
isBuildHashFinish()882     public boolean isBuildHashFinish() {
883         return buildHashFinish;
884     }
885 
getInputList()886     public String getInputList() {
887         return inputList;
888     }
889 
setInputList(String inputList)890     public void setInputList(String inputList) {
891         this.inputList = inputList;
892     }
893 
getInput()894     public String getInput() {
895         return input;
896     }
897 
setInput(String input)898     public void setInput(String input) {
899         this.input = getFormattedPath(input);
900     }
901 
getStatDuplicate()902     public boolean getStatDuplicate() {
903         return statDuplicate;
904     }
905 
setStatDuplicate(boolean statDuplicate)906     public void setStatDuplicate(boolean statDuplicate) {
907         this.statDuplicate = statDuplicate;
908     }
909 
getStatSuffix()910     public boolean getStatSuffix() {
911         return statSuffix;
912     }
913 
setStatSuffix(boolean statSuffix)914     public void setStatSuffix(boolean statSuffix) {
915         this.statSuffix = statSuffix;
916     }
getStatFileSize()917     public String getStatFileSize() {
918         return statFileSize;
919     }
920 
setStatFileSize(String statFileSize)921     public void setStatFileSize(String statFileSize) {
922         this.statFileSize = statFileSize;
923     }
924 }
925