-
Notifications
You must be signed in to change notification settings - Fork 22
Expand file tree
/
Copy pathbuild.gradle
More file actions
112 lines (101 loc) · 2.67 KB
/
build.gradle
File metadata and controls
112 lines (101 loc) · 2.67 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
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
plugins {
id 'maven-publish'
id 'java-library'
id 'signing'
id 'checkstyle'
id 'com.diffplug.spotless' version '8.4.0'
}
group = 'com.ringcentral'
version = '3.4.0'
repositories {
mavenCentral()
}
dependencies {
api 'com.google.code.gson:gson:2.13.2'
api 'com.squareup.okhttp3:okhttp:5.3.2'
testImplementation 'junit:junit:4.13.2'
}
java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
withJavadocJar()
withSourcesJar()
}
publishing {
publications {
mavenJava(MavenPublication) {
artifactId = 'ringcentral'
from components.java
versionMapping {
usage('java-api') {
fromResolutionOf('runtimeClasspath')
}
usage('java-runtime') {
fromResolutionResult()
}
}
pom {
name = 'RingCentral SDK'
description = 'RingCentral Java SDK'
url = 'https://github.com/ringcentral/ringcentral-java'
licenses {
license {
name = 'MIT'
url = 'https://opensource.org/licenses/MIT'
}
}
developers {
developer {
id = 'tylerliu'
name = 'Tyler Liu'
email = 'tyler.liu@ringcentral.com'
}
}
scm {
connection = 'scm:git:git://git@github.com:ringcentral/ringcentral-java.git'
developerConnection = 'scm:git:ssh://git@github.com:ringcentral/ringcentral-java.git'
url = 'https://github.com/ringcentral/ringcentral-java'
}
}
}
}
repositories {
maven {
name = 'LocalStaging'
url = uri("$buildDir/staging-deploy")
}
}
}
signing {
sign publishing.publications.mavenJava
}
javadoc {
if (JavaVersion.current().isJava9Compatible()) {
options.addBooleanOption('html5', true)
}
}
test {
testLogging {
exceptionFormat = 'full'
}
}
spotless {
java {
target 'src/*/java/**/*.java'
googleJavaFormat('1.35.0').aosp()
formatAnnotations()
removeUnusedImports()
trimTrailingWhitespace()
endWithNewline()
}
}
checkstyle {
toolVersion = '13.4.0'
configFile = file('config/checkstyle/checkstyle.xml')
}
tasks.withType(Checkstyle).configureEach {
reports {
xml.required = true
html.required = true
}
}