cuba/build.gradle

810 lines
24 KiB
Groovy
Raw Normal View History

2011-12-07 19:01:29 +08:00
/*
2016-03-16 21:26:06 +08:00
* Copyright (c) 2008-2016 Haulmont.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
2013-09-24 19:00:49 +08:00
*/
2011-11-17 16:31:31 +08:00
buildscript {
2017-01-17 15:25:45 +08:00
ext.cubaVersion = '6.5-SNAPSHOT'
2013-09-24 19:00:49 +08:00
ext.cubaVersion = rootProject.hasProperty('buildVersion') ? rootProject['buildVersion'] : cubaVersion
println("CUBA Platform Version ${ext.cubaVersion}")
println("")
2011-11-17 16:31:31 +08:00
repositories {
mavenLocal()
maven {
credentials {
2016-03-24 17:39:31 +08:00
username System.getenv('HAULMONT_REPOSITORY_USER') ?: 'cuba'
password System.getenv('HAULMONT_REPOSITORY_PASSWORD') ?: 'cuba123'
2011-11-17 16:31:31 +08:00
}
2016-03-24 17:39:31 +08:00
url System.getenv('HAULMONT_REPOSITORY_URL') ?: 'https://repo.cuba-platform.com/content/groups/work'
2011-11-17 16:31:31 +08:00
}
}
dependencies {
2013-09-24 19:00:49 +08:00
classpath group: 'com.haulmont.gradle', name: 'cuba-plugin', version: cubaVersion
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')
cuba {
artifact {
group = 'com.haulmont.cuba'
version = project.cubaVersion.replace('-SNAPSHOT', '')
isSnapshot = project.cubaVersion.endsWith('-SNAPSHOT')
}
ide {
2016-01-05 18:48:49 +08:00
vcs = 'Git'
2016-03-16 19:16:50 +08:00
copyright = '''Copyright (c) 2008-$today.year Haulmont.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.'''
}
}
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')
def portalModule = project(':cuba-portal')
def restApiModule = project(':cuba-rest-api')
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 idpModule = project(':cuba-idp')
2011-11-17 16:31:31 +08:00
def webModuleThemesModule = project(':cuba-web-themes')
def coreTestsModule = project(':cuba-core-tests')
def clientTestsModule = project(':cuba-client-tests')
configure([sharedLibModule, globalModule, coreModule, clientModule, guiModule,
webModule, desktopModule, portalModule, webAuthModule, restApiModule, idpModule]) {
2011-11-17 16:31:31 +08:00
apply(plugin: 'java')
apply(plugin: 'idea')
apply(plugin: 'maven')
apply(plugin: 'cuba')
dependencies {
2016-11-09 18:38:05 +08:00
testCompile(bom['org.jmockit:jmockit'])
testCompile(bom['junit:junit'])
2011-11-17 16:31:31 +08:00
}
task sourceJar(type: Jar) {
from file('src')
classifier = 'sources'
}
artifacts {
archives sourceJar
}
jar {
manifest {
attributes("Implementation-Version": cubaVersion)
}
}
test {
maxHeapSize = '256m'
}
2011-11-17 16:31:31 +08:00
}
2016-11-09 18:38:05 +08:00
// configure web toolkit module
2015-04-08 15:15:59 +08:00
configure(webToolkitModule) {
apply(plugin: 'java')
apply(plugin: 'idea')
apply(plugin: 'maven')
apply(plugin: 'cuba')
task sourceJar(type: Jar) {
from file('src')
classifier = 'sources'
}
artifacts {
archives sourceJar
}
}
2011-11-17 16:31:31 +08:00
configure(sharedLibModule) {
dependencies {
2016-11-09 18:38:05 +08:00
compile(bom['ch.qos.logback:logback-classic'])
compile(bom['org.slf4j:log4j-over-slf4j'])
jdbc(bom['org.postgresql:postgresql'])
jdbc(bom['org.hsqldb:hsqldb'])
2011-11-17 16:31:31 +08:00
}
}
configure(globalModule) {
2011-11-22 19:42:09 +08:00
dependencies {
2016-11-09 18:38:05 +08:00
compile(bom['commons-logging:commons-logging'])
compile(bom['org.codehaus.groovy:groovy-all'])
compile(bom['commons-lang:commons-lang'])
compile(bom['commons-collections:commons-collections'])
compile(bom['commons-io:commons-io'])
compile(bom['commons-codec:commons-codec'])
compile(bom['commons-cli:commons-cli'])
compile(bom['org.apache.httpcomponents:httpclient']) // simplify version management for selenium
compile(bom['org.apache.commons:commons-pool2'])
compile(bom['org.apache.commons:commons-compress'])
compile(bom['dom4j:dom4j'])
compile(bom['com.sun.mail:javax.mail'])
compile(bom['ch.qos.logback:logback-classic'])
compile(bom['org.slf4j:log4j-over-slf4j'])
compile(bom['org.perf4j:perf4j'])
compile(bom['com.google.code.findbugs:jsr305'])
compile(bom['javax:javaee-api'])
compile(bom['antlr:antlr'])
compile(bom['org.antlr:antlr-runtime'])
compile(bom['com.google.guava:guava'])
compile(bom['org.eclipse.persistence:javax.persistence'])
compile(bom['org.eclipse.persistence:commonj.sdo'])
compile(bom['org.glassfish:javax.json'])
compile(bom['com.haulmont.thirdparty:eclipselink'])
compile(bom['org.freemarker:freemarker'])
compile(bom['aopalliance:aopalliance'])
compile(bom['org.springframework:spring-core'])
compile(bom['org.springframework:spring-beans'])
compile(bom['org.springframework:spring-context'])
compile(bom['org.springframework:spring-web'])
compile(bom['com.esotericsoftware:kryo-shaded'])
compile(bom['de.javakaffee:kryo-serializers']) {
exclude(group: 'com.esotericsoftware', module: 'kryo')
}
compile(bom['org.json:json'])
compile(bom['com.google.code.gson:gson'])
2016-11-25 21:26:57 +08:00
compile(bom['org.hibernate:hibernate-validator'])
compile(bom['org.glassfish.web:javax.el'])
2016-11-09 18:38:05 +08:00
provided(bom['org.apache.tomcat:tomcat-servlet-api'])
2011-11-22 19:42:09 +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
task enhance(type: CubaEnhancing)
task filterDummyEntities {
2016-07-19 22:23:11 +08:00
ext.srcFile1 = file('src/base-persistence.xml')
ext.srcFile2 = file('src/cuba-persistence.xml')
ext.dstDir = file("$buildDir/tmp/filtered")
2016-07-19 22:23:11 +08:00
ext.dstFile1 = new File(ext.dstDir, "base-persistence.xml")
ext.dstFile2 = new File(ext.dstDir, "cuba-persistence.xml")
inputs.file srcFile1
inputs.file srcFile2
outputs.file dstFile1
outputs.file dstFile2
doLast {
dstDir.mkdirs()
2016-07-19 22:23:11 +08:00
dstFile1.write(srcFile1.readLines().findAll{ !it.contains('.entity.dummy.') }.join('\n'))
dstFile2.write(srcFile2.readLines().findAll{ !it.contains('.entity.dummy.') }.join('\n'))
}
}
jar {
exclude '**/entity/dummy/*'
2016-07-19 22:23:11 +08:00
exclude { it.file == file("$buildDir/resources/main/base-persistence.xml") }
exclude { it.file == file("$buildDir/resources/main/cuba-persistence.xml") }
from "$buildDir/tmp/filtered"
2016-06-21 21:59:41 +08:00
manifest {
attributes('App-Component-Id': cuba.artifact.group)
2016-06-21 21:59:41 +08:00
attributes('App-Component-Version': cubaVersion)
}
}
jar.dependsOn filterDummyEntities
sourceJar {
exclude '**/entity/dummy/*'
exclude {
2016-07-19 22:23:11 +08:00
(it.file.name == 'base-persistence.xml' || it.file.name == 'cuba-persistence.xml') && sourceSets.main.java.srcDirs.contains(it.file.parentFile)
}
from "$buildDir/tmp/filtered"
}
sourceJar.dependsOn filterDummyEntities
2011-11-17 16:31:31 +08:00
}
configure(coreModule) {
configurations {
dbscripts
}
2011-11-17 16:31:31 +08:00
dependencies {
compile(globalModule)
compile(sharedLibModule)
2016-11-09 18:38:05 +08:00
compile(bom['javax.validation:validation-api'])
compile(bom['com.haulmont.thirdparty:xstream'])
runtime(bom['xpp3:xpp3_min'])
runtime(bom['xmlpull:xmlpull'])
compile(bom['org.ocpsoft.prettytime:prettytime-nlp'])
compile(bom['org.jgroups:jgroups'])
compile(bom['org.aspectj:aspectjrt'])
compile(bom['org.aspectj:aspectjweaver'])
compile(bom['org.mybatis:mybatis'])
compile(bom['org.mybatis:mybatis-spring'])
compile(bom['org.springframework:spring-context-support'])
compile(bom['org.springframework:spring-orm'])
compile(bom['org.springframework:spring-tx'])
compile(bom['org.springframework:spring-webmvc'])
2016-12-02 17:03:40 +08:00
compile(bom['org.apache.poi:poi']) // POI is actually not required by core, but remains here to simplify dependencies for reports project
2016-11-09 18:38:05 +08:00
compile(bom['org.jsoup:jsoup']) // simplify version management for fts
provided(bom['org.apache.tomcat:tomcat-servlet-api'])
jdbc(bom['org.postgresql:postgresql'])
jdbc(bom['org.hsqldb:hsqldb'])
testCompile(bom['org.apache.commons:commons-dbcp2'])
testRuntime(bom['org.apache.tomcat:tomcat-servlet-api'])
testRuntime(bom['org.hsqldb:hsqldb'])
testRuntime(bom['org.postgresql:postgresql'])
2011-11-17 16:31:31 +08:00
}
task enhanceTestModel(type: CubaTestEnhancing)
2011-11-17 16:31:31 +08:00
test {
scanForTestClasses = false
includes = ['**/*Test.class']
jvmArgs '-XX:-UseSplitVerifier'
systemProperties = [
'logback.configurationFile': System.getProperty('logback.configurationFile')
]
2011-11-17 16:31:31 +08:00
}
task testEntityCache(type: Test) {
scanForTestClasses = false
includes = ['com/haulmont/cuba/entity_cache/EntityCacheTestSuite.class']
}
assembleDbScripts {
moduleAlias = '10-cuba'
2011-11-17 16:31:31 +08:00
}
task deploy(dependsOn: assemble, type: CubaDeployment) {
appName = 'cuba-core'
appJars('cuba-global', 'cuba-core')
2011-11-17 16:31:31 +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: assembleDbScripts, description: 'Creates local HSQL database', type: CubaDbCreation) {
dbms = 'hsql'
dbName = hsqlDbName
dbUser = 'sa'
dbPassword = ''
}
task createTestDb(dependsOn: assembleDbScripts, description: 'Creates local HSQL database', type: CubaDbCreation) {
dbms = 'hsql'
dbName = hsqlDbName
dbUser = 'sa'
dbPassword = ''
auxiliaryScript = file('test/com/haulmont/cuba/testmodel/create-db.sql')
}
2011-11-17 16:31:31 +08:00
}
configure(coreTestsModule) {
apply(plugin: 'java')
apply(plugin: 'maven')
apply(plugin: 'cuba')
buildDir = file('../build/core-tests')
sourceSets {
main {
java {
srcDir '.'
include 'com/haulmont/cuba/core/CubaTestCase.java'
include 'com/haulmont/cuba/testsupport/*.java'
include '*'
}
resources {
srcDir '.'
}
}
}
dependencies {
compile(coreModule)
2016-11-09 18:38:05 +08:00
compile(bom['org.apache.commons:commons-dbcp2'])
compile(bom['org.jmockit:jmockit'])
compile(bom['junit:junit'])
}
task sourceJar(type: Jar) {
from file('.')
include 'com/haulmont/cuba/core/CubaTestCase*.class'
include 'com/haulmont/cuba/core/CubaTestCase*.java'
include 'com/haulmont/cuba/testsupport/*'
include '*'
classifier = 'sources'
}
artifacts {
archives sourceJar
}
}
2011-11-17 16:31:31 +08:00
configure(clientModule) {
dependencies {
compile(globalModule)
2016-11-09 18:38:05 +08:00
compile(bom['org.jsoup:jsoup']) // simplify version management for fts
2011-11-17 16:31:31 +08:00
}
}
configure(clientTestsModule) {
apply(plugin: 'java')
apply(plugin: 'maven')
apply(plugin: 'cuba')
buildDir = file('../build/client-tests')
2011-11-17 16:31:31 +08:00
sourceSets {
main {
java {
srcDir '.'
}
resources {
srcDir '.'
}
}
}
dependencies {
compile(clientModule)
2016-11-09 18:38:05 +08:00
compile(bom['org.jmockit:jmockit'])
compile(bom['junit:junit'])
}
task sourceJar(type: Jar) {
from file('.')
classifier = 'sources'
2011-11-17 16:31:31 +08:00
}
artifacts {
archives sourceJar
2011-11-17 16:31:31 +08:00
}
}
configure(guiModule) {
dependencies {
compile(clientModule)
2016-11-09 18:38:05 +08:00
2016-12-02 17:11:16 +08:00
compile(bom['org.apache.poi:poi'])
2011-11-17 16:31:31 +08:00
testCompile(clientModule.sourceSets.test.output)
}
task enhance(type: CubaEnhancing)
2013-04-09 18:15:55 +08:00
2011-11-17 16:31:31 +08:00
test {
scanForTestClasses = false
includes = ['**/*Test.class']
2014-12-12 22:58:30 +08:00
2015-05-22 21:52:44 +08:00
exclude 'com/haulmont/cuba/gui/components/*ComponentTest.class'
exclude 'com/haulmont/cuba/gui/components/*FieldTest.class'
2011-11-17 16:31:31 +08:00
}
}
configure(webModule) {
configurations {
themes
}
2011-11-17 16:31:31 +08:00
dependencies {
compile(sharedLibModule)
compile(guiModule)
compile(webAuthModule)
compile(restApiModule)
compile(idpModule)
2013-02-06 23:14:40 +08:00
2016-11-09 18:38:05 +08:00
compile(bom['commons-fileupload:commons-fileupload'])
compile(bom['org.springframework:spring-webmvc'])
2011-11-17 16:31:31 +08:00
2016-11-10 19:24:43 +08:00
compile(bom['com.vaadin:vaadin-push'])
compile(bom['com.vaadin:vaadin-shared'])
2016-11-09 18:38:05 +08:00
compile(bom['com.vaadin:vaadin-server']) {
2014-06-09 15:05:04 +08:00
exclude(group: 'com.vaadin', module: 'vaadin-sass-compiler')
}
2013-10-19 18:40:54 +08:00
/* Vaadin addons */
2016-11-09 18:38:05 +08:00
compile(bom['com.haulmont.thirdparty:popupbutton'])
compile(bom['org.vaadin.addons:aceeditor'])
compile(bom['org.vaadin.addons:dragdroplayouts'])
compile(bom['com.vaadin.addon:vaadin-context-menu'])
2011-11-17 16:31:31 +08:00
2016-11-09 18:38:05 +08:00
provided(bom['org.apache.tomcat:tomcat-servlet-api'])
2014-12-05 19:56:06 +08:00
2016-11-09 18:38:05 +08:00
themes(bom['com.vaadin:vaadin-themes'])
2014-12-05 19:47:32 +08:00
testCompile(clientModule.sourceSets.test.output)
2014-12-08 16:45:59 +08:00
testCompile(guiModule.sourceSets.test.output)
2016-11-09 18:38:05 +08:00
testRuntime(bom['org.apache.tomcat:tomcat-servlet-api'])
2011-11-17 16:31:31 +08:00
}
task enhance(type: CubaEnhancing)
jar {
with copySpec {
from sourceSets.main.allJava
include "com/haulmont/cuba/web/toolkit/ui/client/**"
}
}
task buildScssThemes(type: CubaWebScssThemeCreation) {
2014-10-13 22:36:40 +08:00
themes = ['halo', 'havana']
2014-10-15 17:43:55 +08:00
// compress = true
// sprites = true
// cleanup = true
2014-10-13 22:36:40 +08:00
}
assemble.dependsOn buildScssThemes
2015-12-16 21:07:09 +08:00
task deployThemes(type: CubaDeployThemeTask, dependsOn: buildScssThemes) {
}
2014-10-13 22:36:40 +08:00
task buildHalo(type: CubaWebScssThemeCreation) {
themes = ['halo']
2014-10-15 17:43:55 +08:00
// compress = true
// sprites = true
// cleanup = true
2014-10-13 22:36:40 +08:00
}
task deployHalo(type: Copy, dependsOn: buildHalo) {
from file("$webModule.buildDir/web/VAADIN/themes/halo")
into "${cuba.tomcat.dir}/webapps/cuba/VAADIN/themes/halo"
2014-10-13 22:36:40 +08:00
exclude '**/web.xml'
2011-11-17 16:31:31 +08:00
}
task buildHavana(type: CubaWebScssThemeCreation) {
themes = ['havana']
// compress = true
// sprites = true
// cleanup = true
}
task deployHavana(type: Copy, dependsOn: buildHavana) {
from file("$webModule.buildDir/web/VAADIN/themes/havana")
into "${cuba.tomcat.dir}/webapps/cuba/VAADIN/themes/havana"
exclude '**/web.xml'
}
def webOutDir = file("$buildDir/web")
task webArchive(dependsOn: buildScssThemes, type: Zip) {
from file('web')
from webOutDir
exclude '**/web.xml', '**/app.properties'
classifier = 'web'
}
artifacts {
archives webArchive
2011-11-17 16:31:31 +08:00
}
task deploy(dependsOn: assemble, type: CubaDeployment) {
appName = 'cuba'
appJars('cuba-global', 'cuba-client', 'cuba-gui', 'cuba-web', 'cuba-web-auth', 'cuba-rest-api', 'cuba-idp')
2011-11-17 16:31:31 +08:00
}
2013-02-06 23:14:40 +08:00
}
configure(webModuleThemesModule) {
apply(plugin: 'java')
apply(plugin: 'maven')
apply(plugin: 'cuba')
appModuleType = 'web-themes'
buildDir = file('../build/scss-themes')
sourceSets {
main {
java {
srcDir '.'
}
resources {
srcDir '.'
}
}
}
dependencies {
2016-11-09 18:38:05 +08:00
compile(bom['com.vaadin:vaadin-themes'])
}
}
configure(webAuthModule) {
dependencies {
compile(globalModule)
2016-11-09 18:38:05 +08:00
compile(bom['org.springframework:spring-tx'])
compile(bom['org.springframework.ldap:spring-ldap-core']) {
exclude(group: 'org.slf4j', module: 'jcl-over-slf4j') // removed because it defines its own Log4j LogFactory via JDK services mechanism
}
2014-08-25 19:14:57 +08:00
2016-11-09 18:38:05 +08:00
provided(bom['org.apache.tomcat:tomcat-servlet-api'])
}
}
2013-02-06 23:14:40 +08:00
configure(webToolkitModule) {
dependencies {
2016-11-09 18:38:05 +08:00
compile(webModule)
2016-11-10 19:24:43 +08:00
compile(bom['com.vaadin:vaadin-client']) {
exclude(group: 'com.vaadin.external.gwt', module: 'gwt-elemental')
}
compile(bom['com.vaadin:vaadin-client-compiler']) {
exclude(group: 'com.vaadin.external.gwt', module: 'gwt-elemental')
exclude(group: 'com.vaadin.external.gwt', module: 'gwt-dev')
}
compile(bom['com.google.gwt:gwt-elemental'])
compile(bom['com.google.gwt:gwt-dev'])
2016-11-09 18:38:05 +08:00
runtime(bom['org.apache.tomcat:tomcat-servlet-api'])
2013-02-06 23:14:40 +08:00
}
task buildWidgetSet(type: CubaWidgetSetBuilding) {
widgetSetClass = 'com.haulmont.cuba.web.toolkit.ui.WidgetSet'
// Strict
strict = true
// Debug flags:
printCompilerClassPath = false
logLevel = 'INFO'
// Parallel thread count
workers = 2
// Performance and widgetset size:
style = 'OBF' // 'OBF' or 'PRETTY' or 'DETAILED'
disableCastChecking = false
optimize = 9
draft = false
// Compiler JVM
xmx = '-Xmx512m'
xss = '-Xss8m'
xxMPS = '-XX:MaxPermSize=256m'
}
task buildDebugWidgetSet(type: CubaWidgetSetBuilding) {
widgetSetsDir = "$project.buildDir/web-debug/VAADIN/widgetsets"
widgetSetClass = 'com.haulmont.cuba.web.toolkit.ui.WidgetSet'
// Performance and widgetset size:
style = 'PRETTY'
}
2015-07-23 18:05:41 +08:00
task debugWidgetSet(type: CubaWidgetSetDebug) {
widgetSetClass = 'com.haulmont.cuba.web.toolkit.ui.WidgetSet'
}
jar {
from sourceSets.main.allJava
2013-02-06 23:14:40 +08:00
}
task webArchive(dependsOn: buildWidgetSet, type: Zip) {
from file("$buildDir/web")
2013-02-06 23:14:40 +08:00
classifier = 'web'
}
task webDebugArchive(dependsOn: buildDebugWidgetSet, type: Zip) {
from file("$buildDir/web-debug")
classifier = 'debug'
}
2013-02-06 23:14:40 +08:00
artifacts {
archives webArchive
if (!cuba.artifact.isSnapshot) {
archives webDebugArchive
}
2013-02-06 23:14:40 +08:00
}
task deploy(dependsOn: buildWidgetSet) << {
2011-11-17 16:31:31 +08:00
delete {
"$cuba.tomcat.dir/webapps/cuba/VAADIN/widgetsets"
2011-11-17 16:31:31 +08:00
}
copy {
from "$buildDir/web"
into "$cuba.tomcat.dir/webapps/cuba"
2011-11-17 16:31:31 +08:00
}
}
task cleanWidgetSet(dependsOn: clean) {
}
2011-11-17 16:31:31 +08:00
}
configure(desktopModule) {
apply(plugin: 'application')
2016-11-09 18:38:05 +08:00
2011-11-17 16:31:31 +08:00
mainClassName = 'com.haulmont.cuba.desktop.App'
dependencies {
compile(guiModule)
2016-11-09 18:38:05 +08:00
compile(bom['com.miglayout:miglayout-swing'])
compile(bom['com.fifesoft:rsyntaxtextarea'])
compile(bom['com.haulmont.thirdparty:glazedlists'])
compile(bom['com.haulmont.thirdparty:swingx-core'])
2014-12-08 16:45:59 +08:00
testCompile(clientModule.sourceSets.test.output)
testCompile(guiModule.sourceSets.test.output)
2016-11-09 18:38:05 +08:00
testRuntime(bom['org.apache.tomcat:tomcat-servlet-api'])
2011-11-17 16:31:31 +08:00
}
// disable building of *.tar and *.zip artifacts by default assemble task
configurations.archives.artifacts.removeAll {
it.file =~ 'tar' || it.file =~ 'zip'
}
2011-11-17 16:31:31 +08:00
}
configure(restApiModule) {
dependencies {
compile(globalModule)
compile(clientModule)
compile(sharedLibModule)
2016-11-09 18:38:05 +08:00
compile(bom['org.springframework:spring-webmvc'])
compile(bom['org.springframework:spring-context-support'])
compile(bom['org.json:json'])
compile(bom['com.fasterxml.jackson.core:jackson-databind'])
compile(bom['com.fasterxml.jackson.dataformat:jackson-dataformat-yaml'])
compile(bom['commons-fileupload:commons-fileupload'])
compile(bom['org.springframework.security:spring-security-core'])
compile(bom['org.springframework.security:spring-security-web'])
compile(bom['org.springframework.security:spring-security-config'])
compile(bom['org.springframework.security.oauth:spring-security-oauth2']) {
exclude(group: 'org.springframework.security')
}
2016-11-09 18:38:05 +08:00
provided(bom['org.apache.tomcat:tomcat-servlet-api'])
testCompile(clientModule.sourceSets.test.output)
}
}
configure(portalModule) {
dependencies {
compile(globalModule)
compile(clientModule)
compile(sharedLibModule)
compile(restApiModule)
2016-11-09 18:38:05 +08:00
compile(bom['org.springframework:spring-webmvc'])
compile(bom['org.springframework:spring-context-support'])
compile(bom['org.springframework:spring-tx'])
compile(bom['org.springframework:spring-jdbc'])
compile(bom['org.springframework.security:spring-security-core'])
compile(bom['org.springframework.security:spring-security-web'])
compile(bom['org.springframework.security:spring-security-config'])
compile(bom['org.springframework.security:spring-security-taglibs'])
compile(bom['org.json:json'])
compile(bom['org.thymeleaf:thymeleaf'])
compile(bom['org.thymeleaf:thymeleaf-spring4'])
compile(bom['org.thymeleaf.extras:thymeleaf-extras-springsecurity4'])
provided(bom['org.apache.tomcat:tomcat-servlet-api'])
2016-05-11 19:23:39 +08:00
testCompile(clientModule.sourceSets.test.output)
}
test {
scanForTestClasses = false
includes = ['**/*Test.class']
}
task deploy(dependsOn: assemble, type: CubaDeployment) {
appName = 'cuba-portal'
appJars('cuba-global', 'cuba-client', 'cuba-portal', 'cuba-rest-api')
}
}
configure(idpModule) {
dependencies {
compile(globalModule)
compile(clientModule)
compile(sharedLibModule)
2016-11-09 18:38:05 +08:00
compile(bom['org.springframework:spring-webmvc'])
compile(bom['org.springframework:spring-context-support'])
2016-11-09 18:38:05 +08:00
compile(bom['org.springframework.security:spring-security-core'])
compile(bom['org.springframework.security:spring-security-config'])
compile(bom['org.springframework.security:spring-security-web'])
testCompile(clientModule.sourceSets.test.output)
2016-11-09 18:38:05 +08:00
provided(bom['org.apache.tomcat:tomcat-servlet-api'])
}
task webArchive(type: Zip) {
from file('web')
classifier = 'web'
}
artifacts {
archives webArchive
}
task deploy(dependsOn: assemble) << {
delete {
"$cuba.tomcat.dir/webapps/cuba/idp"
}
copy {
from "$projectDir/web"
into "$cuba.tomcat.dir/webapps/cuba"
}
}
}
task restart(dependsOn: ['stop', ':cuba-core:deploy', ':cuba-web:deploy', ':cuba-web-toolkit:deploy'],
description: 'Redeploys applications and restarts local Tomcat') << {
2011-11-17 16:31:31 +08:00
ant.waitfor(maxwait: 6, maxwaitunit: 'second', checkevery: 2, checkeveryunit: 'second') {
not {
socket(server: 'localhost', port: '8787')
}
}
start.execute()
2016-01-05 18:20:44 +08:00
}