elx/build.gradle

127 lines
3.8 KiB
Groovy
Raw Normal View History

2016-11-01 17:28:05 +01:00
plugins {
id "org.sonarqube" version "2.2"
}
printf "Host: %s\nOS: %s %s %s\nJVM: %s %s %s %s\nGroovy: %s\nGradle: %s\n" +
"Build: group: ${project.group} name: ${project.name} version: ${project.version}\n",
InetAddress.getLocalHost(),
System.getProperty("os.name"),
System.getProperty("os.arch"),
System.getProperty("os.version"),
System.getProperty("java.version"),
System.getProperty("java.vm.version"),
System.getProperty("java.vm.vendor"),
System.getProperty("java.vm.name"),
GroovySystem.getVersion(),
gradle.gradleVersion
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'signing'
apply plugin: 'findbugs'
apply plugin: 'pmd'
apply plugin: 'checkstyle'
apply plugin: "jacoco"
ext {
user = 'xbib'
name = 'elasticsearch-extras-client'
description = 'Some extras implemented for using Elasticsearch clients (node and transport)'
scmUrl = 'https://github.com/' + user + '/' + name
scmConnection = 'scm:git:git://github.com/' + user + '/' + name + '.git'
scmDeveloperConnection = 'scm:git:git://github.com/' + user + '/' + name + '.git'
}
2016-11-01 17:28:05 +01:00
sourceSets {
integrationTest {
java {
srcDir file('src/integration-test/java')
compileClasspath += main.output
compileClasspath += test.output
}
resources {
srcDir file('src/integration-test/resources')
}
}
}
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
2016-11-01 17:28:05 +01:00
configurations {
wagon
integrationTestCompile.extendsFrom testCompile
integrationTestRuntime.extendsFrom testRuntime
}
dependencies {
compile "org.xbib:metrics:1.0.0"
compile("org.elasticsearch.client:transport:5.1.1") {
2016-11-19 16:43:57 +01:00
exclude group: 'org.elasticsearch', module: 'securesm'
exclude group: 'org.elasticsearch.plugin', module: 'transport-netty3-client'
exclude group: 'org.elasticsearch.plugin', module: 'reindex-client'
exclude group: 'org.elasticsearch.plugin', module: 'percolator-client'
exclude group: 'org.elasticsearch.plugin', module: 'lang-mustache-client'
}
2017-01-12 12:53:25 +01:00
compile "io.netty:netty-transport-native-epoll:4.1.6.Final"
compile "io.netty:netty-transport-native-epoll:4.1.6.Final:linux-x86_64"
2016-11-16 22:35:33 +01:00
compile "org.apache.logging.log4j:log4j-api:2.7"
2016-11-01 17:28:05 +01:00
testCompile "junit:junit:4.12"
testCompile "org.apache.logging.log4j:log4j-core:2.7"
wagon 'org.apache.maven.wagon:wagon-ssh-external:2.10'
}
[compileJava, compileTestJava]*.options*.encoding = 'UTF-8'
2016-11-01 17:28:05 +01:00
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:all" << "-profile" << "compact3"
}
2016-11-16 22:35:33 +01:00
task integrationTest(type: Test, group: 'verification') {
2016-11-01 17:28:05 +01:00
include '**/MiscTestSuite.class'
include '**/BulkNodeTestSuite.class'
include '**/BulkTransportTestSuite.class'
testClassesDir = sourceSets.integrationTest.output.classesDir
classpath = configurations.integrationTestCompile
classpath += configurations.integrationTestRuntime
classpath += sourceSets.main.output
classpath += sourceSets.test.output
classpath += sourceSets.integrationTest.output
outputs.upToDateWhen { false }
systemProperty 'path.home', projectDir.absolutePath
2016-11-16 22:35:33 +01:00
testLogging.showStandardStreams = false
2016-11-01 17:28:05 +01:00
}
integrationTest.mustRunAfter test
check.dependsOn integrationTest
clean {
delete "plugins"
delete "logs"
}
task javadocJar(type: Jar, dependsOn: classes) {
from javadoc
into "build/tmp"
classifier 'javadoc'
}
task sourcesJar(type: Jar, dependsOn: classes) {
from sourceSets.main.allSource
into "build/tmp"
classifier 'sources'
}
artifacts {
archives javadocJar, sourcesJar
}
if (project.hasProperty('signing.keyId')) {
signing {
sign configurations.archives
}
}
apply from: 'gradle/publish.gradle'
apply from: 'gradle/sonarqube.gradle'