Skip to content

Commit 1c07228

Browse files
authored
moved def before usage (#826)
1 parent b85ec36 commit 1c07228

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

android-static-binding-generator/project/build.gradle

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,14 @@ task generateInterfaceNamesList() {
8686
}
8787
}
8888

89+
def isJsFile = { fileName -> return fileName.substring(fileName.length() - 3, fileName.length()).equals(".js") }
90+
91+
def isWorkerScript = { fileName ->
92+
// Read __worker-chunks.json file containing a list of webpacked workers
93+
// ignore worker scripts, so as to not attempt to generate bindings for them
94+
return webpackWorkersExcludesList.any{element -> file(element).getAbsolutePath() == fileName}
95+
}
96+
8997
def traverseDirectory
9098

9199
traverseDirectory = { dir, traverseExplicitly ->
@@ -133,15 +141,6 @@ traverseDirectory = { dir, traverseExplicitly ->
133141
}
134142
}
135143

136-
def isJsFile = { fileName -> return fileName.substring(fileName.length() - 3, fileName.length()).equals(".js")
137-
}
138-
139-
def isWorkerScript = { fileName ->
140-
// Read __worker-chunks.json file containing a list of webpacked workers
141-
// ignore worker scripts, so as to not attempt to generate bindings for them
142-
return webpackWorkersExcludesList.any{element -> file(element).getAbsolutePath() == fileName}
143-
}
144-
145144
task traverseJsFilesArgs << { //(jsCodeDir, bindingsFilePath, interfaceNamesFilePath, jsParserPath, jsFilesParameter) {
146145
jsCodeAbsolutePath = jsCodeDir;
147146
inputJsFiles = new LinkedList<String>();

0 commit comments

Comments
 (0)