2011-12-07 19:01:29 +08:00
|
|
|
/*
|
2013-09-24 19:00:49 +08:00
|
|
|
* Copyright (c) 2008-2013 Haulmont. All rights reserved.
|
|
|
|
* Use is subject to license terms, see http://www.cuba-platform.com/license for details.
|
|
|
|
*/
|
2013-01-11 23:19:15 +08:00
|
|
|
|
2011-11-17 16:31:31 +08:00
|
|
|
allprojects {
|
2012-06-14 15:47:48 +08:00
|
|
|
ext.artifactGroup = 'com.haulmont.cuba'
|
2013-09-24 19:00:49 +08:00
|
|
|
ext.artifactVersion = cubaVersion.replace('-SNAPSHOT', '')
|
|
|
|
ext.isSnapshot = cubaVersion.endsWith('-SNAPSHOT')
|
2013-04-09 20:28:47 +08:00
|
|
|
ext.vcs = 'svn'
|
2012-06-14 15:47:48 +08:00
|
|
|
//ext.tomcatDir = rootDir.absolutePath + '/../tomcat'
|
2011-11-17 16:31:31 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
buildscript {
|
2013-10-15 16:11:44 +08:00
|
|
|
ext.cubaVersion = '5.1-SNAPSHOT'
|
2013-09-24 19:00:49 +08:00
|
|
|
ext.cubaVersion = rootProject.hasProperty('buildVersion') ? rootProject['buildVersion'] : cubaVersion
|
|
|
|
|
|
|
|
println("CUBA Platform Version ${ext.cubaVersion}")
|
|
|
|
println("")
|
|
|
|
|
2013-09-11 23:09:19 +08:00
|
|
|
def docPluginVersion = '1.2.4'
|
2013-08-15 19:23:20 +08:00
|
|
|
def DOC_PLUGIN_VERSION = 'docPluginVersion'
|
|
|
|
docPluginVersion = rootProject.hasProperty(DOC_PLUGIN_VERSION) ? rootProject[DOC_PLUGIN_VERSION] : docPluginVersion
|
|
|
|
|
2011-11-17 16:31:31 +08:00
|
|
|
repositories {
|
|
|
|
mavenLocal()
|
|
|
|
maven {
|
|
|
|
credentials {
|
|
|
|
username System.getenv('HAULMONT_REPOSITORY_USER')
|
|
|
|
password System.getenv('HAULMONT_REPOSITORY_PASSWORD')
|
|
|
|
}
|
|
|
|
url "http://repository.haulmont.com:8587/nexus/content/groups/work"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
dependencies {
|
2013-09-24 19:00:49 +08:00
|
|
|
classpath group: 'com.haulmont.gradle', name: 'cuba-plugin', version: cubaVersion
|
2013-02-06 23:32:13 +08:00
|
|
|
classpath group: 'com.haulmont.gradle', name: 'doc-plugin', version: docPluginVersion
|
2011-11-17 16:31:31 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-02-21 16:18:28 +08:00
|
|
|
apply(plugin: 'base')
|
2012-03-07 22:30:40 +08:00
|
|
|
apply(plugin: 'maven')
|
2011-11-17 16:31:31 +08:00
|
|
|
apply(plugin: 'idea')
|
|
|
|
apply(plugin: 'cuba')
|
2012-02-21 16:18:28 +08:00
|
|
|
apply(plugin: 'doc')
|
2011-11-17 16:31:31 +08:00
|
|
|
|
|
|
|
def sharedLibModule = project(':cuba-shared-lib')
|
|
|
|
def globalModule = project(':cuba-global')
|
|
|
|
def coreModule = project(':cuba-core')
|
|
|
|
def clientModule = project(':cuba-client')
|
|
|
|
def guiModule = project(':cuba-gui')
|
|
|
|
def desktopModule = project(':cuba-desktop')
|
2012-08-23 18:47:25 +08:00
|
|
|
def portalModule = project(':cuba-portal')
|
2013-09-03 16:36:16 +08:00
|
|
|
def webAuthModule = project(':cuba-web-auth')
|
2013-10-19 18:40:54 +08:00
|
|
|
def webToolkitModule = project(':cuba-web-toolkit')
|
|
|
|
def webModule = project(':cuba-web')
|
|
|
|
def webLegacyModule = project(':cuba-web6')
|
|
|
|
def webToolkitLegacyModule = project(':cuba-web6-toolkit')
|
2011-11-17 16:31:31 +08:00
|
|
|
|
2013-10-24 17:10:45 +08:00
|
|
|
def vaadinVersion = '7.1.7.cuba.2'
|
2013-10-19 18:40:54 +08:00
|
|
|
def vaadinLegacyVersion = '6.6.1.108'
|
|
|
|
def springVersion = '3.1.3.RELEASE'
|
2013-02-06 23:14:40 +08:00
|
|
|
|
2011-11-17 16:31:31 +08:00
|
|
|
def servletApi = [group: 'org.apache.tomcat', name: 'servlet-api', version: '6.0.20']
|
2013-08-15 22:39:37 +08:00
|
|
|
def groovyArtifact = [group: 'org.codehaus.groovy', name: 'groovy-all', version: '2.1.6']
|
2013-03-28 23:23:13 +08:00
|
|
|
def asm = [group: 'asm', name: 'asm', version: '3.3.1']
|
2013-06-27 21:11:23 +08:00
|
|
|
def poi = [group: 'com.haulmont.thirdparty', name: 'poi', version: '3.9.20130515']
|
2012-04-28 19:07:00 +08:00
|
|
|
def postgres = [group: 'postgresql', name: 'postgresql', version: '9.1-901.jdbc4']
|
2013-06-07 15:34:15 +08:00
|
|
|
def hsqldb = [group: 'org.hsqldb', name: 'hsqldb', version: '2.2.9']
|
2011-11-17 16:31:31 +08:00
|
|
|
|
2013-10-19 18:40:54 +08:00
|
|
|
/* Legacy dependencies */
|
|
|
|
def vaadinLegacy = [group: 'com.haulmont.thirdparty', name: 'vaadin', version: vaadinLegacyVersion]
|
|
|
|
def popupButtonLegacy = [group: 'com.haulmont.thirdparty', name: 'popupbutton', version: '1.0.0']
|
|
|
|
def gwtUser = [group: 'com.google.gwt', name: 'gwt-user', version: '2.3.0']
|
|
|
|
def gwtDev = [group: 'com.google.gwt', name: 'gwt-dev', version: '2.3.0']
|
|
|
|
def gwtServlets = [group: 'com.google.gwt', name: 'gwt-servlet', version: '2.3.0']
|
|
|
|
def validationApi = [group: 'javax.validation', name: 'validation-api', version: '1.0.0.GA']
|
|
|
|
|
|
|
|
/* Shared web dependencies */
|
|
|
|
def commonsUpload = [group: 'commons-fileupload', name: 'commons-fileupload', version: '1.2.2']
|
|
|
|
def casClient = [group: 'org.jasig.cas', name: 'cas-client-core', version: '3.1.10']
|
|
|
|
|
2013-05-15 16:11:34 +08:00
|
|
|
configure([sharedLibModule, globalModule, coreModule, clientModule, guiModule, webToolkitModule,
|
2013-10-19 18:40:54 +08:00
|
|
|
webModule, desktopModule, portalModule, webAuthModule, webLegacyModule, webToolkitLegacyModule]) {
|
2011-11-17 16:31:31 +08:00
|
|
|
apply(plugin: 'java')
|
|
|
|
apply(plugin: 'idea')
|
|
|
|
apply(plugin: 'maven')
|
|
|
|
apply(plugin: 'code-quality')
|
|
|
|
apply(plugin: 'cuba')
|
|
|
|
|
|
|
|
dependencies {
|
2012-07-17 20:57:53 +08:00
|
|
|
compile(group: 'commons-logging', name: 'commons-logging', version: '1.1.1')
|
2013-03-28 23:23:13 +08:00
|
|
|
compile(group: 'commons-lang', name: 'commons-lang', version: '2.6')
|
2012-07-17 20:57:53 +08:00
|
|
|
compile(group: 'commons-collections', name: 'commons-collections', version: '3.2.1')
|
|
|
|
compile(group: 'commons-io', name: 'commons-io', version: '1.4')
|
2013-02-06 23:32:13 +08:00
|
|
|
compile(group: 'commons-codec', name: 'commons-codec', version: '1.6')
|
2012-07-17 20:57:53 +08:00
|
|
|
compile(group: 'commons-cli', name: 'commons-cli', version: '1.2')
|
|
|
|
compile(group: 'commons-pool', name: 'commons-pool', version: '1.5.1')
|
2013-03-28 23:23:13 +08:00
|
|
|
compile(group: 'org.apache.commons', name: 'commons-compress', version: '1.1')
|
2012-07-17 20:57:53 +08:00
|
|
|
compile(group: 'dom4j', name: 'dom4j', version: '1.6.1')
|
|
|
|
compile(group: 'javax.mail', name: 'mail', version: '1.4.1')
|
|
|
|
compile(group: 'log4j', name: 'log4j', version: '1.2.16')
|
2013-02-19 22:51:49 +08:00
|
|
|
compile(group: 'org.perf4j', name: 'perf4j', version: '0.9.16')
|
2013-02-06 23:32:13 +08:00
|
|
|
compile(group: 'com.google.code.findbugs', name: 'jsr305', version: '2.0.1')
|
2012-07-17 20:57:53 +08:00
|
|
|
compile(group: 'com.haulmont.thirdparty', name: 'javaee-api', version: '6.0.20091228')
|
2013-08-15 19:23:20 +08:00
|
|
|
compile(group: 'org.codehaus.groovy', name: 'groovy-all', version: '2.1.6')
|
2011-11-17 16:31:31 +08:00
|
|
|
compile(group: 'antlr', name: 'antlr', version: '2.7.7')
|
|
|
|
compile(asm)
|
2012-10-04 20:43:15 +08:00
|
|
|
compile(group: 'com.google.guava', name: 'guava', version: '13.0.1')
|
2013-07-24 18:37:42 +08:00
|
|
|
compile(group: 'org.apache.openjpa', name: 'openjpa', version: '2.2.2')
|
2011-11-17 16:31:31 +08:00
|
|
|
compile(group: 'net.sourceforge.serp', name: 'serp', version: '1.13.1')
|
2013-08-15 19:23:20 +08:00
|
|
|
compile(group: 'org.antlr', name: 'antlr-runtime', version: '3.2')
|
|
|
|
compile(group: 'org.freemarker', name: 'freemarker', version: '2.3.16')
|
2012-07-17 20:57:53 +08:00
|
|
|
compile(group: 'aopalliance', name: 'aopalliance', version: '1.0')
|
2013-10-19 18:40:54 +08:00
|
|
|
compile(group: 'org.springframework', name: 'spring-core', version: springVersion)
|
|
|
|
compile(group: 'org.springframework', name: 'spring-beans', version: springVersion)
|
|
|
|
compile(group: 'org.springframework', name: 'spring-context', version: springVersion)
|
|
|
|
compile(group: 'org.springframework', name: 'spring-web', version: springVersion)
|
2011-11-17 16:31:31 +08:00
|
|
|
|
|
|
|
testCompile(group: 'com.haulmont.thirdparty', name: 'jmockit', version: '0.999.10')
|
|
|
|
testCompile(group: 'junit', name: 'junit', version: '4.5')
|
|
|
|
}
|
|
|
|
|
|
|
|
task sourceJar(type: Jar) {
|
|
|
|
from file('src')
|
2013-08-07 20:45:00 +08:00
|
|
|
exclude "com/haulmont/cuba/security/app/UserSessions.java"
|
2011-11-17 16:31:31 +08:00
|
|
|
classifier = 'sources'
|
|
|
|
}
|
|
|
|
|
|
|
|
artifacts {
|
|
|
|
archives sourceJar
|
|
|
|
}
|
2013-08-15 19:23:20 +08:00
|
|
|
|
2011-11-17 16:31:31 +08:00
|
|
|
String checkstyleConfigDir = '../../config/checkstyle'
|
|
|
|
checkstyleConfigFileName = "$checkstyleConfigDir/checkstyle.xml"
|
|
|
|
checkstyleProperties.checkstyleConfigDir = checkstyleConfigFile.parentFile // Required for suppressions.xml linking
|
|
|
|
checkstyleMain << {
|
|
|
|
def checkstyleDir = "${project.buildDir}/checkstyle".toString()
|
|
|
|
ant.xslt('in': "$checkstyleDir/main.xml", out: "$checkstyleDir/$project.name-checkstyle.html", style: "$checkstyleConfigDir/checkstyle.xsl")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
configure(sharedLibModule) {
|
|
|
|
dependencies {
|
|
|
|
jdbc(postgres)
|
|
|
|
jdbc(hsqldb)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
configure(globalModule) {
|
2011-11-22 19:42:09 +08:00
|
|
|
dependencies {
|
2012-09-06 23:18:15 +08:00
|
|
|
provided(servletApi)
|
2011-11-22 19:42:09 +08:00
|
|
|
}
|
|
|
|
|
2013-04-12 18:51:30 +08:00
|
|
|
task generateReleaseTimestamp(type: CubaReleaseTimeStamp) {
|
|
|
|
releaseTimeStampPath = "$buildDir/classes/main/com/haulmont/cuba/core/global/release.timestamp"
|
|
|
|
releaseNumberPath = "$buildDir/classes/main/com/haulmont/cuba/core/global/release.number"
|
2011-11-17 16:31:31 +08:00
|
|
|
}
|
2013-04-09 18:15:55 +08:00
|
|
|
|
2013-04-12 18:51:30 +08:00
|
|
|
task enhance(type: CubaEnhancing) {
|
2013-04-09 18:15:55 +08:00
|
|
|
persistenceXml = "$globalModule.projectDir/src/cuba-persistence.xml"
|
|
|
|
}
|
2011-11-17 16:31:31 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
configure(coreModule) {
|
|
|
|
dependencies {
|
|
|
|
compile(globalModule)
|
|
|
|
compile(sharedLibModule)
|
2012-07-02 15:45:37 +08:00
|
|
|
compile(group: 'com.haulmont.thirdparty', name: 'xstream', version: '1.4.2.20120702')
|
2011-11-17 16:31:31 +08:00
|
|
|
runtime(group: 'xpp3', name: 'xpp3_min', version: '1.1.4c')
|
2013-08-15 19:23:20 +08:00
|
|
|
runtime(group: 'xmlpull', name: 'xmlpull', version: '1.1.3.1')
|
2011-11-17 16:31:31 +08:00
|
|
|
compile(group: 'org.jgroups', name: 'jgroups', version: '2.12.1.Final')
|
2012-06-14 15:47:48 +08:00
|
|
|
compile(group: 'org.aspectj', name: 'aspectjrt', version: '1.6.12')
|
|
|
|
compile(group: 'org.aspectj', name: 'aspectjweaver', version: '1.6.12')
|
2012-01-19 18:52:03 +08:00
|
|
|
compile(group: 'org.mybatis', name: 'mybatis', version: '3.0.5')
|
|
|
|
compile(group: 'org.mybatis', name: 'mybatis-spring', version: '1.0.1')
|
2011-11-17 16:31:31 +08:00
|
|
|
compile(group: 'org.json', name: 'json', version: '20090211')
|
2013-10-19 18:40:54 +08:00
|
|
|
compile(group: 'org.springframework', name: 'spring-context-support', version: springVersion)
|
|
|
|
compile(group: 'org.springframework', name: 'spring-orm', version: springVersion)
|
|
|
|
compile(group: 'org.springframework', name: 'spring-tx', version: springVersion)
|
|
|
|
compile(group: 'org.springframework', name: 'spring-webmvc', version: springVersion)
|
2012-07-20 19:31:50 +08:00
|
|
|
compile(poi) // POI is actually not required by core, but remains here to simplify dependencies for reports project
|
2011-11-17 16:31:31 +08:00
|
|
|
|
|
|
|
provided(servletApi)
|
|
|
|
|
|
|
|
jdbc(postgres)
|
|
|
|
jdbc(hsqldb)
|
|
|
|
|
|
|
|
testRuntime(servletApi)
|
|
|
|
testRuntime(hsqldb)
|
|
|
|
}
|
|
|
|
|
2013-08-19 18:41:51 +08:00
|
|
|
task recompileNoDebug(type: JavaCompile) {
|
|
|
|
source = sourceSets.main.java
|
|
|
|
classpath = sourceSets.main.compileClasspath
|
|
|
|
destinationDir = new File(buildDir, 'nodebug-classes')
|
|
|
|
options.debug = false
|
|
|
|
}
|
|
|
|
|
|
|
|
jar {
|
|
|
|
exclude { details ->
|
|
|
|
return details.file == new File("${sourceSets.main.output.classesDir}/com/haulmont/cuba/security/app/UserSessions.class")
|
|
|
|
}
|
|
|
|
from("$buildDir/nodebug-classes") {
|
|
|
|
include "com/haulmont/cuba/security/app/UserSessions.class"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
jar.dependsOn(recompileNoDebug)
|
|
|
|
|
2011-11-17 16:31:31 +08:00
|
|
|
test {
|
|
|
|
scanForTestClasses = false
|
|
|
|
includes = ['**/*Test.class']
|
2012-06-14 16:54:48 +08:00
|
|
|
jvmArgs '-XX:-UseSplitVerifier'
|
2011-11-17 16:31:31 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
task testsJar(dependsOn: testClasses, type: Jar) {
|
|
|
|
from sourceSets.test.output.classesDir
|
|
|
|
from sourceSets.test.output.resourcesDir
|
2013-03-28 23:23:13 +08:00
|
|
|
include 'com/haulmont/cuba/core/CubaTestCase*.class'
|
|
|
|
include 'com/haulmont/cuba/testsupport/*'
|
|
|
|
include '*'
|
|
|
|
includeEmptyDirs = false
|
2011-11-17 16:31:31 +08:00
|
|
|
classifier = 'tests'
|
|
|
|
}
|
|
|
|
|
|
|
|
assembleDbScripts << {
|
|
|
|
copy {
|
|
|
|
from new File(projectDir, 'db')
|
|
|
|
into "$buildDir/db/10-cuba"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
artifacts {
|
|
|
|
archives testsJar
|
|
|
|
}
|
|
|
|
|
|
|
|
task deploy(dependsOn: assemble, type: CubaDeployment) {
|
|
|
|
appName = 'cuba-core'
|
2012-07-17 20:57:53 +08:00
|
|
|
appJars('cuba-global', 'cuba-core')
|
2011-11-17 16:31:31 +08:00
|
|
|
}
|
2013-06-11 20:40:01 +08:00
|
|
|
|
|
|
|
def hsqlDbName = 'cubadb'
|
|
|
|
|
|
|
|
task startDb(description: 'Starts local HSQLDB server', type: CubaHsqlStart) {
|
|
|
|
dbName = hsqlDbName
|
|
|
|
}
|
|
|
|
|
|
|
|
task stopDb(description: 'Stops local HSQLDB server', type: CubaHsqlStop) {
|
|
|
|
dbName = hsqlDbName
|
|
|
|
}
|
|
|
|
|
|
|
|
task removeDb(description: 'Removes local HSQL database', type: Delete) {
|
|
|
|
delete new File("$rootProject.projectDir/data")
|
|
|
|
}
|
|
|
|
|
|
|
|
task killDb(description: 'Kill local HSQLDB server process running on port 9001', type: CubaKillProcess) {
|
|
|
|
port = 9001
|
|
|
|
}
|
|
|
|
|
|
|
|
task createDb(dependsOn: assemble, description: 'Creates local HSQL database', type: CubaDbCreation) {
|
|
|
|
dbms = 'hsql'
|
|
|
|
dbName = hsqlDbName
|
|
|
|
dbUser = 'sa'
|
|
|
|
dbPassword = ''
|
|
|
|
}
|
2011-11-17 16:31:31 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
configure(clientModule) {
|
|
|
|
dependencies {
|
|
|
|
compile(globalModule)
|
|
|
|
}
|
|
|
|
|
|
|
|
task testsJar(dependsOn: testClasses, type: Jar) {
|
|
|
|
from sourceSets.test.output.classesDir
|
|
|
|
classifier = 'tests'
|
|
|
|
}
|
|
|
|
|
|
|
|
artifacts {
|
|
|
|
archives testsJar
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
configure(guiModule) {
|
|
|
|
apply(plugin: 'groovy')
|
|
|
|
|
|
|
|
sourceSets {
|
|
|
|
main {
|
|
|
|
groovy { srcDir 'src' }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
compile(globalModule)
|
|
|
|
compile(clientModule)
|
|
|
|
compile(poi)
|
2013-01-10 14:31:43 +08:00
|
|
|
compile(group: 'org.apache.httpcomponents', name: 'httpclient', version: '4.2.2')
|
2013-07-02 18:55:53 +08:00
|
|
|
compile(groovyArtifact)
|
|
|
|
compile(asm)
|
2011-11-17 16:31:31 +08:00
|
|
|
|
|
|
|
testCompile(clientModule.sourceSets.test.output)
|
|
|
|
}
|
|
|
|
|
2013-04-12 18:51:30 +08:00
|
|
|
task enhanceTransient(type: CubaEnhanceTransient) {
|
2013-04-09 18:15:55 +08:00
|
|
|
classes = [
|
|
|
|
'com.haulmont.cuba.gui.security.entity.AbstractPermissionTarget',
|
|
|
|
'com.haulmont.cuba.gui.security.entity.AttributeTarget',
|
|
|
|
'com.haulmont.cuba.gui.security.entity.BasicPermissionTarget',
|
|
|
|
'com.haulmont.cuba.gui.security.entity.MultiplePermissionTarget',
|
|
|
|
'com.haulmont.cuba.gui.security.entity.OperationPermissionTarget',
|
|
|
|
'com.haulmont.cuba.gui.security.entity.UiPermissionTarget'
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
2011-11-17 16:31:31 +08:00
|
|
|
test {
|
|
|
|
scanForTestClasses = false
|
|
|
|
includes = ['**/*Test.class']
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
configure(webModule) {
|
|
|
|
dependencies {
|
|
|
|
compile(sharedLibModule)
|
|
|
|
compile(globalModule)
|
|
|
|
compile(clientModule)
|
|
|
|
compile(guiModule)
|
2013-09-03 16:36:16 +08:00
|
|
|
compile(webAuthModule)
|
2013-02-06 23:14:40 +08:00
|
|
|
|
2013-10-19 18:40:54 +08:00
|
|
|
compile(commonsUpload)
|
|
|
|
compile(casClient)
|
|
|
|
compile(group: 'org.springframework', name: 'spring-webmvc', version: springVersion)
|
2011-11-17 16:31:31 +08:00
|
|
|
|
2013-02-06 23:14:40 +08:00
|
|
|
compile(group: 'com.vaadin', name: 'vaadin-server', version: vaadinVersion)
|
2013-10-19 18:40:54 +08:00
|
|
|
/* Vaadin addons */
|
2013-07-31 17:01:52 +08:00
|
|
|
compile(group: 'com.haulmont.thirdparty', name: 'popupbutton', version: '2.2.1')
|
2013-10-08 15:59:05 +08:00
|
|
|
compile(group: 'org.vaadin.addons', name: 'aceeditor', version: '0.8.9')
|
2011-11-17 16:31:31 +08:00
|
|
|
|
2013-02-06 23:14:40 +08:00
|
|
|
provided(servletApi)
|
2011-11-17 16:31:31 +08:00
|
|
|
}
|
|
|
|
|
2013-03-19 23:46:48 +08:00
|
|
|
def resourceBuildTimeStamp = new java.text.SimpleDateFormat('yyyy_MM_dd_HH_mm').format(new Date())
|
|
|
|
|
|
|
|
task resourceTimeStampInject() << {
|
|
|
|
new File("${project.buildDir}/classes/main/com/haulmont/cuba/web/resources.timestamp").write(resourceBuildTimeStamp)
|
|
|
|
}
|
|
|
|
|
|
|
|
classes.dependsOn resourceTimeStampInject
|
|
|
|
|
2013-02-12 16:57:33 +08:00
|
|
|
task buildScssThemes(type: CubaWebScssThemeCreation) {
|
2013-03-19 23:46:48 +08:00
|
|
|
buildTimeStamp = resourceBuildTimeStamp
|
2013-04-01 16:45:19 +08:00
|
|
|
themes = ['havana']
|
2013-02-12 16:57:33 +08:00
|
|
|
destDir = "${project.buildDir}/web/VAADIN/themes"
|
|
|
|
// compress = true
|
2013-05-14 20:26:39 +08:00
|
|
|
sprites = true
|
2013-02-12 16:57:33 +08:00
|
|
|
// cleanup = true
|
2011-11-17 16:31:31 +08:00
|
|
|
}
|
|
|
|
|
2013-02-06 23:14:40 +08:00
|
|
|
def webOutDir = file("$buildDir/web")
|
2013-02-14 20:15:17 +08:00
|
|
|
task webArchive(dependsOn: buildScssThemes, type: Zip) {
|
2011-11-17 16:31:31 +08:00
|
|
|
from file('web')
|
|
|
|
from webOutDir
|
|
|
|
exclude '**/web.xml', '**/app.properties'
|
|
|
|
classifier = 'web'
|
|
|
|
}
|
|
|
|
|
2013-05-14 20:26:39 +08:00
|
|
|
task scssThemesZip(type: Zip) {
|
2013-05-14 22:14:41 +08:00
|
|
|
from webModule.file('themes')
|
2013-05-14 20:26:39 +08:00
|
|
|
exclude '**/.*'
|
|
|
|
|
|
|
|
version = artifactVersion + (isSnapshot ? '-SNAPSHOT' : '')
|
2013-05-14 22:14:41 +08:00
|
|
|
classifier = 'web-themes'
|
2013-05-14 20:26:39 +08:00
|
|
|
}
|
|
|
|
|
2011-11-17 16:31:31 +08:00
|
|
|
artifacts {
|
|
|
|
archives webArchive
|
2013-05-14 22:14:41 +08:00
|
|
|
themes scssThemesZip
|
2011-11-17 16:31:31 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
task deploy(dependsOn: assemble, type: CubaDeployment) {
|
|
|
|
appName = 'cuba'
|
2013-10-19 18:40:54 +08:00
|
|
|
appJars('cuba-global', 'cuba-client', 'cuba-gui', 'cuba-web', 'cuba-web-auth',
|
|
|
|
'vaadin-server', 'vaadin-shared-deps', 'vaadin-shared', 'vaadin-theme-compiler',
|
|
|
|
'aceeditor', 'popupbutton')
|
2011-11-17 16:31:31 +08:00
|
|
|
}
|
2013-02-06 23:14:40 +08:00
|
|
|
|
2011-11-17 16:31:31 +08:00
|
|
|
deploy << {
|
2013-02-06 23:14:40 +08:00
|
|
|
copy {
|
|
|
|
from "$buildDir/web"
|
|
|
|
into "$tomcatDir/webapps/cuba"
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-09-03 16:36:16 +08:00
|
|
|
configure(webAuthModule) {
|
|
|
|
dependencies {
|
|
|
|
compile(globalModule)
|
|
|
|
|
|
|
|
provided(servletApi)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-02-06 23:14:40 +08:00
|
|
|
configure(webToolkitModule) {
|
2013-04-19 19:47:47 +08:00
|
|
|
configurations {
|
|
|
|
widgetSetBuilding
|
|
|
|
}
|
|
|
|
|
2013-02-06 23:14:40 +08:00
|
|
|
dependencies {
|
|
|
|
compile(webModule)
|
|
|
|
|
|
|
|
compile(group: 'com.vaadin', name: 'vaadin-client-compiled', version: vaadinVersion)
|
|
|
|
compile(group: 'com.vaadin', name: 'vaadin-client', version: vaadinVersion)
|
|
|
|
|
2013-02-18 16:38:23 +08:00
|
|
|
compile(group: 'com.vaadin', name: 'vaadin-client-compiler', version: vaadinVersion)
|
2013-04-19 19:47:47 +08:00
|
|
|
|
|
|
|
widgetSetBuilding(webModule)
|
2013-02-06 23:14:40 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
def webOutDir = file("$buildDir/web")
|
2013-04-12 18:51:30 +08:00
|
|
|
task buildWidgetSet(type: CubaWidgetSetBuilding) {
|
2013-02-06 23:14:40 +08:00
|
|
|
widgetSetsDir = "$webOutDir/VAADIN/widgetsets"
|
2013-02-11 19:32:51 +08:00
|
|
|
widgetSetClass = 'com.haulmont.cuba.web.toolkit.ui.WidgetSet'
|
2013-02-06 23:14:40 +08:00
|
|
|
//jvmArgs('-Xdebug', '-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000')
|
2013-08-15 19:23:20 +08:00
|
|
|
compilerArgs = ['-style': 'PRETTY', '-logLevel': 'INFO', '-localWorkers': '2']
|
2013-02-06 23:14:40 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
task webArchive(dependsOn: buildWidgetSet, type: Zip) {
|
|
|
|
from file('web')
|
|
|
|
from webOutDir
|
2013-02-12 22:46:15 +08:00
|
|
|
exclude '**/web.xml', '**/app.properties', '**/gwt-unitCache/'
|
2013-02-06 23:14:40 +08:00
|
|
|
classifier = 'web'
|
|
|
|
}
|
|
|
|
|
|
|
|
artifacts {
|
|
|
|
archives webArchive
|
|
|
|
}
|
|
|
|
|
|
|
|
task deploy(dependsOn: buildWidgetSet) << {
|
2011-11-17 16:31:31 +08:00
|
|
|
delete {
|
|
|
|
"$tomcatDir/webapps/cuba/VAADIN/widgetsets"
|
|
|
|
}
|
|
|
|
copy {
|
|
|
|
from "$buildDir/web"
|
|
|
|
into "$tomcatDir/webapps/cuba"
|
2013-02-12 22:46:15 +08:00
|
|
|
exclude '**/gwt-unitCache/'
|
2011-11-17 16:31:31 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
configure(desktopModule) {
|
|
|
|
apply(plugin: 'application')
|
|
|
|
mainClassName = 'com.haulmont.cuba.desktop.App'
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
compile(globalModule)
|
|
|
|
compile(clientModule)
|
|
|
|
compile(guiModule)
|
2012-02-16 21:42:05 +08:00
|
|
|
compile(group: 'com.miglayout', name: 'miglayout-swing', version: '4.2')
|
2011-11-17 16:31:31 +08:00
|
|
|
compile(group: 'com.haulmont.thirdparty', name: 'glazedlists', version: '1.9.20110801')
|
2013-09-23 19:59:13 +08:00
|
|
|
compile(group: 'com.haulmont.thirdparty', name: 'swingx-core', version: '1.6.5-1')
|
2011-11-17 16:31:31 +08:00
|
|
|
|
2012-01-19 18:52:03 +08:00
|
|
|
assemble.dependsOn = [classes]
|
2011-11-17 16:31:31 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
installApp {
|
|
|
|
into("$buildDir/app/" + applicationName)
|
|
|
|
}
|
|
|
|
|
|
|
|
task desktopInstall(dependsOn: assemble) << {
|
|
|
|
jar.execute()
|
|
|
|
startScripts.execute()
|
|
|
|
installApp.execute()
|
|
|
|
}
|
|
|
|
|
|
|
|
task desktopDist(dependsOn: assemble) << {
|
|
|
|
distZip.execute()
|
|
|
|
}
|
|
|
|
|
|
|
|
task desktopStart(dependsOn: desktopInstall) << {
|
|
|
|
run.execute()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-08-23 18:47:25 +08:00
|
|
|
configure(portalModule) {
|
|
|
|
apply(plugin: 'groovy')
|
|
|
|
|
|
|
|
sourceSets {
|
|
|
|
main {
|
|
|
|
groovy { srcDir 'src' }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-02-06 23:32:13 +08:00
|
|
|
def springSecurityVersion = '3.1.3.RELEASE'
|
2012-08-23 18:47:25 +08:00
|
|
|
|
|
|
|
dependencies {
|
|
|
|
compile(globalModule)
|
|
|
|
compile(clientModule)
|
|
|
|
compile(sharedLibModule)
|
|
|
|
provided(servletApi)
|
|
|
|
compile(group: 'org.springframework', name: 'spring-webmvc', version: springSecurityVersion)
|
|
|
|
compile(group: 'org.springframework.security', name: 'spring-security-core', version: springSecurityVersion)
|
|
|
|
compile(group: 'org.springframework.security', name: 'spring-security-web', version: springSecurityVersion)
|
|
|
|
compile(group: 'org.springframework.security', name: 'spring-security-config', version: springSecurityVersion)
|
|
|
|
compile(group: 'org.springframework.security', name: 'spring-security-taglibs', version: springSecurityVersion)
|
2013-01-15 23:51:34 +08:00
|
|
|
compile(group: 'org.json', name: 'json', version: '20090211')
|
2013-07-02 18:55:53 +08:00
|
|
|
compile(groovyArtifact)
|
|
|
|
compile(asm)
|
2012-08-23 18:47:25 +08:00
|
|
|
|
2013-10-19 18:40:54 +08:00
|
|
|
compile(group: 'org.springframework', name: 'spring-tx', version: springVersion)
|
|
|
|
compile(group: 'org.springframework', name: 'spring-jdbc', version: springVersion)
|
2012-08-23 18:47:25 +08:00
|
|
|
|
|
|
|
testCompile(clientModule.sourceSets.test.output)
|
|
|
|
}
|
|
|
|
|
|
|
|
test {
|
|
|
|
scanForTestClasses = false
|
|
|
|
includes = ['**/*Test.class']
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-10-19 18:40:54 +08:00
|
|
|
configure(webLegacyModule) {
|
|
|
|
configurations {
|
|
|
|
gwtBuilding
|
|
|
|
}
|
|
|
|
|
|
|
|
dependencies {
|
|
|
|
compile(sharedLibModule)
|
|
|
|
compile(globalModule)
|
|
|
|
compile(clientModule)
|
|
|
|
compile(guiModule)
|
|
|
|
compile(webAuthModule)
|
|
|
|
|
|
|
|
compile(commonsUpload)
|
|
|
|
compile(casClient)
|
|
|
|
|
|
|
|
compile(group: 'org.springframework', name: 'spring-webmvc', version: springVersion)
|
|
|
|
|
|
|
|
compile(vaadinLegacy)
|
|
|
|
compile(popupButtonLegacy)
|
|
|
|
|
|
|
|
provided(webToolkitLegacyModule)
|
|
|
|
provided(gwtUser)
|
|
|
|
provided(gwtDev)
|
|
|
|
provided(gwtServlets)
|
|
|
|
provided(validationApi)
|
|
|
|
provided(servletApi)
|
|
|
|
|
|
|
|
gwtBuilding(validationApi + [classifier: 'sources'])
|
|
|
|
}
|
|
|
|
|
2013-10-23 22:15:30 +08:00
|
|
|
def resourceBuildTimeStamp = new java.text.SimpleDateFormat('yyyy_MM_dd_HH_mm').format(new Date())
|
|
|
|
|
|
|
|
task resourceTimeStampInject() << {
|
|
|
|
new File("${project.buildDir}/classes/main/com/haulmont/cuba/web/resources.timestamp").write(resourceBuildTimeStamp)
|
|
|
|
}
|
|
|
|
|
|
|
|
classes.dependsOn resourceTimeStampInject
|
|
|
|
|
|
|
|
task buildScssThemes(type: CubaWebScssThemeCreation) {
|
|
|
|
buildTimeStamp = resourceBuildTimeStamp
|
|
|
|
themes = ['havana']
|
|
|
|
destDir = "${project.buildDir}/web/VAADIN/themes"
|
|
|
|
// compress = true
|
|
|
|
// sprites = true
|
|
|
|
// cleanup = true
|
|
|
|
}
|
|
|
|
|
2013-10-19 18:40:54 +08:00
|
|
|
task buildThemes(type: CubaWebThemeCreation) {
|
|
|
|
themes = [
|
|
|
|
// [themeName: 'peyto', destFile: 'styles-include.css'],
|
|
|
|
[themeName: 'havana', destFile: 'styles-include.css']
|
|
|
|
]
|
|
|
|
cssDir = 'css/VAADIN/themes'
|
|
|
|
destDir = "$buildDir/web/VAADIN/themes"
|
|
|
|
}
|
|
|
|
|
|
|
|
File webOutDir = new File("$buildDir/web")
|
|
|
|
task buildWidgetSet(dependsOn: compileJava, type: CubaVaadinLegacyBuilding) {
|
|
|
|
widgetSetsDir = "$webOutDir/VAADIN/widgetsets"
|
|
|
|
widgetSetModules = [webToolkitLegacyModule]
|
|
|
|
widgetSetClass = 'com.haulmont.cuba.toolkit.gwt.WidgetSet'
|
|
|
|
// jvmArgs('-Xdebug', '-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000')
|
|
|
|
// compilerArgs = ['-style' : 'PRETTY', '-localWorkers' : '2']
|
|
|
|
}
|
|
|
|
|
2013-10-23 22:15:30 +08:00
|
|
|
task webArchive(dependsOn: [buildWidgetSet, buildScssThemes], type: Zip) {
|
2013-10-19 18:40:54 +08:00
|
|
|
from file('web')
|
|
|
|
from webOutDir
|
|
|
|
exclude '**/web.xml', '**/app.properties'
|
|
|
|
classifier = 'web'
|
|
|
|
}
|
|
|
|
|
2013-10-23 22:15:30 +08:00
|
|
|
task scssThemesZip(type: Zip) {
|
|
|
|
from webModule.file('themes')
|
|
|
|
exclude '**/.*'
|
|
|
|
|
|
|
|
version = artifactVersion + (isSnapshot ? '-SNAPSHOT' : '')
|
|
|
|
classifier = 'web-themes'
|
|
|
|
}
|
|
|
|
|
2013-10-19 18:40:54 +08:00
|
|
|
artifacts {
|
|
|
|
archives webArchive
|
2013-10-23 22:15:30 +08:00
|
|
|
themes scssThemesZip
|
2013-10-19 18:40:54 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
task deploy(dependsOn: assemble, type: CubaDeployment) {
|
|
|
|
appName = 'cuba6'
|
2013-10-21 16:56:01 +08:00
|
|
|
appJars('cuba-global', 'cuba-client', 'cuba-gui', 'cuba-web-auth', 'cuba-web6',
|
2013-10-19 18:40:54 +08:00
|
|
|
'vaadin', 'popupbutton')
|
|
|
|
}
|
|
|
|
|
|
|
|
deploy << {
|
|
|
|
delete {
|
2013-10-21 16:56:01 +08:00
|
|
|
"$tomcatDir/webapps/cuba6/VAADIN/widgetsets"
|
2013-10-19 18:40:54 +08:00
|
|
|
}
|
|
|
|
copy {
|
|
|
|
from "$buildDir/web"
|
2013-10-21 16:56:01 +08:00
|
|
|
into "$tomcatDir/webapps/cuba6"
|
2013-10-19 18:40:54 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
jar {
|
|
|
|
manifest {
|
|
|
|
attributes("Vaadin-Widgetsets": "com.haulmont.cuba.toolkit.gwt.WidgetSet")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
configure(webToolkitLegacyModule) {
|
|
|
|
dependencies {
|
|
|
|
compile(vaadinLegacy)
|
|
|
|
compile(popupButtonLegacy)
|
|
|
|
|
|
|
|
provided(gwtUser)
|
|
|
|
provided(gwtDev)
|
|
|
|
provided(gwtServlets)
|
|
|
|
provided(validationApi)
|
|
|
|
}
|
|
|
|
|
|
|
|
jar {
|
|
|
|
manifest {
|
|
|
|
attributes("Vaadin-Widgetsets": "com.haulmont.cuba.toolkit.gwt.WidgetSet")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-11-17 16:31:31 +08:00
|
|
|
task restart(dependsOn: ['stop', ':cuba-core:deploy', ':cuba-web:deploy'], description: 'Redeploys applications and restarts local Tomcat') << {
|
|
|
|
ant.waitfor(maxwait: 6, maxwaitunit: 'second', checkevery: 2, checkeveryunit: 'second') {
|
|
|
|
not {
|
|
|
|
socket(server: 'localhost', port: '8787')
|
|
|
|
}
|
|
|
|
}
|
|
|
|
start.execute()
|
|
|
|
}
|
|
|
|
|
2012-02-21 16:18:28 +08:00
|
|
|
/***************************** Documentation *****************************/
|
|
|
|
|
|
|
|
// These variables must be the project properties
|
2012-06-14 15:47:48 +08:00
|
|
|
ext.docSrcDir = file('doc/content')
|
|
|
|
ext.docToolsDir = file('doc/tools')
|
|
|
|
ext.docCssDir = new File(docToolsDir, 'css')
|
|
|
|
ext.docDstDir = new File("$buildDir/doc")
|
|
|
|
ext.docTmpDir = new File("$buildDir/tmp/doc")
|
2012-02-21 16:18:28 +08:00
|
|
|
|
|
|
|
task transformManual(type: TransformDocbook) {
|
|
|
|
sourceDir = new File(docSrcDir, 'manual/ru')
|
|
|
|
sourceFile = new File(sourceDir, 'manual.xml')
|
|
|
|
destFile = new File(docTmpDir, 'manual/ru/manual.xml')
|
|
|
|
classpath = configurations.buildDoc
|
|
|
|
}
|
|
|
|
|
2013-02-06 23:32:13 +08:00
|
|
|
/*task buildManualXhtml(type: Docbook2Xhtml, dependsOn: transformManual) {
|
2012-09-07 21:17:20 +08:00
|
|
|
source transformManual.destFile
|
|
|
|
destFile = new File(docTmpDir, 'manual-pdf/manual-pdf.html')
|
|
|
|
stylesheetName = 'pdf.xsl'
|
|
|
|
resources = fileTree(new File(docSrcDir, 'manual/ru')) {
|
|
|
|
include 'img/*.png'
|
|
|
|
include 'img/*.jpg'
|
|
|
|
}
|
|
|
|
resources += fileTree(docCssDir) {
|
|
|
|
include '*.css'
|
|
|
|
}
|
2013-02-06 23:32:13 +08:00
|
|
|
}*/
|
2012-09-07 21:17:20 +08:00
|
|
|
|
2013-02-06 23:32:13 +08:00
|
|
|
/*task buildManualPdf(type: Xhtml2Pdf, dependsOn: buildManualXhtml) {
|
2012-09-07 21:17:20 +08:00
|
|
|
inputs.dir docCssDir
|
|
|
|
sourceFile = buildManualXhtml.destFile
|
|
|
|
destFile = new File(docDstDir, 'manual/ru/pdf/manual.pdf')
|
|
|
|
classpath = configurations.buildDoc
|
|
|
|
fonts = zipTree(configurations.docFonts.singleFile)
|
2013-02-06 23:32:13 +08:00
|
|
|
}*/
|
2012-09-07 21:17:20 +08:00
|
|
|
|
2012-05-29 19:42:19 +08:00
|
|
|
task transformSecurity(type: TransformDocbook) {
|
|
|
|
sourceDir = new File(docSrcDir, 'security/ru')
|
|
|
|
sourceFile = new File(sourceDir, 'security.xml')
|
|
|
|
destFile = new File(docTmpDir, 'security/ru/security.xml')
|
|
|
|
classpath = configurations.buildDoc
|
|
|
|
}
|
|
|
|
|
2013-09-19 23:29:18 +08:00
|
|
|
def commonXslParameters = [
|
|
|
|
'toc.section.depth': '5',
|
|
|
|
'chunk.section.depth': '5',
|
|
|
|
'section.autolabel': '1',
|
|
|
|
'chapter.autolabel': '1',
|
|
|
|
'appendix.autolabel': 'A'
|
|
|
|
]
|
|
|
|
|
2013-08-29 23:56:29 +08:00
|
|
|
task buildManualWebHelp(type: DocBook2WebHelp, dependsOn: transformManual) {
|
|
|
|
sourceFile = transformManual.destFile
|
|
|
|
imagesDir = new File(transformManual.sourceDir, "img")
|
2013-08-30 16:38:30 +08:00
|
|
|
destDir = new File(docDstDir, "manual/ru/webhelp")
|
2013-08-29 23:56:29 +08:00
|
|
|
templateDir = new File(docToolsDir, "webhelp/template")
|
|
|
|
searchDir = new File(docToolsDir, "webhelp/search")
|
|
|
|
brand = "CUBA"
|
|
|
|
language = "ru"
|
2013-09-19 23:29:18 +08:00
|
|
|
xslParameters = commonXslParameters
|
|
|
|
}
|
|
|
|
|
|
|
|
task buildSecurityWebHelp(type: DocBook2WebHelp, dependsOn: transformSecurity) {
|
|
|
|
sourceFile = transformSecurity.destFile
|
|
|
|
imagesDir = new File(transformSecurity.sourceDir, "img")
|
|
|
|
destDir = new File(docDstDir, "security/ru/webhelp")
|
|
|
|
templateDir = new File(docToolsDir, "webhelp/template")
|
|
|
|
searchDir = new File(docToolsDir, "webhelp/search")
|
|
|
|
brand = "CUBA"
|
|
|
|
language = "ru"
|
|
|
|
xslParameters = commonXslParameters
|
2013-08-29 23:56:29 +08:00
|
|
|
}
|
|
|
|
|
2012-08-03 21:12:55 +08:00
|
|
|
task buildSecurityXhtml(type: Docbook2Xhtml, dependsOn: transformSecurity) {
|
|
|
|
source transformSecurity.destFile
|
|
|
|
destFile = new File(docTmpDir, 'security-pdf/security-pdf.html')
|
|
|
|
stylesheetName = 'pdf.xsl'
|
|
|
|
resources = fileTree(new File(docSrcDir, 'security/ru')) {
|
|
|
|
include 'img/*.png'
|
|
|
|
include 'img/*.jpg'
|
|
|
|
}
|
|
|
|
resources += fileTree(docCssDir) {
|
|
|
|
include '*.css'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
task buildSecurityPdf(type: Xhtml2Pdf, dependsOn: buildSecurityXhtml) {
|
|
|
|
inputs.dir docCssDir
|
|
|
|
sourceFile = buildSecurityXhtml.destFile
|
|
|
|
destFile = new File(docDstDir, 'security/ru/pdf/security.pdf')
|
|
|
|
classpath = configurations.buildDoc
|
|
|
|
fonts = zipTree(configurations.docFonts.singleFile)
|
|
|
|
}
|
|
|
|
|
2012-02-21 16:18:28 +08:00
|
|
|
task buildManualHtml(type: Docbook2Xhtml, dependsOn: transformManual) {
|
|
|
|
source transformManual.destFile
|
2012-03-01 15:05:08 +08:00
|
|
|
destDir = new File(docDstDir, 'manual/ru/html')
|
2012-02-21 16:18:28 +08:00
|
|
|
stylesheetName = 'html.xsl'
|
2012-06-14 15:47:48 +08:00
|
|
|
resources = fileTree(new File(docSrcDir, 'manual/ru')) {
|
2012-02-21 16:18:28 +08:00
|
|
|
include 'img/*.png'
|
|
|
|
include 'img/*.jpg'
|
|
|
|
}
|
2012-06-14 15:47:48 +08:00
|
|
|
resources += fileTree(docCssDir) {
|
2012-02-21 16:18:28 +08:00
|
|
|
include '*.css'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-05-29 19:42:19 +08:00
|
|
|
task buildSecurityHtml(type: Docbook2Xhtml, dependsOn: transformSecurity) {
|
|
|
|
source transformSecurity.destFile
|
|
|
|
destDir = new File(docDstDir, 'security/ru/html')
|
|
|
|
stylesheetName = 'html.xsl'
|
2012-06-14 15:47:48 +08:00
|
|
|
resources = fileTree(new File(docSrcDir, 'security/ru')) {
|
2012-05-29 19:42:19 +08:00
|
|
|
include 'img/*.png'
|
|
|
|
include 'img/*.jpg'
|
|
|
|
}
|
2012-06-14 15:47:48 +08:00
|
|
|
resources += fileTree(docCssDir) {
|
2012-05-29 19:42:19 +08:00
|
|
|
include '*.css'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-03-01 15:05:08 +08:00
|
|
|
task buildManualSingleHtml(type: Docbook2Xhtml, dependsOn: transformManual) {
|
|
|
|
source transformManual.destFile
|
|
|
|
destFile = new File(docDstDir, 'manual/ru/html-single/manual.html')
|
|
|
|
stylesheetName = 'html-single.xsl'
|
2012-06-14 15:47:48 +08:00
|
|
|
resources = fileTree(new File(docSrcDir, 'manual/ru')) {
|
2012-03-01 15:05:08 +08:00
|
|
|
include 'img/**/*.png'
|
|
|
|
include 'img/**/*.jpg'
|
|
|
|
}
|
2012-06-14 15:47:48 +08:00
|
|
|
resources += fileTree(docCssDir) {
|
2012-03-01 15:05:08 +08:00
|
|
|
include '*.css'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-05-29 19:42:19 +08:00
|
|
|
task buildSecuritySingleHtml(type: Docbook2Xhtml, dependsOn: transformSecurity) {
|
|
|
|
source transformSecurity.destFile
|
|
|
|
destFile = new File(docDstDir, 'security/ru/html-single/security.html')
|
|
|
|
stylesheetName = 'html-single.xsl'
|
2012-06-14 15:47:48 +08:00
|
|
|
resources = fileTree(new File(docSrcDir, 'security/ru')) {
|
2012-05-29 19:42:19 +08:00
|
|
|
include 'img/**/*.png'
|
|
|
|
include 'img/**/*.jpg'
|
|
|
|
}
|
2012-06-14 15:47:48 +08:00
|
|
|
resources += fileTree(docCssDir) {
|
2012-05-29 19:42:19 +08:00
|
|
|
include '*.css'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2012-02-21 16:18:28 +08:00
|
|
|
task buildDoc(type: Zip, description: 'Build documentation',
|
2013-09-19 23:29:18 +08:00
|
|
|
dependsOn: [buildManualSingleHtml, buildSecuritySingleHtml, buildSecurityPdf, buildManualWebHelp, buildSecurityWebHelp]) {
|
2013-08-15 19:23:20 +08:00
|
|
|
//dependsOn: [buildManualSingleHtml,buildManualPdf,buildSecuritySingleHtml,buildSecurityPdf]) {
|
2012-02-21 16:18:28 +08:00
|
|
|
from 'build/doc'
|
|
|
|
destinationDir = file('build/distributions')
|
|
|
|
baseName = 'cuba-doc'
|
|
|
|
version = artifactVersion + (isSnapshot ? '-SNAPSHOT' : '')
|
|
|
|
}
|
|
|
|
|
|
|
|
artifacts {
|
2012-08-03 20:08:45 +08:00
|
|
|
if (Boolean.valueOf(System.getProperty("buildDoc")))
|
|
|
|
archives buildDoc
|
2012-02-21 16:18:28 +08:00
|
|
|
}
|