Interface PluginAdapterBuild

All Superinterfaces:
PluginAdapterBase

public interface PluginAdapterBuild extends PluginAdapterBase
Gives access to plugin-specific implementations and configurations.
  • Method Details

    • frontendResourcesDirectory

      File frontendResourcesDirectory()
      Defines the project frontend directory from where resources should be copied from for use with webpack.
      Returns:
      File
    • generateBundle

      boolean generateBundle()
      Whether to generate a bundle from the project frontend sources or not.
      Returns:
      boolean
    • generateEmbeddableWebComponents

      boolean generateEmbeddableWebComponents()
      Whether to generate embeddable web components from WebComponentExporter inheritors.
      Returns:
      boolean
    • optimizeBundle

      boolean optimizeBundle()
      Whether to use byte code scanner strategy to discover frontend components.
      Returns:
      boolean
    • runNpmInstall

      boolean runNpmInstall()
      Whether to run npm install after updating dependencies.
      Returns:
      boolean
    • ciBuild

      boolean ciBuild()
      Setting this to true will run npm ci instead of npm install when using npm. If using pnpm or bun, the installation will be run with --frozen-lockfile parameter. This makes sure that the package lock file will not be overwritten.
      Returns:
      true if ci build should be enabled
    • forceProductionBuild

      boolean forceProductionBuild()
      Setting this to true will force a build of the production build even if there is a default production bundle that could be used. Created production bundle optimization is defined by optimizeBundle() parameter.
    • compressBundle

      boolean compressBundle()
      Setting this to false will skip compression of the bundle. true by default.
      Returns:
      true if the bundle should be compressed
    • checkRuntimeDependency

      boolean checkRuntimeDependency(String groupId, String artifactId, Consumer<String> missingDependencyMessageConsumer)
      Checks if the artifact defined by given coordinates is a dependency of the project, present at runtime.

      If the dependency is missing or in invalid scope, the method produces a message containing the necessary instructions to fix the project and notifies the caller by invoking the provided message consumer, if present.
      Parameters:
      groupId - dependency groupId, not null.
      artifactId - dependency artifactId, not null.
      missingDependencyMessageConsumer - a consumer for missing dependency message produced by the adapter.
      Returns:
      true if the given coordinates identify a project dependency present at runtime, otherwise false.