asset.pipeline.AssetPipelineClassLoaderEntry.groovy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of asset-pipeline-core Show documentation
Show all versions of asset-pipeline-core Show documentation
JVM Asset Pipeline library for serving static web assets, bundling, minifying, and extensibility for transpiling.
The newest version!
package asset.pipeline
/**
* Holds config for nested class loaders for dynamically loading, and unloading assets
* @author David Estes
*/
class AssetPipelineClassLoaderEntry {
public ClassLoader classLoader
Properties manifest
ClassLoader classLoader
static final String MANIFEST_LOCATION = "assets/manifest.properties"
public AssetPipelineClassLoaderEntry(ClassLoader classLoader) {
this.classLoader = classLoader
URL res = classLoader.getResource(MANIFEST_LOCATION)
if(res) {
def manifestProps = new Properties()
URLConnection resConnection = res.openConnection()
resConnection.setUseCaches(false)
def propertiesStream = resConnection.getInputStream()
manifestProps.load(propertiesStream)
manifest = manifestProps
}
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy