task queryApiJar(type: Jar) { baseName 'openBIS-query-API' includeEmptyDirs false from project(':common').compileJava.outputs.getFiles().getAsFileTree().plus( project(':openbis-common').compileJava.outputs.getFiles().getAsFileTree().plus( project(':openbis').compileJava.outputs.getFiles().getAsFileTree().plus( project(':openbis_api').compileJava.outputs.getFiles().getAsFileTree().plus( project(':datastore_server').compileJava.outputs.getFiles().getAsFileTree())))).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" } } task queryApiSources(type: Zip) { archiveName 'sources-query-api.zip' from project(':common').files('source/java').getAsFileTree().plus( project(':openbis-common').files('source/java').getAsFileTree().plus( project(':openbis').files('source/java').getAsFileTree().plus( project(':openbis_api').files('source/java').getAsFileTree().plus( project(':datastore_server').files('source/java').getAsFileTree())))).matching { include "ch/systemsx/cisd/common/exceptions/**/*.java" include "ch/systemsx/cisd/common/spring/HttpInvokerUtils.java" include "ch/systemsx/cisd/common/api/**/*.java" exclude "ch/systemsx/cisd/common/api/server/**/*.java" include "ch/systemsx/cisd/openbis/common/api/**/*.java" exclude "ch/systemsx/cisd/openbis/common/api/server/**/*.java" include "ch/systemsx/cisd/openbis/generic/shared/api/**/*.java" include "ch/systemsx/cisd/openbis/generic/shared/basic/**/*.java" include "ch/systemsx/cisd/openbis/plugin/query/**/api/**/*.java" exclude "ch/systemsx/cisd/openbis/**/server/api/**/*.java" include "ch/systemsx/cisd/openbis/dss/client/api/v1/**/*.java" include "ch/systemsx/cisd/openbis/dss/generic/shared/api/v1/**/*.java" include "ch/systemsx/cisd/openbis/BuildAndEnvironmentInfo.java" } } configurations.create('queryApiJavadoc') dependencies { queryApiJavadoc project(':datastore_server') } task queryApiJavaDoc(type: Javadoc) { source queryApiSources.inputs.getFiles().getAsFileTree().matching { include "**/*.java" } classpath = configurations.queryApiJavadoc } task queryApiJavaDocZip(type: Zip, dependsOn: queryApiJavaDoc) { archiveName 'javadoc-query-api.zip' from queryApiJavaDoc.destinationDir } configurations.create('queryApiDependencies') dependencies { queryApiDependencies 'sis:sis-base:14.12.0', 'apache:httpclient:4.3.6', 'apache:httpcore:4.3.3', 'apache:log4j:1.2.15', 'springframework:spring-aop:4.1.4.RELEASE', 'springframework:spring-beans:4.1.4.RELEASE', 'springframework:spring-context:4.1.4.RELEASE', 'springframework:spring-core:4.1.4.RELEASE', 'springframework:spring-web:4.1.4.RELEASE', 'springframework:spring-webmvc:4.1.4.RELEASE', 'springframework:spring-expression:4.1.4.RELEASE', 'apache:commons-logging:1.2', 'marathon:marathon-spring-util:1.2.4', 'aopalliance:aopalliance:1.0' } task queryApiZip(type: Zip, dependsOn: [queryApiJar, queryApiSources, queryApiJavaDocZip]) { baseName 'openBIS-query-API' from queryApiJar.archivePath from queryApiSources.archivePath from queryApiJavaDocZip.archivePath from configurations.queryApiDependencies into 'openBIS-query-API' } /////////// API V3 //////////////////// task apiV3Jar(type: Jar) { baseName 'openBIS-API-V3' includeEmptyDirs false from project(':common').compileJava.outputs.getFiles().getAsFileTree().plus( project(':openbis-common').compileJava.outputs.getFiles().getAsFileTree().plus( project(':openbis').compileJava.outputs.getFiles().getAsFileTree().plus( project(':openbis_api').compileJava.outputs.getFiles().getAsFileTree()))).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/ethz/sis/openbis/generic/shared/api/v3/**/*.class" include "ch/systemsx/cisd/openbis/BuildAndEnvironmentInfo.class" include "*.INFO" } } configurations.create('apiV3Dependencies') dependencies { apiV3Dependencies 'sis:sis-base:14.12.0', 'apache:httpclient:4.3.6', 'springframework:spring-web:4.1.4.RELEASE', 'marathon:marathon-spring-util:1.2.4' } task apiV3JarBatteriesIncluded(type: Jar, dependsOn: [apiV3Jar]) { baseName 'openBIS-API-V3-batteries-included' includeEmptyDirs false from (zipTree(apiV3Jar.archivePath)) { include '**/*' } from (configurations.apiV3Dependencies.collect {zipTree(it)}) { include '**/*' } } task apiV3Sources(type: Jar) { archiveName 'sources-api-v3.zip' from project(':common').files('source/java').getAsFileTree().plus( project(':openbis-common').files('source/java').getAsFileTree().plus( project(':openbis').files('source/java').getAsFileTree().plus( project(':openbis_api').files('source/java').getAsFileTree()))).matching { include "ch/systemsx/cisd/common/exceptions/**/*.java" include "ch/systemsx/cisd/common/spring/HttpInvokerUtils.java" include "ch/systemsx/cisd/common/api/**/*.java" exclude "ch/systemsx/cisd/common/api/server/**/*.java" include "ch/systemsx/cisd/openbis/common/api/**/*.java" exclude "ch/systemsx/cisd/openbis/common/api/server/**/*.java" include "ch/ethz/sis/openbis/generic/shared/api/v3/**/*.java" include "ch/systemsx/cisd/openbis/BuildAndEnvironmentInfo.java" } } configurations.create('apiV3Javadoc') dependencies { apiV3Javadoc project(':openbis_api') } task apiV3JavaDoc(type: Javadoc) { source apiV3Sources.inputs.getFiles().getAsFileTree().matching { include "**/*.java" } classpath = configurations.apiV3Javadoc } task apiV3JavaDocZip(type: Zip, dependsOn: apiV3JavaDoc) { archiveName 'javadoc-api-v3.zip' from apiV3JavaDoc.destinationDir } task apiV3Zip(type: Zip, dependsOn: [apiV3JarBatteriesIncluded, apiV3Sources, apiV3JavaDocZip]) { baseName 'openBIS-API-V3' from apiV3Jar.archivePath from apiV3JarBatteriesIncluded.archivePath from apiV3Sources.archivePath from apiV3JavaDocZip.archivePath from configurations.apiV3Dependencies into 'openBIS-API-V3' }