diff --git a/build.gradle b/build.gradle index b819b7de72a47ebaff98b8b5136e96abf19e4b5c..60dd758aea5e9fcfebd63c47273db2ed3cffcc70 100644 --- a/build.gradle +++ b/build.gradle @@ -20,9 +20,9 @@ version = '0.2-SNAPSHOT' description = 'PhD project of Nikolaus Krismer' def getDate() { - def date = new Date() - def formattedDate = date.format('yyyyMMdd') - return formattedDate + def date = new Date() + def formattedDate = date.format('yyyyMMdd') + return formattedDate } ext { @@ -183,8 +183,8 @@ task javadocJar(type: Jar, dependsOn: javadoc) { } task jsDoc(type:com.eriwen.gradle.js.tasks.JsDocTask) { - source = fileTree(dir: 'src/main/webapp/js', include: '**/*.js', excludes: ['**/*.min.js', 'lib/**']) - destinationDir = file("${buildDir}/docs/jsdoc") + source = fileTree(dir: 'src/main/webapp/js', include: '**/*.js', excludes: ['**/*.min.js', 'lib/**']) + destinationDir = file("${buildDir}/docs/jsdoc") } tasks.jsDoc.dependsOn tasks.processResources @@ -193,9 +193,9 @@ task jsHint(type:com.eriwen.gradle.js.tasks.JsHintTask) { jshint.options = [browser: true, expr: true, jquery: true, latedef: 'nofunc', quotmark: 'single', unused: true, undef: true, wsh: true] jshint.predef = ['$': false, 'define': false, 'google': false, 'require': false] - source = fileTree(dir: 'src/main/webapp/js', include: '**/*.js', exclude: ['**/*.min.js', 'lib/**']) - dest = file("${buildDir}/reports/jshint/main.xml") - reporter = 'checkstyle' + source = fileTree(dir: 'src/main/webapp/js', include: '**/*.js', exclude: ['**/*.min.js', 'lib/**']) + dest = file("${buildDir}/reports/jshint/main.xml") + reporter = 'checkstyle' } tasks.jsHint.dependsOn tasks.processResources @@ -230,12 +230,12 @@ task vagrantExport(type: Zip) { from 'etc/vagrant' appendix = '' - baseName = 'vagrantbox' - classifier = '' - version = getDate() + baseName = 'vagrantbox' + classifier = '' + version = getDate() filter(FixCrLfFilter) - filter(ReplaceTokens, tokens: [db_username: 'myUser', db_password: 'myPassword']) + filter(ReplaceTokens, tokens: [db_username: 'myUser', db_password: 'myPassword']) } task vagrantPrepare << { @@ -250,7 +250,7 @@ task vagrantPrepare << { into vagrantDir filter(FixCrLfFilter) - filter(ReplaceTokens, tokens: [db_username: 'niko', db_password: 'secretPhdPassword#2014!']) + filter(ReplaceTokens, tokens: [db_username: 'niko', db_password: 'secretPhdPassword#2014!']) } } } @@ -259,12 +259,12 @@ vagrantUp.dependsOn(vagrantPrepare) // See: http://stackoverflow.com/questions/12836089/why-is-eclipse-not-attaching-3rd-party-libs-source-files-to-a-wtp-faceted-gradle eclipse.classpath.file { - // Classpath entry for Eclipse which changes the order of classpathentries; otherwise no sources for 3rd party jars are shown - withXml { xml -> - def node = xml.asNode() - node.remove( node.find { it.@path == 'org.eclipse.jst.j2ee.internal.web.container' } ) - node.appendNode( 'classpathentry', [ kind: 'con', path: 'org.eclipse.jst.j2ee.internal.web.container', exported: 'true']) - } + // Classpath entry for Eclipse which changes the order of classpathentries; otherwise no sources for 3rd party jars are shown + withXml { xml -> + def node = xml.asNode() + node.remove( node.find { it.@path == 'org.eclipse.jst.j2ee.internal.web.container' } ) + node.appendNode( 'classpathentry', [ kind: 'con', path: 'org.eclipse.jst.j2ee.internal.web.container', exported: 'true']) + } } task jarAll(dependsOn: [jar, javadocJar, sourcesJar, staticJar])