Lines Matching full:in
5 …d to the latest open source code, ahead of the source obfuscation function in the released DevEco …
13 # Usage in DevEco Studio
15 Arkguard has been integrated into SDK. It is convenient to use Arkguard in DevEco Studio.
16 In DevEco Studio, Arkguard can be enabled only in Stage Model (FA Model is not supported).
17 For now only name obfuscations can be used in DevEco Studio (because other obfuscation
22 * names in global scope
30 When you create a new project, the following config will be generated in `build-profile.json5`.
60 * build in release mode
62 The files in the property `ruleOptions.files` will be applied when you build HAP or HAR.
64 The files in the property `consumerFiles` will be applied when you build the project or library whi…
65 depends on this library. They will also be merged into a file `obfuscation.txt` in the resulting HA…
77 contain any rule by default. You can write rules in these files or include rules from other files, …
94 In rule files, you can write [obfuscation options](#obfuscation-options) and [keep options](#keep-o…
108 …ctly imported or exported by `import/export` will be kept. For example, the property name `data` in
118 … properties of directly exported classes or objects, like `name` and `age` in the following exampl…
127 * the property names defined in UI components. For example, the property names `message` and `data`…
139 …in system API list. System API list is a name set which is extracted from SDK automatically by def…
140 * in the Native API scenario, the APIs in the d.ts file of so library will not be obfuscated.
141 * the property names that are string literals. For example, the property names "name" and "age" in …
160 …e the string constant in the declaration file. For example, the string `'ohos.want.action.home'` i…
171 …e the property like `'ohos.dlp.param.sandbox'`, which is a string constant in system api. you shou…
173 Specifies to obfuscate the names in the global scope. If you use this option, all global names will…
177 * the global names that are not declared in the current file.
179 * the global names in system API list.
185 * the file/folder names configured in the 'main' and 'types' fields in the oh-package.json5.
186 * the file/folder names configured in the 'srcEntry' field in the module.json5.
191 …untime, developers need to configure the corresponding white list manually in the [` keep file nam…
193 …t, you need to configure all paths corresponding to 'srcEntry' in the 'abilities' field in `scr/ma…
194 …ces: Worker, you need to configure all the paths in the field 'buildOption'-'sourceOption'-'worker…
198 …se this option, the names of direct imports or exports in the module will be obfuscated, except in…
200 …ames and property names of classes or objects exported in remote HAR (packages with real paths in …
202 * Names in the system API list will not be obfuscated.
206 1. To obfuscate the property names in imported or exported classes, you need to enable both the `-e…
207 …ternally exposed interfaces need to be kept in the obfuscation configuration file `obfuscation-rul…
208 …In the scenario where HAP/HSP/HAR depends on HSP, if the `-enable-export-obfuscation` option is us…
211 // Code example (entry file Index.ets in HSP):
215 // obfuscation-rules.txt file configuration in HSP and modules that depend on this HSP:
225 **Note**: The stack information in release mode only includes the line number of code, not the colu…
229 Delete the expressions involving direct calls to console.* statements in the following scenarios:
244 … reuse the given cache file. The old names in the cache will receive the corresponding new names s…
245 the cache. Other names will receive new random short names. This option should be used in increment…
247 By default, DevEco Studio will keep and update the namecache file in the temporary cache directory …
253 Remove all comments including single line, multi line and JsDoc comments, in a project except:
255 * Those names of JsDoc comments above class, function, struct, enum ... in declaration files are in…
256 **Note**: `-keep-comments` doesn't work for comments in generated source files, which will be delet…
274 To retain JsDoc comments above elements in declaration files, such as preserving the JsDoc comment …
286 above that element cannot be kept using `-keep-comments`. For example, when you have exportClass in…
325 In the native API scenario, if in the ets/ts/js file you want to use APIs that are not declared in …
329 Specifies names that you want to keep in the global scope. For example,
339 It is known that in javascript the variables in the global scope are properties of `globalThis`. So…
381 Specifies to keep names in the given `.d.ts` file. Here filepath can be also a directory. If so, th…
387 … etc.) in the specified path are not obfuscated. This path can be a file or a folder. If it is a f…
392 ./src/main/ets/fileName.ts // The names in fileName.ts are not obfusated.
393 ../folder // The names of files and subfolders in the folder directory are not ob…
394 ../oh_modules/json5 // The names of all files in the referenced library json5 are not obfus…
452 …ten at the beginning of a path to exclude certain cases that already exist in the user-configured …
456 Indicates that the c.ets files in all folders in ../a/b/ (excluding subfolders) will not be obfusca…
463 Indicates that the c.ets files in all folders in ../a/b/ (including subfolders) will not be obfusca…
470 Indicates that except for the c.ets file, all other files in ../a/b/ will not be obfuscated:
508 Here, \* indicates matching any number of any characters, resulting in all property names not being…
514 You can write comments in obfuscation rule file by using `#`. The line begins with `#` is treated a…
533 Typically there may be serveral rule files in your project. These rule files come from:
535 * `ruleOptions.files` in main project (Here by main project we mean the project you are building)
536 * `consumerFiles` in local dependent libraries
537 * `obfuscate.txt` in remote dependent HARs
538 When building your main project, all these rules will be merged by the following strategy (in pseud…
554 for each file in `listRules`:
555 for each option in file:
592 The final obfuscation rules are in the object `finalRule`.
594 …g HAR, the resulting `obfuscate.txt` are obtained by merging the rules from `consumerFiles` in main
595 project and local dependent libraries, and `obfuscate.txt` in remote dependent HARs. The merging st…
598 … option will be converted to `-keep-global-name` and `-keep-property-name` options in the resulting
600 * The options `-print-namecache` and `apply-namecache` will be omitted and will not appear in the r…