Package com.vaadin.flow.plugin.base
Interface PluginAdapterBuild
- All Superinterfaces:
PluginAdapterBase
Gives access to plugin-specific implementations and configurations.
-
Method Summary
Modifier and TypeMethodDescriptionbooleancheckRuntimeDependency(String groupId, String artifactId, Consumer<String> missingDependencyMessageConsumer) Checks if the artifact defined by given coordinates is a dependency of the project, present at runtime.booleanciBuild()Setting this to true will runnpm ciinstead ofnpm installwhen using npm.booleanSetting this tofalsewill skip compression of the bundle.booleanSetting this totruewill force a build of the production build even if there is a default production bundle that could be used.Defines the project frontend directory from where resources should be copied from for use with webpack.booleanWhether to generate a bundle from the project frontend sources or not.booleanWhether to generate embeddable web components from WebComponentExporter inheritors.booleanWhether to use byte code scanner strategy to discover frontend components.booleanWhether to runnpm installafter updating dependencies.Methods inherited from interface com.vaadin.flow.plugin.base.PluginAdapterBase
applicationIdentifier, applicationProperties, buildFolder, bunEnable, createLookup, eagerServerLoad, frontendDirectory, frontendExtraFileExtensions, frontendOutputDirectory, generatedTsFolder, getClassFinder, getJarFiles, isCommercialBannerEnabled, isDebugEnabled, isFrontendHotdeploy, isFrontendIgnoreVersionChecks, isJarProject, isNpmExcludeWebComponents, isPrepareFrontendCacheDisabled, isReactEnabled, javaResourceFolder, javaSourceFolder, logDebug, logDebug, logError, logError, logInfo, logWarn, logWarn, nodeAutoUpdate, nodeDownloadRoot, nodeVersion, npmFolder, openApiJsonFile, pnpmEnable, postinstallPackages, projectBaseDirectory, requireHomeNodeExec, servletResourceOutputDirectory, skipDevBundleBuild, useGlobalPnpm, webpackOutputDirectory
-
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 runnpm installafter updating dependencies.- Returns:
- boolean
-
ciBuild
boolean ciBuild()Setting this to true will runnpm ciinstead ofnpm installwhen using npm. If using pnpm or bun, the installation will be run with--frozen-lockfileparameter. 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 totruewill 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 byoptimizeBundle()parameter. -
compressBundle
boolean compressBundle()Setting this tofalsewill skip compression of the bundle.trueby default.- Returns:
trueif 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.
-