| /* |
| * Licensed to the Apache Software Foundation (ASF) under one or more |
| * contributor license agreements. See the NOTICE file distributed with |
| * this work for additional information regarding copyright ownership. |
| * The ASF licenses this file to You 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. |
| */ |
| |
| apply plugin: 'antlr' |
| apply plugin: 'me.champeau.gradle.jmh' |
| apply from: "${project.projectDir}/../gradle/geode-dependency-management.gradle" |
| apply from: "${project.projectDir}/../gradle/publish.gradle" |
| |
| sourceSets { |
| jca { |
| compileClasspath += configurations.compileClasspath |
| runtimeClasspath += configurations.runtimeClasspath |
| } |
| } |
| |
| idea { |
| module { |
| testSourceDirs += project.tasks.generateIntegrationTestGrammarSource.outputs.files |
| testSourceDirs += project.tasks.generateDistributedTestGrammarSource.outputs.files |
| testSourceDirs += project.tasks.generatePerformanceTestGrammarSource.outputs.files |
| testSourceDirs += project.tasks.generateUpgradeTestGrammarSource.outputs.files |
| } |
| } |
| |
| configurations { |
| //declaring new configuration that will be used to associate with artifacts |
| archives |
| } |
| |
| def generatedResources = "$buildDir/generated-resources/main" |
| |
| sourceSets { |
| main { |
| output.dir(generatedResources, builtBy: 'createVersionPropertiesFile') |
| } |
| test { |
| output.dir(generatedResources, builtBy: 'createVersionPropertiesFile') |
| } |
| } |
| |
| jmh { |
| include = project.hasProperty('include') ? project.getProperties().get('include') : '.*' |
| duplicateClassesStrategy = 'warn' |
| } |
| |
| sourceSets { |
| // This works around resource-look up between integrationTest and test source-sets. |
| // See GEODE-5803 / GEODE-5882 |
| test.resources.srcDirs.each { testResourceSrc -> |
| integrationTest.resources.srcDir { |
| testResourceSrc |
| } |
| } |
| } |
| |
| |
| // Creates the version properties file and writes it to the classes dir |
| task createVersionPropertiesFile(dependsOn: ':writeBuildInfo') { |
| |
| def propertiesFile = file(generatedResources + "/org/apache/geode/internal/GemFireVersion.properties") |
| def scmInfoFile = rootProject.tasks.writeBuildInfo.outputs.files |
| |
| inputs.files { |
| scmInfoFile |
| } |
| outputs.files { |
| propertiesFile |
| } |
| |
| |
| doLast { |
| def scmInfo = new Properties() |
| new FileInputStream(scmInfoFile.singleFile).withStream { fis -> |
| scmInfo.load(fis) |
| } |
| |
| def props = [ |
| "Product-Name" : productName, |
| "Product-Version" : version, |
| "Build-Id" : "${System.env.USER} ${buildId}".toString(), |
| "Build-Date" : new Date().format('yyyy-MM-dd HH:mm:ss Z'), |
| "Build-Platform" : "${System.properties['os.name']} ${System.properties['os.version']} ${System.properties['os.arch']}".toString(), |
| "Build-Java-Version": System.properties['java.version'] |
| ] as Properties |
| props.putAll(scmInfo) |
| |
| propertiesFile.getParentFile().mkdirs() |
| new FileOutputStream(propertiesFile).withStream { fos -> |
| props.store(fos, '') |
| } |
| } |
| } |
| |
| ext.moduleName = group + '.core' |
| |
| jar { |
| |
| from sourceSets.main.output |
| from sourceSets.jca.output |
| |
| exclude 'org/apache/geode/management/internal/web/**' |
| exclude 'org/apache/geode/internal/i18n/StringIdResourceBundle_ja.txt' |
| exclude 'org/apache/geode/admin/doc-files/ds4_0.dtd' |
| |
| inputs.property("moduleName", moduleName) |
| manifest { |
| attributes('Automatic-Module-Name': moduleName) |
| } |
| |
| } |
| |
| jar.dependsOn(createVersionPropertiesFile) |
| |
| task webJar(type: Jar, dependsOn: classes) { |
| description 'Assembles the jar archive containing the gemfire management web classes.' |
| from sourceSets.main.output |
| baseName 'geode-web' |
| include 'org/apache/geode/management/internal/web/**' |
| } |
| |
| task raJar(type: Jar, dependsOn: classes) { |
| description 'Assembles the jar archive that contains the JCA classes' |
| from sourceSets.jca.output |
| exclude 'org/apache/geode/ra/**' |
| archiveName 'ra.jar' |
| } |
| |
| task jcaJar(type: Jar, dependsOn: raJar) { |
| description 'Assembles the jar archive that contains the JCA bundle' |
| baseName 'geode-jca' |
| extension 'rar' |
| metaInf { from 'src/jca/ra.xml' } |
| from raJar.archivePath |
| } |
| |
| configurations { |
| classesOutput { |
| extendsFrom compile |
| description 'a dependency that exposes the compiled classes' |
| } |
| } |
| |
| dependencies { |
| classesOutput sourceSets.main.output |
| |
| |
| // Source Dependencies |
| antlr 'antlr:antlr' |
| |
| // External |
| compileOnly files("${System.getProperty('java.home')}/../lib/tools.jar") |
| compile('com.github.stephenc.findbugs:findbugs-annotations') |
| compile('org.jgroups:jgroups') |
| compile('antlr:antlr') |
| compile('com.fasterxml.jackson.core:jackson-annotations') |
| compile('com.fasterxml.jackson.core:jackson-databind') |
| compile('commons-io:commons-io') |
| compile('commons-validator:commons-validator') |
| compile('commons-digester:commons-digester') |
| compile('com.sun.activation:javax.activation') |
| compile('javax.xml.bind:jaxb-api') |
| compile('com.sun.xml.bind:jaxb-impl') |
| compile('com.sun.istack:istack-commons-runtime') { |
| exclude group: '*' |
| } |
| |
| compile('org.apache.commons:commons-lang3') |
| compile('commons-modeler:commons-modeler') { |
| exclude module: 'commons-digester' |
| exclude module: 'commons-logging-api' |
| exclude module: 'mx4j-jmx' |
| exclude module: 'xml-apis' |
| ext.optional = true |
| } |
| compile('io.netty:netty-all') { |
| ext.optional = true |
| } |
| compile('it.unimi.dsi:fastutil') |
| compile('javax.mail:javax.mail-api') { |
| ext.optional = true |
| } |
| compile('javax.resource:javax.resource-api') |
| compile('mx4j:mx4j') { |
| ext.optional = true |
| } |
| compile('mx4j:mx4j-remote') { |
| ext.optional = true |
| } |
| compile('mx4j:mx4j-tools') { |
| ext.optional = true |
| } |
| compile('net.java.dev.jna:jna') |
| |
| compile('net.sf.jopt-simple:jopt-simple') |
| |
| compile('org.apache.logging.log4j:log4j-api') |
| compile('org.apache.logging.log4j:log4j-core') |
| compile('com.github.davidmoten:geo') |
| |
| runtimeOnly('org.fusesource.jansi:jansi') { |
| ext.optional = true |
| } |
| runtimeOnly('org.slf4j:slf4j-api') |
| |
| runtimeOnly('org.apache.logging.log4j:log4j-slf4j-impl') { |
| exclude module: 'slf4j-api' |
| ext.optional = true |
| } |
| runtimeOnly('org.apache.logging.log4j:log4j-jcl') { |
| ext.optional = true |
| } |
| runtimeOnly('org.apache.logging.log4j:log4j-jul') { |
| ext.optional = true |
| } |
| compile('org.eclipse.jetty:jetty-webapp') { |
| ext.optional = true |
| } |
| compileOnly('org.springframework:spring-webmvc') { |
| exclude module: 'aopalliance' |
| exclude module: 'spring-aop' |
| ext.optional = true |
| } |
| testCompile('org.springframework:spring-webmvc') { |
| exclude module: 'aopalliance' |
| exclude module: 'spring-aop' |
| ext.optional = true |
| } |
| compile('org.springframework:spring-core') { |
| ext.optional = true |
| } |
| compile('org.springframework.shell:spring-shell') { |
| exclude module: 'aopalliance' |
| exclude module: 'asm' |
| exclude module: 'cglib' |
| exclude module: 'guava' |
| exclude module: 'spring-aop' |
| exclude module: 'spring-context-support' |
| exclude module: 'spring-core' |
| } |
| compile('org.iq80.snappy:snappy') { |
| ext.optional = true |
| } |
| |
| compile('org.apache.shiro:shiro-core') |
| |
| compile('io.github.classgraph:classgraph') |
| |
| compile('com.healthmarketscience.rmiio:rmiio') |
| |
| compile(project(':geode-common')) |
| compile(project(':geode-json')) |
| compile(project(':geode-management')) |
| |
| jcaAnnotationProcessor 'org.apache.logging.log4j:log4j-core' |
| |
| jcaCompile(sourceSets.main.output) |
| |
| jmhCompile('org.apache.logging.log4j:log4j-core') |
| |
| testCompile(project(':geode-junit')) { |
| exclude module: 'geode-core' |
| } |
| testCompile(project(':geode-concurrency-test')) |
| testCompile('org.apache.bcel:bcel') |
| testCompile('org.mockito:mockito-core') |
| testCompile('org.springframework:spring-test') |
| testCompile('com.pholser:junit-quickcheck-core') |
| testCompile('org.powermock:powermock-core') |
| testCompile('org.powermock:powermock-module-junit4') |
| testCompile('org.powermock:powermock-api-mockito2') |
| testCompile('pl.pragmatists:JUnitParams') |
| |
| testCompile files("${System.getProperty('java.home')}/../lib/tools.jar") |
| |
| testRuntime('commons-collections:commons-collections') |
| testRuntime('commons-configuration:commons-configuration') |
| testRuntime('commons-io:commons-io') |
| testRuntime('commons-validator:commons-validator') |
| testRuntime('com.pholser:junit-quickcheck-generators') |
| |
| |
| integrationTestCompile(project(':geode-junit')) { |
| exclude module: 'geode-core' |
| } |
| integrationTestCompile(project(':geode-dunit')) { |
| exclude module: 'geode-core' |
| } |
| integrationTestCompile(project(':geode-concurrency-test')) |
| integrationTestCompile('redis.clients:jedis') |
| integrationTestCompile('org.apache.bcel:bcel') |
| integrationTestCompile('org.apache.logging.log4j:log4j-core::tests') |
| integrationTestCompile('org.apache.logging.log4j:log4j-core::test-sources') |
| integrationTestCompile('org.powermock:powermock-core') |
| integrationTestCompile('org.powermock:powermock-module-junit4') |
| integrationTestCompile('org.powermock:powermock-api-mockito2') |
| integrationTestCompile('org.springframework:spring-test') |
| integrationTestCompile('net.spy:spymemcached') |
| integrationTestCompile('pl.pragmatists:JUnitParams') |
| |
| integrationTestRuntime('org.apache.derby:derby') |
| integrationTestRuntime('xerces:xercesImpl') |
| |
| |
| distributedTestCompile(project(':geode-junit')) { |
| exclude module: 'geode-core' |
| } |
| distributedTestCompile(project(':geode-dunit')) { |
| exclude module: 'geode-core' |
| } |
| distributedTestCompile('redis.clients:jedis') |
| distributedTestCompile('pl.pragmatists:JUnitParams') |
| distributedTestCompile('com.jayway.jsonpath:json-path-assert') |
| |
| distributedTestRuntime(project(':geode-old-versions')) |
| distributedTestRuntime('org.apache.derby:derby') |
| |
| |
| upgradeTestCompile(project(':geode-dunit')) { |
| exclude module: 'geode-core' |
| } |
| |
| upgradeTestRuntime(project(':geode-old-versions')) |
| |
| |
| performanceTestCompile(project(':geode-junit')) { |
| exclude module: 'geode-core' |
| } |
| } |
| |
| tasks.eclipse.dependsOn(generateGrammarSource) |
| |
| distributedTest { |
| // Some tests have inner tests that should be ignored |
| exclude "**/*\$*.class" |
| } |
| |
| rootProject.generate.dependsOn(generateGrammarSource) |