evaluationDependsOn(':common') evaluationDependsOn(':openbis_api') evaluationDependsOn(':openbis-common') evaluationDependsOn(':authentication') evaluationDependsOn(':dbmigration') evaluationDependsOn(':openbis') apply from: 'http://svncisd.ethz.ch/repos/cisd/gradle/trunk/javaproject.gradle' configurations.create('clients') configurations.create('clients_partial') dependencies { compile project(':common'), project(':openbis-common'), project(':openbis'), // authentication and dbmigration are required as they contain later versions of // some classes than cisd-cifex.jar. They need to be in classpath before cisd-cifex.jar project(':authentication'), project(':dbmigration') compile 'apache:ftpserver-core:+', 'apache:sshd-core:+', 'jfree:jfreechart:+', 'cisd:cisd-cifex:+', 'shriop:javacsv:+', 'cisd:cisd-image-readers:+', 'hjg:pngj:+', 'apache:commons-fileupload:+' runtime 'sun:jai:+' testCompile project(path: ':common', configuration: 'tests'), project(path: ':openbis-common', configuration: 'tests'), project(path: ':openbis', configuration: 'tests') clients 'cglib:cglib-nodep:+', 'cisd:cisd-args4j:+', 'cisd:cisd-base:+', 'apache:poi-ooxml:+', 'springframework:spring-context:+', 'python:jython:+', 'apache:commons-httpclient:+', 'marathon:marathon-spring-util:+', 'apache:log4j:+', 'dom4j:dom4j:+' clients_partial 'google:gwt-user:2.4' } sourceSets { test { resources { srcDirs = ['source/java'] } } } jar { from('targets/dist') { include 'BUILD*INFO' } from('source/java') { include '*.xml' } from('source') { include 'sql/**/*.sql' into 'datastore_server' } } task dssClient(type: Jar) { baseName 'dss_client' from (project(':common').sourceSets.main.output.getAsFileTree().plus( project(':openbis-common').sourceSets.main.output.getAsFileTree().plus( project(':openbis_api').sourceSets.main.output.getAsFileTree().plus( project(':openbis').sourceSets.main.output.getAsFileTree().plus( sourceSets.main.output.getAsFileTree())))).matching { include 'ch/systemsx/cisd/common/**/*.class' include 'ch/systemsx/cisd/openbis/common/**/*.class' include 'ch/systemsx/cisd/openbis/generic/shared/**/*.class' include 'ch/systemsx/cisd/openbis/plugin/query/shared/**/*.class' include 'ch/systemsx/cisd/openbis/dss/client/**/*.class' include 'ch/systemsx/cisd/openbis/dss/generic/shared/api/**/*.class' include 'ch/systemsx/cisd/openbis/dss/generic/shared/utils/**/*.class' include 'org/python/core/SyspathArchiveHack.class' }) from zipTree(configurations.clients_partial.files.iterator().next()).matching { include '**/com/google/gwt/user/client/rpc/IsSerializable.class' include '**/com/google/gwt/user/client/rpc/SerializableException.class' } manifest { def manifestClasspath = configurations.clients.collect { it.getName() }.join(',') attributes("Main-Class": "ch.systemsx.cisd.openbis.dss.client.api.cli.DssClient", "Version": versionNumber, "Build-Number": "${versionNumber} (r${revisionNumber},${cleanFlag})", "Class-Path": manifestClasspath ) } } dssClient.dependsOn compileJava task dssGui(type: Jar) { baseName 'dss_gui' from (project(':common').sourceSets.main.output.getAsFileTree().plus( project(':openbis-common').sourceSets.main.output.getAsFileTree().plus( project(':openbis_api').sourceSets.main.output.getAsFileTree().plus( project(':openbis').sourceSets.main.output.getAsFileTree().plus( sourceSets.main.output.getAsFileTree())))).matching { include 'ch/systemsx/cisd/common/**/*.class' include 'ch/systemsx/cisd/openbis/common/**/*.class' include 'ch/systemsx/cisd/openbis/generic/shared/**/*.class' include 'ch/systemsx/cisd/openbis/plugin/query/shared/**/*.class' include 'ch/systemsx/cisd/openbis/dss/client/**/*.class' include 'ch/systemsx/cisd/openbis/dss/generic/shared/api/**/*.class' include 'ch/systemsx/cisd/openbis/dss/generic/shared/utils/**/*.class' include 'org/python/core/SyspathArchiveHack.class' }) from (fileTree(dir: 'resource', includes: ['ok.png', 'wrong.png', 'wait.gif'])) from zipTree(configurations.clients_partial.files.iterator().next()).matching { include '**/com/google/gwt/user/client/rpc/IsSerializable.class' include '**/com/google/gwt/user/client/rpc/SerializableException.class' } manifest { def manifestClasspath = configurations.clients.collect { it.getName() }.join(',') attributes("Main-Class": "ch.systemsx.cisd.openbis.dss.client.api.gui.DataSetUploadClient", "Version": versionNumber, "Build-Number": "${versionNumber} (r${revisionNumber},${cleanFlag})", "Class-Path": manifestClasspath) } } dssGui.dependsOn compileJava task dssClientZip(type: Zip) { baseName 'dss_client' from (configurations.clients) { into 'dss_client/lib' } from (dssClient.archivePath) { into 'dss_client/lib' } from('dist/dss_client.sh') { into 'dss_client' } } dssClientZip.dependsOn dssClient task dssGuiZip(type: Zip) { baseName 'dss_upload_gui' from (configurations.clients) { into 'dss_upload_gui/lib' } from (dssGui.archivePath) { into 'dss_upload_gui/lib' } } dssGuiZip.dependsOn dssGui build.dependsOn dssClientZip build.dependsOn dssGuiZip task queryApiJar(type: Jar) { baseName 'openBIS-query-API' includeEmptyDirs false from zipTree(project(':common').jar.archivePath).plus( zipTree(project(':openbis-common').jar.archivePath).plus( zipTree(project(':openbis').jar.archivePath).plus( zipTree(project(':openbis_api').jar.archivePath).plus( zipTree(jar.archivePath))))).matching { include "ch/systemsx/cisd/common/exceptions/**/*.class" include "ch/systemsx/cisd/common/spring/HttpInvokerUtils.class" include "ch/systemsx/cisd/common/api/**/*.class" exclude "ch/systemsx/cisd/common/api/server/**/*.class" include "ch/systemsx/cisd/openbis/common/api/**/*.class" exclude "ch/systemsx/cisd/openbis/common/api/server/**/*.class" include "ch/systemsx/cisd/openbis/generic/shared/api/**/*.class" include "ch/systemsx/cisd/openbis/generic/shared/basic/**/*.class" include "ch/systemsx/cisd/openbis/plugin/query/**/api/**/*.class" exclude "ch/systemsx/cisd/openbis/**/server/api/**/*.class" include "ch/systemsx/cisd/openbis/dss/client/api/v1/**/*.class" include "ch/systemsx/cisd/openbis/dss/generic/shared/api/v1/**/*.class" include "ch/systemsx/cisd/openbis/BuildAndEnvironmentInfo.class" include "*.INFO" } } dssApiSources = fileTree('.').matching { include "source/java/ch/systemsx/cisd/openbis/dss/client/api/v1/**" include "source/java/ch/systemsx/cisd/openbis/dss/generic/shared/api/v1/**" include "source/java/ch/systemsx/cisd/openbis/dss/generic/shared/*" } allQueryApiSources = project(':openbis').commonApiSources.plus( project(':openbis').openBisApiApiSources.plus( project(':openbis').openbisCommonApiSources.plus( project(':openbis').openbisApiSources.plus( dssApiSources)))) task queryApiSources(type: Zip) { archiveName 'src.zip' from allQueryApiSources } configurations.create('javadoc') dependencies { javadoc 'springframework:spring-tx:+' } task queryApiJavaDoc(type: Javadoc) { source allQueryApiSources.matching{ include "**/*.java" } classpath = sourceSets.main.output + sourceSets.main.compileClasspath + configurations.javadoc } task queryApiJavaDocZip(type: Zip) { archiveName 'doc.zip' from queryApiJavaDoc.destinationDir } queryApiJavaDocZip.dependsOn queryApiJavaDoc configurations.create('queryApiDependencies') dependencies { queryApiDependencies 'cisd:cisd-base:+', 'apache:commons-httpclient:+', 'apache:log4j:+', 'springframework:spring-aop:+', 'springframework:spring-web:+', 'springframework:spring-tx:+', 'marathon:marathon-spring-util:+' } task queryApiZip(type: Zip) { baseName 'openBIS-query-API' from queryApiJar.archivePath from queryApiSources.archivePath from queryApiJavaDocZip.archivePath from configurations.queryApiDependencies into 'openBIS-query-API' } queryApiZip.dependsOn queryApiJar queryApiZip.dependsOn queryApiSources queryApiZip.dependsOn queryApiJavaDocZip build.dependsOn queryApiZip