Be more concise by omitting implicit "it." in closures
This commit is contained in:
parent
f12f5faa83
commit
d3ddbd6343
|
@ -24,11 +24,11 @@ task verifyNodeJS(type: VerifyWithStamp, dependsOn: downloadNodeJS) {
|
|||
task unpackNodeJSLib(type: Sync, dependsOn: verifyNodeJS) {
|
||||
from(zipTree(verifyNodeJS.src)) {
|
||||
eachFile {
|
||||
if (it.relativePath.pathString.startsWith('nodejs-node-0a604e9/lib/')) {
|
||||
def renamedRelative = new RelativePath(!it.directory, 'core-modules', it.relativePath.lastName)
|
||||
it.relativePath = renamedRelative
|
||||
if (relativePath.pathString.startsWith('nodejs-node-0a604e9/lib/')) {
|
||||
def renamedRelative = new RelativePath(!directory, 'core-modules', relativePath.lastName)
|
||||
relativePath = renamedRelative
|
||||
} else
|
||||
it.exclude()
|
||||
exclude()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -16,9 +16,8 @@ task verifyAjaxslt(type: VerifyWithStamp, dependsOn: downloadAjaxslt) {
|
|||
task unpackAjaxslt(type: Copy, dependsOn: verifyAjaxslt) {
|
||||
from(tarTree(verifyAjaxslt.src)) {
|
||||
eachFile {
|
||||
def newSegments = ['ajaxslt'] + it.relativePath.segments[1 .. -1] as String[]
|
||||
def newPath = new RelativePath(!it.directory, newSegments)
|
||||
it.relativePath = newPath
|
||||
def newSegments = ['ajaxslt'] + relativePath.segments[1 .. -1] as String[]
|
||||
relativePath = new RelativePath(!directory, newSegments)
|
||||
}
|
||||
}
|
||||
into 'examples-src'
|
||||
|
|
Loading…
Reference in New Issue