From c2d316449f85bd2b74ae9ffaa3d08b7a5ee282cf Mon Sep 17 00:00:00 2001 From: Alex Bitney Date: Sun, 7 Feb 2016 00:00:41 +0200 Subject: added tags when posting new message added templates engine (rythm engine) and moved something to it. WARNING: textext plugin does not work when minimized, and also I fixed bug in it. --- build.gradle | 64 ++++++++++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 52 insertions(+), 12 deletions(-) (limited to 'build.gradle') diff --git a/build.gradle b/build.gradle index 7a795da3..10dcdd82 100644 --- a/build.gradle +++ b/build.gradle @@ -1,10 +1,3 @@ -subprojects { - apply plugin: 'java' - repositories { - mavenCentral() - } -} - buildscript { repositories { mavenCentral() @@ -18,12 +11,34 @@ buildscript { } } +plugins { + id "com.eriwen.gradle.js" version "1.12.1" +} + +subprojects { + apply plugin: 'java' + repositories { + mavenCentral() + } +} + apply plugin: 'war' apply plugin: 'css' apply plugin: 'com.bmuschko.tomcat' apply plugin: 'com.eriwen.gradle.js' +apply plugin: 'com.eriwen.gradle.css' apply plugin: 'com.github.tkruse.groovysh' +////ext.environment = hasProperty('env') ? env : 'dev' +//environments { +// dev { +// +// } +// prod { +// +// } +//} + repositories { mavenCentral() } @@ -47,7 +62,7 @@ project(':deps:com.juick.xmpp') { project(':deps:com.juick.json') { dependencies { - compile core + compile core } } @@ -63,6 +78,7 @@ dependencies { compile 'org.apache.httpcomponents:httpclient:4.5.1' compile 'org.json:json:20151123' compile "org.springframework:spring-jdbc:4.2.4.RELEASE" + compile 'org.rythmengine:rythm-engine:1.0.1' providedCompile 'javax.servlet:javax.servlet-api:3.1.0' runtime 'mysql:mysql-connector-java:5.1.37' def tomcatVersion = '7.0.+' @@ -72,16 +88,22 @@ dependencies { } javascript.source { - dev { + juick { js { srcDir "src/main/webapp" include "*.js" } } + textext { + js { + srcDir "src/main/webapp/textext" + include "*.js" + } + } } combineJs { - source = javascript.source.dev.js.files + source = javascript.source.juick.js.files + javascript.source.textext.js.files dest = file("${buildDir}/scripts.all.js") } @@ -89,19 +111,28 @@ minifyJs { source = combineJs dest = file("${buildDir}/scripts.min.js") sourceMap = file("${buildDir}/scripts.sourcemap.json") + println("webAppDirName=${webAppDir} - ${webAppDirName}") + } + css.source { - dev { + juick { css { srcDir "src/main/webapp" include "*.css" } } + textext { + css { + srcDir "src/main/webapp/textext" + include "*.css" + } + } } combineCss { - source = css.source.dev.css.files + source = css.source.juick.css.files + css.source.textext.css.files dest = "${buildDir}/style.all.css" } @@ -110,6 +141,15 @@ minifyCss { dest = "${buildDir}/style.min.css" } +war { + it.dependsOn minifyCss + it.dependsOn minifyJs + from "${buildDir}/scripts.min.js" + from "${buildDir}/style.min.css" + from "${buildDir}/scripts.all.js" + from "${buildDir}/style.all.css" +} + assemble.dependsOn 'minifyCss' assemble.dependsOn 'minifyJs' -- cgit v1.2.3