-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathbuild.gradle
16 lines (15 loc) · 934 Bytes
/
build.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
defaultTasks 'combineJs'
task combineJs() {
def main = ["src/js/app.js"]
def controller = ["src/js/controller/controller.js", "src/js/controller/tools.js"]
def entities = ["src/js/entities/box.js", "src/js/entities/pixel-context.js"]
def model = ["src/js/model/constants.js", "src/js/model/coord-pixel.js", "src/js/model/coord.js", "src/js/model/grid.js", "src/js/model/pixel.js"]
def util = ["src/js/util/unicode-chars.js", "src/js/util/util.js"]
def view = ["src/js/view/canvas-zoom.js", "src/js/view/canvas.js", "src/js/view/decorators.js", "src/js/view/drawable-canvas.js"]
def source = main + controller + entities + model + util + view
// show the resolved files when gradle is run with -d
// source.each{ logger.debug ("$it") }
def output = file("docs/app.js")
output.write('') // truncate output if needed
source.each { f -> output.append(file(f).getText('UTF-8'),"UTF-8") }
}