-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
81 lines (72 loc) · 2.55 KB
/
Copy pathbuild.gradle
File metadata and controls
81 lines (72 loc) · 2.55 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
buildscript {
ext {
coverallsVersion = '2.8.1'
coberturaVersion = '2.3.1'
sonarQubeGradleVersion = '2.2'
}
repositories {
mavenCentral()
}
dependencies {
classpath("org.kt3k.gradle.plugin:coveralls-gradle-plugin:${coverallsVersion}")
classpath("net.saliman:gradle-cobertura-plugin:${coberturaVersion}")
classpath("org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:${sonarQubeGradleVersion}")
}
}
group = 'com.tosinogunrinde.cql'
apply plugin: 'java'
apply plugin: 'maven'
apply plugin: 'eclipse'
apply plugin: 'com.github.kt3k.coveralls'
apply plugin: 'net.saliman.cobertura'
apply plugin: 'org.sonarqube'
apply plugin: 'jacoco'
cobertura.coverageFormats = ['html', 'xml']
sourceCompatibility = 1.8
repositories {
mavenCentral()
}
def datastaxCassandraVersion = '2.1.9'
def logbackVersion = '1.1.7'
def powermockVersion = '1.7.0RC2'
dependencies {
compile group: 'org.reflections', name: 'reflections', version: '0.9.10'
compile group: 'com.datastax.cassandra', name: 'cassandra-driver-core', version: "${datastaxCassandraVersion}"
compile group: 'com.datastax.cassandra', name: 'cassandra-driver-mapping', version: "${datastaxCassandraVersion}"
testCompile group: 'org.slf4j', name: 'slf4j-api', version: '1.7.21'
testCompile group: 'ch.qos.logback', name: 'logback-classic', version: "${logbackVersion}"
testCompile group: 'ch.qos.logback', name: 'logback-core', version: "${logbackVersion}"
testCompile group: 'org.powermock', name: 'powermock-module-junit4', version: "${powermockVersion}"
testCompile group: 'org.powermock', name: 'powermock-api-mockito', version: "${powermockVersion}"
testCompile group: 'org.hamcrest', name: 'hamcrest-library', version: '1.3'
}
def nexusUrl
if(project.hasProperty("nexusServer")) {
if (version.endsWith("-SNAPSHOT")) {
nexusUrl = "${nexusServer}/repository/maven-snapshots"
} else {
nexusUrl = "${nexusServer}/repository/maven-releases"
}
}
uploadArchives {
if (!project.hasProperty("nexusUsername") || !project.hasProperty("nexusPassword")) {
return
}
repositories {
mavenDeployer {
repository(url: "${nexusUrl}") {
authentication(userName: "${nexusUsername}", password: "${nexusPassword}")
}
pom.project {
artifactId = project.name
}
}
}
}
task sourcesJar(type: Jar, dependsOn: classes) {
classifier 'sources'
from sourceSets.main.allSource
}
artifacts {
archives sourcesJar
}