Annotation Type Hardening


@Retention(CLASS) @Target(TYPE) public @interface Hardening

App hardening build hints, checked by the compiler.

Place this on your application's main class -- the class named by codename1.mainName. An attribute you do not set is not written at all, so the builder's own default applies; the values shown here are that default, for reference.

Generated from com.codename1.build.shared.BuildHints by BuildHintCodeGenerator. Do not edit by hand -- edit the catalog and re-run scripts/gen-build-hint-annotations.sh.

  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    boolean
    Permits a local or source build to run with hardening requested but not applied.
    Overrides control-flow obfuscation independently of harden.level.
    Keep rules in ProGuard syntax, one per line, for classes that are resolved by name at runtime and so can't be found by the automatic analysis.
    Master switch for app hardening: off, standard, aggressive or paranoid.
    boolean
    Overrides symbol renaming independently of harden.level.
    Overrides string obfuscation independently of harden.level: off, constants or all.
  • Element Details

    • allowUnhardenedLocalBuild

      boolean allowUnhardenedLocalBuild
      Permits a local or source build to run with hardening requested but not applied. Without it such a build is refused, so a hardened app is never shipped from a target that can't actually harden it.
      Default:
      false
    • controlFlow

      HardenControlFlow controlFlow
      Overrides control-flow obfuscation independently of harden.level.
      Default:
      OFF
    • keep

      String keep
      Keep rules in ProGuard syntax, one per line, for classes that are resolved by name at runtime and so can't be found by the automatic analysis. Same syntax as android.proguardKeep, so existing rules port directly. Rules are separated by newlines only, because a semicolon is legal inside a rule body such as { *; }.
      Default:
      ""
    • level

      Master switch for app hardening: off, standard, aggressive or paranoid. An unrecognized value fails the build rather than being treated as off.
      Default:
      OFF
    • rename

      boolean rename
      Overrides symbol renaming independently of harden.level.
      Default:
      false
    • strings

      HardenStrings strings
      Overrides string obfuscation independently of harden.level: off, constants or all.
      Default:
      OFF