Interface TreeShakeConfig


public interface TreeShakeConfig
Tree-shaking configuration.
  • Method Details

    • mode

      @WithDefault("none") TreeShakeConfig.TreeShakeMode mode()
      Whether to perform class reachability analysis and exclude non-reachable classes from the produced JAR.
      • none - No analysis or exclusion is performed.
      • classes - Exclude non-reachable classes from dependencies.
    • excludedArtifacts

      Optional<Set<String>> excludedArtifacts()
      Dependency artifacts to exclude from tree-shaking. All classes from excluded artifacts are preserved regardless of reachability analysis.

      This is useful for libraries that perform self-integrity checks (e.g., BouncyCastle FIPS) or that load classes in ways the tree-shaker cannot detect.

      Each dependency is expressed as groupId:artifactId[:[classifier][:[type]]]. The classifier and type are optional. If the type is missing, jar is assumed.