-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
161 lines (144 loc) · 5.17 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
plugins {
id 'com.github.ben-manes.versions' version '0.46.0'
id 'jvm-test-suite'
id 'java-library'
id 'maven-publish'
id 'signing'
}
logger.quiet "Running Java version: " + System.properties['java.vm.vendor'] + " " + System.properties['java.vm.name'] + " " + System.properties['java.version']
logger.quiet "Running Gradle version: $gradle.gradleVersion"
group 'org.vincenzolabs'
project.ext.set('buildNumber', System.getenv('VERSION_NUMBER') ?: '1.0-SNAPSHOT')
version = project.ext.buildNumber
sourceCompatibility = '17'
logger.quiet "Building version: $version"
configurations {
compileOnly {
extendsFrom annotationProcessor
}
}
repositories {
mavenCentral()
}
ext {
springBootVersion = '3.0.4'
springVersion = '6.0.7'
lombokVersion = '1.18.26'
jacksonVersion = '2.14.2'
reactorTestVersion = '3.5.4'
junitVersion = '5.9.2'
assertjVersion = '3.24.2'
}
dependencies {
implementation "org.springframework.boot:spring-boot-starter-webflux:$springBootVersion"
implementation "org.springframework:spring-web:$springVersion"
implementation "com.fasterxml.jackson.core:jackson-core:$jacksonVersion"
implementation "com.fasterxml.jackson.core:jackson-databind:$jacksonVersion"
implementation "com.fasterxml.jackson.core:jackson-annotations:$jacksonVersion"
implementation "com.fasterxml.jackson.datatype:jackson-datatype-jsr310:$jacksonVersion"
compileOnly "org.projectlombok:lombok:$lombokVersion"
annotationProcessor "org.projectlombok:lombok:$lombokVersion"
testImplementation "org.springframework.boot:spring-boot-starter-test:$springBootVersion"
testImplementation "io.projectreactor:reactor-test:$reactorTestVersion"
testImplementation "org.junit.jupiter:junit-jupiter-api:$junitVersion"
testImplementation "org.assertj:assertj-core:$assertjVersion"
}
java {
withJavadocJar()
withSourcesJar()
}
publishing {
repositories {
maven {
url 'https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/'
credentials {
username = System.getenv('OSSRH_USERNAME')
password = System.getenv('OSSRH_PASSWORD')
}
}
}
publications {
mavenJava(MavenPublication) {
from components.java
groupId 'org.vincenzolabs'
artifactId 'maya-java-spring-sdk'
versionMapping {
usage('java-api') {
fromResolutionOf('runtimeClasspath')
}
usage('java-runtime') {
fromResolutionResult()
}
}
pom {
name = 'Maya-Java-Spring-SDK'
packaging = 'jar'
description = 'Maya-Java-Spring-SDK is a client library written in Java 17 and Spring Boot 3 for invoking Maya (formerly PayMaya) payment services.'
url = 'https://github.com/vincenzolabs/PayMaya-Java-Spring-SDK'
scm {
connection = 'scm:git:git://github.com/vincenzolabs/PayMaya-Java-Spring-SDK.git'
developerConnection = 'scm:git:ssh://github.com/vincenzolabs/PayMaya-Java-Spring-SDK.git'
url = 'https://github.com/vincenzolabs/PayMaya-Java-Spring-SDK/tree/master'
}
licenses {
license {
name = 'MIT License'
url = 'https://opensource.org/licenses/MIT'
}
}
developers {
developer {
id = 'rvbabilonia'
name = 'Rey Vincent Babilonia'
email = 'rvbabilonia@gmail.com'
}
}
}
}
}
}
signing {
def signingKey = findProperty("signingKey")
def signingPassword = findProperty("signingPassword")
useInMemoryPgpKeys(signingKey, signingPassword)
sign publishing.publications.mavenJava
}
javadoc {
if (JavaVersion.current().isJava9Compatible()) {
options.addBooleanOption('html5', true)
}
}
testing {
suites {
test {
useJUnitJupiter()
dependencies {
implementation "org.springframework.boot:spring-boot-starter-test:$springBootVersion"
implementation "io.projectreactor:reactor-test:$reactorTestVersion"
implementation "org.junit.jupiter:junit-jupiter-api:$junitVersion"
implementation "org.assertj:assertj-core:$assertjVersion"
}
}
integrationTest(JvmTestSuite) {
sources.java.srcDirs = ['src/integrationTest/java']
sources.resources.srcDirs = ['src/integrationTest/resources']
dependencies {
implementation project()
implementation sourceSets.test.output
}
targets {
all {
testTask.configure {
shouldRunAfter(test)
}
}
}
}
}
}
configurations {
integrationTestImplementation.extendsFrom testImplementation
}
wrapper {
gradleVersion = '8.0.2'
}