-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
163 lines (138 loc) · 4.57 KB
/
build.gradle
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
plugins {
id 'java'
id 'signing'
id 'maven-publish'
id 'jacoco'
id 'pl.allegro.tech.build.axion-release' version '1.10.1'
id 'com.github.kt3k.coveralls' version '2.8.2'
}
scmVersion {
tag {
prefix = 'RELEASE'
}
}
group 'uk.co.caeldev'
project.version = scmVersion.version
repositories {
jcenter()
mavenCentral()
}
dependencies {
implementation "ch.qos.logback:logback-classic:1.2.3"
implementation "com.google.guava:guava:27.1-jre"
implementation "com.datastax.cassandra:cassandra-driver-mapping:3.7.1"
implementation "com.datastax.cassandra:cassandra-driver-core:3.7.1"
implementation "com.squareup:javapoet:1.11.1"
implementation "org.apache.commons:commons-text:1.6"
testImplementation "org.junit.jupiter:junit-jupiter-api:5.4.1"
testImplementation "org.junit.jupiter:junit-jupiter-params:5.4.1"
testImplementation "org.assertj:assertj-core:3.12.2"
testImplementation "org.awaitility:awaitility:3.1.6"
testImplementation "uk.org.fyodor:fyodor-core:1.0.0"
testImplementation "org.mockito:mockito-junit-jupiter:2.27.0"
testImplementation "org.cassandraunit:cassandra-unit:3.11.2.0"
testImplementation "com.google.testing.compile:compile-testing:0.17"
testImplementation files(org.gradle.internal.jvm.Jvm.current().getToolsJar())
testRuntime "org.junit.jupiter:junit-jupiter-engine:5.4.1"
}
task sourcesJar(type: Jar) {
from sourceSets.main.allJava
archiveClassifier = 'sources'
}
task javadocJar(type: Jar) {
from javadoc
archiveClassifier = 'javadoc'
}
jar {
archivesBaseName = rootProject.name
group = group
version = version
manifest {
attributes 'Implementation-Title': 'cassitory',
'Implementation-Version': version,
'Built-By': System.getProperty('user.name'),
'Built-Date': new Date(),
'Built-JDK': System.getProperty('java.version'),
'Built-Gradle': gradle.gradleVersion
}
}
jacocoTestReport {
reports {
xml.enabled true
csv.enabled false
html.enabled false
}
}
coveralls {
jacocoReportPath 'build/reports/jacoco/test/jacocoTestReport.xml'
}
tasks.coveralls {
dependsOn 'check'
}
test {
useJUnitPlatform()
testLogging {
events 'PASSED', 'FAILED', 'SKIPPED'
}
jacoco {
destinationFile = file("$buildDir/jacoco/jacocoTest.exec")
classDumpDir = file("$buildDir/jacoco/classpathdumps")
}
}
def ossUsername = hasProperty('ossrhUsername') ? ossrhUsername : System.getenv('ossrhUsername')
def ossPassword = hasProperty('ossrhPassword') ? ossrhPassword : System.getenv('ossrhPassword')
publishing {
publications {
mavenJava(MavenPublication) {
from components.java
artifactId = rootProject.name
groupId = group
version = version
artifact sourcesJar
artifact javadocJar
pom {
name = "cassitory"
description = "Library to manage redundancy tables in Cassandra"
url = "https://github.com/caelcs/cassitory"
scm {
url = "https://github.com/caelcs/cassitory.git"
connection = "https://github.com/caelcs/cassitory.git"
developerConnection = "https://github.com/caelcs/cassitory.git"
}
licenses {
license {
name = "MIT"
url = "http://opensource.org/licenses/MIT"
distribution = "repo"
}
}
developers {
developer {
id = "caelcs"
name = "Adolfo E Custidiano S"
email = "[email protected]"
}
}
}
}
}
repositories {
maven {
def releasesRepoUrl = "https://oss.sonatype.org/service/local/staging/deploy/maven2"
def snapshotsRepoUrl = "https://oss.sonatype.org/content/repositories/snapshots"
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
credentials {
username = "${ossUsername}"
password = "${ossPassword}"
}
}
}
}
signing {
sign publishing.publications.mavenJava
required = { gradle.taskGraph.hasTask("publish") && !version.endsWith("SNAPSHOT") }
}
wrapper {
distributionType = Wrapper.DistributionType.ALL
gradleVersion = '5.4.1'
}