This repository has been archived by the owner on Sep 25, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle
125 lines (112 loc) · 3.45 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
plugins {
id "java-library"
id "signing"
id "maven-publish"
id "com.diffplug.spotless" version "5.8.2"
id 'com.adarshr.test-logger' version "2.1.1"
id 'me.champeau.mrjar'
}
ext.isReleaseVersion = !version.endsWith("SNAPSHOT")
repositories {
mavenLocal()
jcenter()
}
publishing {
publications {
"$project.name"(MavenPublication) {
from components.java
pom {
name = project.name
description = 'Sinch Java SDK'
url = 'https://www.sinch.com'
licenses {
license {
name = 'MIT License'
url = 'https://www.opensource.org/licenses/mit-license.php'
}
}
scm {
connection = 'scm:git:git@github.com:sinch/sinch-java.git'
developerConnection = 'scm:git:git@github.com:sinch/sinch-java.git'
url = 'https://github.com/sinch/sinch-java'
}
developers {
developer {
id = 'frekra'
name = 'Fredrik Kratzer'
email = 'fredrik.kratzer@sinch.com'
}
developer {
id = 'adabia'
name = 'Adam Białas'
email = 'adam.bialas@sinch.com'
}
}
}
}
}
repositories {
maven {
name "Sonatype"
def releaseRepo = "https://oss.sonatype.org/service/local/staging/deploy/maven2/"
def snapshotRepo = "https://oss.sonatype.org/content/repositories/snapshots/"
url = isReleaseVersion ? releaseRepo : snapshotRepo
credentials {
username = project.findProperty('ossrhUsername')
password = project.findProperty('ossrhPassword')
}
}
}
repositories {
maven {
name "Sinch"
def repo = isReleaseVersion ? "releases" : "snapshots"
url = "https://nexus.int.clxnetworks.net/repository/clx-$repo-hosted"
credentials {
username = project.findProperty("clxRepoUser")
password = project.findProperty("clxRepoPassword")
}
}
}
}
signing {
required { isReleaseVersion && gradle.taskGraph.hasTask("publishAllPublicationsToSonatypeRepository") }
sign publishing.publications.getByName(project.name)
}
ext {
swaggerAnnotationsVersion = "1.5.22"
findbugsVersion = "3.0.2"
slf4jApiVersion = "1.7.30"
okhttpVersion = "4.9.0"
apacheHttpClientVersion = "5.0.3"
jacksonVersion = "2.11.4"
javaxValidationVersion = "2.0.1.Final"
wiremockVersion = "2.27.2"
assertjVersion = "3.19.0"
awaitilityVersion = "4.0.3"
mockitoVersion = "3.6.0"
junitVersion = "5.7.0"
}
dependencies {
}
spotless {
java {
target project.fileTree(project.projectDir) {
include 'src/**/*.java'
exclude 'build/**/*.*'
}
}
}
multiReleaseJar {
addLanguageVersion 11
}
task createVersionProperties(type: WriteProperties) {
outputFile file("$buildDir/resources/main/com/sinch/version.properties")
property "version", project.version.toString()
}
classes.dependsOn createVersionProperties
task printVersionName {
doLast {
println project.version
}
}