apply plugin: "com.axelor.app-module" apply from: "../version.gradle" apply { version = openSuiteVersion } axelor { title "Axelor Studio" description "Axelor Studio Module" } dependencies { compile project(":modules:axelor-admin") compile project(":modules:axelor-message") compile 'commons-lang:commons-lang:2.3' // compile 'org.xhtmlrenderer:flying-saucer-pdf:9.1.4' compile 'org.eclipse.birt.runtime.3_7_1:Tidy:1' compile 'org.apache.commons:commons-exec:1.2' // compile "org.bouncycastle:bcprov-jdk15on:1.62" } def updateJsp(jspFile, check, lines) { def jsp = file("${rootProject.buildDir}/webapp/${jspFile}") def text = lines.join("\n"); if (jsp.exists()) { def jspText = jsp.getText('UTF-8') if (jspText.indexOf(check) == -1) { text = jspText + text } } file(jsp).write(text, 'UTF-8') } //XXX: this task should be removed when we introduce per module webapp support in Axelor Open Platform task copyWebapp(type: Copy) { destinationDir = file(rootProject.buildDir) into("webapp/studio") { from "src/main/webapp" } doLast { // update index-head.jsp updateJsp("index-head.jsp", "diagram-js.css", [ '', '', '']) // update index-foot.jsp updateJsp("index-foot.jsp", "bpmn-modeler.js", [ '', '']) } } rootProject.tasks.war.dependsOn copyWebapp