-
Notifications
You must be signed in to change notification settings - Fork 17
/
build.gradle
128 lines (108 loc) · 3.6 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
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath "io.codearte.gradle.nexus:gradle-nexus-staging-plugin:0.5.3"
}
}
plugins {
// Apply the java-library plugin to add support for Java Library
id 'java-library'
id 'maven-publish'
}
apply plugin: 'io.codearte.nexus-staging'
apply plugin: 'jacoco'
task sourcesJar(type: Jar, dependsOn: classes) {
classifier = 'sources'
from sourceSets.main.allSource
}
task javadocJar(type: Jar, dependsOn: javadoc) {
classifier = 'javadoc'
from javadoc.destinationDir
}
artifacts {
archives sourcesJar
archives javadocJar
}
repositories {
jcenter()
}
dependencies {
// This dependency is exported to consumers, that is to say found on their compile classpath.
api 'org.apache.commons:commons-math3:3.6.1'
// This dependency is used internally, and not exposed to consumers on their own compile classpath.
implementation 'com.google.guava:guava:23.0'
// Test frameworks required for testing
testImplementation "org.junit.jupiter:junit-jupiter-engine:${junit5Version}"
testImplementation "org.junit.jupiter:junit-jupiter:${junit5Version}"
testImplementation "org.mockito:mockito-junit-jupiter:${mockitoJunit5Version}"
testImplementation "org.assertj:assertj-core:${assertJCoreVersion}"
}
test {
finalizedBy jacocoTestReport
useJUnitPlatform()
testLogging {
events = ["passed", "failed", "skipped"]
}
}
jacocoTestReport {
reports {
xml.enabled true
html.enabled false
}
}
allprojects {
apply plugin: 'signing'
apply plugin: 'maven'
// Signature of artifacts
signing {
sign configurations.archives
}
// OSSRH publication
uploadArchives {
repositories {
mavenDeployer {
// POM signature
beforeDeployment { MavenDeployment deployment -> signing.signPom(deployment) }
// Target repository
repository(url: "https://oss.sonatype.org/service/local/staging/deploy/maven2/") {
authentication(userName: nexusUsername, password: nexusPassword)
}
pom.project {
groupId 'zw.co.paynow'
artifactId 'java-sdk'
version '1.1.0'
name 'java-sdk'
description 'This project contains libraries to interface with Zimbabwe\'s Leading Payments Gateway Paynow'
packaging 'jar'
url 'https://github.com/paynow/Paynow-Java-SDK'
inceptionYear '2018'
scm {
connection 'scm:git:https://github.com/paynow/Paynow-Java-SDK.git'
developerConnection 'scm:git:git@github.com:paynow/Paynow-Java-SDK.git'
url 'https://github.com/paynow/Paynow-Java-SDK.git'
}
licenses {
license {
name 'GNU General Public License v3.0'
url 'https://www.gnu.org/licenses/gpl.txt'
distribution 'repo'
}
}
developers {
developer {
id = 'paynow'
name = 'Webdev Projects'
email = 'projects@webdevworld.com'
}
}
}
}
}
}
}
nexusStaging {
username = nexusUsername
password = nexusPassword
}