Skip to content

Instantly share code, notes, and snippets.

@idursun
Created June 26, 2014 12:02
Show Gist options
  • Save idursun/94264c3f67aef34af2c4 to your computer and use it in GitHub Desktop.
Save idursun/94264c3f67aef34af2c4 to your computer and use it in GitHub Desktop.
Gradle file to copy package files into resources
apply plugin: 'java'
task webjar(type: Jar, dependsOn: "jar") {
from(fileTree("dist")) {
into "META-INF/resources"
}
}
task ('copyAssets', type: Copy) {
from(file('dist/public'))
into('../src/main/resources/public')
}
task ('copyHtml', type: Copy) {
from(file('dist/views'))
into('../src/main/resources/public/views')
}
task('copyResources', dependsOn: ['copyAssets', 'copyHtml'])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment