Last active
May 17, 2016 22:26
-
-
Save twasink/700a4ff0bcc8dffa68e2 to your computer and use it in GitHub Desktop.
A skeleton for a gradle file to augment ExtJS's Sencha Cmd-generated build scripts. This particular one assumes the application is in a workspace.
This file contains 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
ant.importBuild 'build.xml' | |
def packages_dir = file('../packages') | |
clean { | |
doLast { delete 'bootstrap.js', 'bootstrap.css', 'bootstrap.json' } | |
} | |
refresh { | |
inputs.dir 'app' | |
inputs.file 'app.json' | |
packages_dir.listFiles().each() { package_dir -> inputs.dir new File(package_dir, 'src') } | |
outputs.file file('bootstrap.js') | |
outputs.file file('bootstrap.json') | |
} | |
js { | |
inputs.dir 'app' | |
packages_dir.listFiles().each() { package_dir -> inputs.dir new File(package_dir, 'src') } | |
outputs.file file("../build/${this.property('build.environment')}/${projectName}/app.js") | |
} | |
resources { | |
inputs.dir 'resources' | |
packages_dir.listFiles().each() { package_dir -> inputs.dir new File(package_dir, 'resources') } | |
outputs.file file("../build/${this.property('build.environment')}/${projectName}/resources") | |
} | |
sass { | |
inputs.dir 'sass' | |
packages_dir.listFiles().each() { package_dir -> inputs.dir new File(package_dir, 'sass') } | |
outputs.file file("../build/${this.property('build.environment')}/${projectName}/resources/${projectName}-all.css") | |
outputs.file file('bootstrap.css') | |
} | |
page { | |
// what are the inputs to page, I wonder? | |
// the outputs are the microloader.js and the index.html... | |
} |
This file contains 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
# the default Build Environment. Production is the default for Sencha Cmd. | |
# Use -Dbuild.environment on the command line to change, otherwise it doesn't get passed to the ant build properly | |
build.environment=production | |
# The project name. Should match what is in the app.json file | |
projectName=MyApp |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment