Package com.vaadin.flow.server.frontend
Class ProdBundleUtils
java.lang.Object
com.vaadin.flow.server.frontend.ProdBundleUtils
Helpers related to the production bundle.
For internal use only. May be renamed or removed in a future release.
- Since:
- 24.3
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidcompressBundle(File projectDir, File prodBundleFolder) Compress the prod bundle at give location into src/main/bundles.static StringfindBundleStatsJson(File projectDir, ClassFinder finder) Get the stats.json for the application specific production bundle or from the default bundle if it exists.static FilegetProdBundle(File projectDir) Get the application specific production bundle file.static booleanhasBundleFile(File projectDir, ClassFinder finder, String filename) Checks if the given file is part of the production bundle in use, which is the application specific bundle when the application has one and the default bundle from the class path otherwise.static voidunpackBundle(File projectDir, File prodBundleFolder) Unpack the compressed prod bundle from src/main/bundles if it exists into the given location.
-
Method Details
-
getProdBundle
Get the application specific production bundle file.- Parameters:
projectDir- the project base directory- Returns:
- the bundle directory
-
findBundleStatsJson
Get the stats.json for the application specific production bundle or from the default bundle if it exists.- Parameters:
projectDir- the project base directoryfinder- class finder- Returns:
- stats.json content or
nullif not found - Throws:
IOException- if an I/O exception occurs.
-
hasBundleFile
public static boolean hasBundleFile(File projectDir, ClassFinder finder, String filename) throws IOException Checks if the given file is part of the production bundle in use, which is the application specific bundle when the application has one and the default bundle from the class path otherwise.- Parameters:
projectDir- the project base directoryfinder- class finderfilename- the file path within the bundle- Returns:
trueif the file is part of the bundle- Throws:
IOException- if an I/O exception occurs.
-
compressBundle
Compress the prod bundle at give location into src/main/bundles.- Parameters:
projectDir- current project root directoryprodBundleFolder- prod bundle location
-
unpackBundle
Unpack the compressed prod bundle from src/main/bundles if it exists into the given location.- Parameters:
projectDir- current project root directoryprodBundleFolder- unpacked prod bundle location
-