-
Notifications
You must be signed in to change notification settings - Fork 12
/
build.gradle
129 lines (110 loc) · 4.03 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
import io.freefair.gradle.plugins.okhttp.tasks.UploadFile
plugins {
id "org.springframework.boot" version "3.3.6" apply false
id "io.github.gradle-nexus.publish-plugin" version "2.0.0"
id "io.freefair.git-version"
id "io.freefair.okhttp"
id "io.freefair.maven-central.validate-poms" apply false
id "io.freefair.aggregate-javadoc"
}
allprojects {
group = "io.freefair.okhttp-spring-boot"
plugins.withId("java") {
java {
withSourcesJar()
withJavadocJar()
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}
tasks.named('jar', Jar) {
into("META-INF") {
from rootProject.file("LICENSE")
}
}
}
tasks.withType(JavaCompile).configureEach {
options.compilerArgs += ['-Werror']
}
tasks.withType(Javadoc).configureEach {
options.addBooleanOption "Xdoclint:-missing", true
failOnError = false
}
plugins.withId("maven-publish") {
project.apply plugin: "signing"
project.apply plugin: "io.freefair.maven-central.validate-poms"
signing {
required { !version.endsWith('SNAPSHOT') && gradle.taskGraph.hasTask("publish") }
def signingKey = findProperty("signingKey")
def signingPassword = findProperty("signingPassword")
useInMemoryPgpKeys(signingKey, signingPassword)
}
publishing {
publications.withType(MavenPublication) {
pom {
name = provider { project.description }
description = provider { project.description }
url = "https://github.com/freefair/okhttp-spring-boot"
licenses {
license {
name = 'MIT License'
url = 'https://opensource.org/licenses/MIT'
}
}
developers {
developer {
id = 'larsgrefer'
name = 'Lars Grefer'
email = '[email protected]'
timezone = 'Europe/Berlin'
}
}
ciManagement {
system = 'GitHub Actions'
url = 'https://github.com/freefair/okhttp-spring-boot/actions'
}
issueManagement {
system = 'GitHub Issues'
url = 'https://github.com/freefair/okhttp-spring-boot/issues'
}
scm {
connection = 'scm:git:https://github.com/freefair/okhttp-spring-boot.git'
developerConnection = 'scm:git:[email protected]:freefair/okhttp-spring-boot.git'
url = 'https://github.com/freefair/okhttp-spring-boot'
}
}
}
}
}
}
apply plugin: "maven-publish"
nexusPublishing {
repositories {
sonatype {
stagingProfileId = '7e6204597a774f'
}
}
}
dependencies {
javadoc project(":okhttp-spring-client")
javadoc project(":okhttp-spring-boot-autoconfigure")
javadoc project(":starters:okhttp-spring-boot-starter")
javadocClasspath "org.springframework.boot:spring-boot-starter-actuator"
javadocClasspath 'com.squareup.okhttp3:logging-interceptor'
}
tasks.named('javadoc', Javadoc) {
options.locale "en_US"
options.linkSource true
options.links "https://square.github.io/okhttp/5.x/"
failOnError = false
}
tasks.register('uploadDocumentation', UploadFile) {
dependsOn ":javadocJar"
username = "user"
password = findProperty('freefairDocsPass')
file = tasks.named("javadocJar", Jar).flatMap {it.archiveFile}
url = "https://docs.freefair.io/api/$project.version?path=okhttp-spring-boot"
}
tasks.named('wrapper') {
distributionType = Wrapper.DistributionType.BIN
}