• Home
  • Raw
  • Download

Lines Matching +full:module +full:- +full:number

3 …monyos-guides-V5/source-obfuscation-V5) and [doc repository](https://gitee.com/openharmony/docs/bl…
10 For Chinese version please read [README-cn.md](README-cn.md)
11 (中文版说明请查看[README-cn.md](README-cn.md)).
28 You can enable them by [obfuscation options](#obfuscation-options).
30 When you create a new project, the following config will be generated in `build-profile.json5`.
37 "files": ["obfuscation-rules.txt"],
50 "files": ["obfuscation-rules.txt"],
52 "consumerFiles": ["consumer-rules.txt"]
72 "[How Arkguard merges rules](#how-arkguard-merges-rules)".
76 The files `obfuscation-rules.txt` and `consumer-rules.txt` are created by DevEco Studio automatical…
86 "files": ["obfuscation-rules.txt", "myrules.txt"],
88 "consumerFiles": ["consumer-rules.txt", "my-consumer-rules.txt"]
94 In rule files, you can write [obfuscation options](#obfuscation-options) and [keep options](#keep-o…
98 #### -disable-obfuscation
103 #### -enable-property-obfuscation
118-options) to keep them. Besides, for the property names of properties of directly exported classes…
126 … obfuscate import/export names, please refer to the [`-enable-export-obfuscation`](#-enable-export
132 data: number[] = [];
138 * the property names that are specified by [keep options](#keep-options).
139 …systemApiCache.json, and the path is build/cache/{...}/release/obfuscation in the module directory.
148 …ring literal property names, you should addtionally use the option `-enable-toplevel-obfuscation`.…
151 -enable-property-obfuscation
152 -enable-string-property-obfuscation
157 …`a-z, A-Z, 0-9, _`, for example `let obj = {"\n": 123, "": 4, " ": 5}` then we would not suggest t…
158 …option `-enable-string-property-obfuscation`, because [keep options](#keep-options) may not allow …
171 …Therefore, when `-enable-string-property-obfuscation` is enabled, if you don't want to obfuscate t…
178 * the global names that are specified by [keep options](#keep-options).
181 #### -enable-filename-obfuscation
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.
187 * the file/folder names that are specified by [`-keep-file-name`](#keep-options).
188 * non-ECMAScript module reference (ECMAScript module example: `import {foo} from './filename'`)
189 * non-path reference, such as json5 will not be obfuscated `import module from 'json5'`
193 …en the module contains Ability component, you need to configure all paths corresponding to 'srcEnt…
194 …he module contains multithreading services: Worker, you need to configure all the paths in the fie…
196 #### -enable-export-obfuscation
198 …s. If you use this option, the names of direct imports or exports in the module will be obfuscated…
201 * Names and property names specified by [keep options](#keep-options) will not be obfuscated.
206 … or exported classes, you need to enable both the `-enable-property-obfuscation` and `-enable-expo…
207-enable-export-obfuscation` option is used, the externally exposed interfaces need to be kept in t…
208-enable-export-obfuscation` option is used during compilation, the interface imported from HSP nee…
215 // obfuscation-rules.txt file configuration in HSP and modules that depend on this HSP:
216 keep-global-name
221 #### -compact
225number of code, not the column number. Therefore, when the compact is enabled, the specific locati…
227 #### -remove-log
233 3. Calls within a module.
237 #### `-print-namecache` filepath
240 Note: The namecache.json file will be generated every time the module is fully built, so you should…
242 #### `-apply-namecache` filepath
251 #### -remove-comments
255 …sDoc comments above class, function, struct, enum ... in declaration files are in `-keep-comments`.
256 **Note**: `-keep-comments` doesn't work for comments in generated source files, which will be delet…
260 #### `-keep-property-name` [,identifiers,...]
265 -keep-property-name
271 **Note**: This option is avaliable when `-enable-property-obfuscation` is enabled.
273 `-keep-comments`
278 -keep-comments
284 1. This option is avaliable when `-remove-comments` is enabled.
286 above that element cannot be kept using `-keep-comments`. For example, when you have exportClass in…
319 console.log(obj['t']); // t and 't' can be safely obfuscated when `-enable-string-property-o…
322 console.log(obj['v']); // 'v' can be safely obfuscated when `-enable-string-property-obfusca…
327 #### `-keep-global-name` [,identifiers,...]
332 -keep-global-name
361 #### `-keep-file-name` [,identifiers,...]
366 -keep-file-name
379 #### `-keep-dts` filepath
385 #### `-keep` path
391 -keep
397 Note: This option does not affect the function of file name obfuscation `-enable-filename-obfuscati…
404 `-keep-property-name`<br>
405 `-keep-global-name`<br>
406 `-keep-file-name`<br>
407 `-keep-comments`<br>
412 | -------- | ------------------------------------ | -----------------------------------------------…
414 | \* | Matches any number of any characters | "*AB*" can match "AB", "aABb", "cAB", "ABc", et…
421 -keep-property-name
425 Retains all single-character property names:
428 -keep-property-name
435 -keep-property-name
443 `-keep`
448-------- | ---------------------------------------------------------------------------------------…
450 | \* | Matches any number of any characters except path separator '/' …
451 | \*\* | Matches any number of any characters …
452 … beginning of a path to exclude certain cases that already exist in the user-configured whitelist …
459 -keep
466 -keep
473 -keep
481 -keep
488 -keep
502 -keep-property-name
508 Here, \* indicates matching any number of any characters, resulting in all property names not being…
510 (2) The -keep option only allows the use of '/' as the path separator and does not support '\\' or …
519 -keep-global-name
523 -keep-property-name # white list for dynamic property names
557 case -disable-obfuscation:
560 case -enable-property-obfuscation:
563 case -enable-toplevel-obfuscation:
566 case -compact:
569 case -remove-log:
572 case -print-namecache:
575 case -apply-namecache:
578 case -keep-property-name:
581 case -keep-global-name:
584 case -keep-dts:
588 end-for
589 end-for
598 * The `-keep-dts` option will be converted to `-keep-global-name` and `-keep-property-name` options…
600 * The options `-print-namecache` and `apply-namecache` will be omitted and will not appear in the r…