Last active
August 26, 2017 16:02
-
-
Save ElFeesho/617cc58979b1172c7add31c2986fd8c0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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