Skip to content

Instantly share code, notes, and snippets.

@ElFeesho
Last active August 26, 2017 16:02
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ElFeesho/617cc58979b1172c7add31c2986fd8c0 to your computer and use it in GitHub Desktop.
Save ElFeesho/617cc58979b1172c7add31c2986fd8c0 to your computer and use it in GitHub Desktop.
build.doLast() {
// Augmented from https://github.com/bascan/kotlin-js-example/blob/master/build.gradle
def jsFileFilter = { fileTreeElement ->
def path = fileTreeElement.path
path.endsWith(".js") && (path.startsWith("META-INF/resources/") || !path.startsWith("META-INF/"))
}
configurations.compile.each { File file ->
copy {
includeEmptyDirs = false
from zipTree(file.absolutePath)
into "${project.buildDir}/classes/main/lib"
include(jsFileFilter)
}
}
configurations.testCompile.each { File file ->
copy {
includeEmptyDirs = false
from zipTree(file.absolutePath)
into "${project.buildDir}/classes/test/lib"
include(jsFileFilter)
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment