-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.gradle
94 lines (83 loc) · 2.78 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
import com.vanniktech.maven.publish.SonatypeHost
buildscript {
repositories {
mavenCentral()
}
}
plugins {
id "com.vanniktech.maven.publish" version "0.29.0"
}
ext {
apacheCommonsLang3 = "3.14.0"
googleJsr305Version = "3.0.2"
mockitoVersion = "5.3.0"
jacksonDatabindNullableVersion = "0.2.6"
jacksonVersion = "2.16.1"
jacocoVersion = "0.8.8"
junitVersion = "5.10.1"
}
allprojects {
apply plugin: 'idea'
apply plugin: 'eclipse'
apply plugin: 'java-library'
apply plugin: 'jacoco'
apply plugin: 'com.vanniktech.maven.publish'
group = 'com.thousandeyes.sdk'
}
subprojects {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
// Some text from the schema is copy pasted into the source files as UTF-8
// but the default still seems to be to use platform encoding
tasks.withType(JavaCompile) {
options.encoding = 'UTF-8'
}
javadoc {
options.encoding = 'UTF-8'
}
task execute(type: JavaExec) {
classpath = sourceSets.main.runtimeClasspath
}
jacocoTestReport {
dependsOn test
reports {
csv.required = false
html.required = false
xml.required = true
}
}
test {
useJUnitPlatform()
finalizedBy jacocoTestReport
maxParallelForks = Runtime.runtime.availableProcessors().intdiv(2) ?: 1
}
mavenPublishing {
coordinates("com.thousandeyes.sdk", project.name, project.version)
pom {
name = "ThousandEyes Java SDK - ${project.name}"
description = 'A set of Java client libraries for the Thousandeyes v7 API. For more information, visit: https://developer.cisco.com/docs/thousandeyes/v7/'
url = 'https://github.com/thousandeyes/thousandeyes-sdk-java'
licenses {
license {
name = 'The Apache License, Version 2.0'
url = 'http://www.apache.org/licenses/LICENSE-2.0.txt'
}
}
developers {
developer {
name = 'ThousandEyes API Team'
email = '[email protected]'
organization = 'Cisco - ThousandEyes'
organizationUrl = 'https://www.thousandeyes.com'
}
}
scm {
connection = 'scm:git:git://github.com/thousandeyes/thousandeyes-sdk-java.git'
developerConnection = 'scm:git:ssh://github.com/thousandeyes/thousandeyes-sdk-java.git'
url = 'https://github.com/thousandeyes/thousandeyes-sdk-java/tree/main'
}
}
publishToMavenCentral(SonatypeHost.CENTRAL_PORTAL, true)
signAllPublications()
}
}