forked from square/okhttp
-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.gradle
115 lines (107 loc) · 3.65 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
apply plugin: 'me.champeau.gradle.japicmp'
jar {
manifest {
attributes('Automatic-Module-Name': 'okhttp3')
}
}
sourceSets {
main.java.srcDirs += "$buildDir/generated/sources/java-templates/java/main"
}
compileKotlin {
dependsOn 'copyJavaTemplates'
}
task copyJavaTemplates(type: Copy) {
from 'src/main/java-templates'
into "$buildDir/generated/sources/java-templates/java/main"
expand('projectVersion': "${project.version}")
filteringCharset = 'UTF-8'
}
dependencies {
api deps.okio
api deps.kotlinStdlib
compileOnly deps.android
compileOnly deps.bouncycastle
compileOnly deps.bouncycastletls
compileOnly deps.conscrypt
compileOnly deps.openjsse
compileOnly deps.jsr305
compileOnly deps.animalSniffer
testImplementation project(':okhttp-testing-support')
testImplementation project(':okhttp-tls')
testImplementation project(':okhttp-urlconnection')
testImplementation project(':mockwebserver')
testImplementation project(':okhttp-logging-interceptor')
testImplementation deps.conscrypt
testImplementation deps.junit
testImplementation deps.assertj
testImplementation deps.openjsse
testCompileOnly deps.jsr305
}
afterEvaluate { project ->
project.tasks.dokka {
outputDirectory = "$rootDir/docs/4.x"
outputFormat = 'gfm'
}
}
task japicmp(type: me.champeau.gradle.japicmp.JapicmpTask, dependsOn: 'jar') {
oldClasspath = files(baselineJar(project, baselineVersion))
newClasspath = files(jar.archivePath)
onlyBinaryIncompatibleModified = true
failOnModification = true
txtOutputFile = file("$buildDir/reports/japi.txt")
ignoreMissingClasses = true
includeSynthetic = true
packageExcludes = [
'okhttp3.internal',
'okhttp3.internal.annotations',
'okhttp3.internal.cache',
'okhttp3.internal.cache2',
'okhttp3.internal.connection',
'okhttp3.internal.http',
'okhttp3.internal.http1',
'okhttp3.internal.http2',
'okhttp3.internal.io',
'okhttp3.internal.platform',
'okhttp3.internal.proxy',
'okhttp3.internal.publicsuffix',
'okhttp3.internal.tls',
'okhttp3.internal.ws',
]
classExcludes = [
// Package-private in 3.x, internal in 4.0.0:
'okhttp3.Cache$CacheResponseBody$1',
'okhttp3.RealCall$AsyncCall',
]
methodExcludes = [
// Became 'final' despite a non-final enclosing class in 4.0.0:
'okhttp3.OkHttpClient#authenticator()',
'okhttp3.OkHttpClient#cache()',
'okhttp3.OkHttpClient#callTimeoutMillis()',
'okhttp3.OkHttpClient#certificatePinner()',
'okhttp3.OkHttpClient#connectionPool()',
'okhttp3.OkHttpClient#connectionSpecs()',
'okhttp3.OkHttpClient#connectTimeoutMillis()',
'okhttp3.OkHttpClient#cookieJar()',
'okhttp3.OkHttpClient#dispatcher()',
'okhttp3.OkHttpClient#dns()',
'okhttp3.OkHttpClient#eventListenerFactory()',
'okhttp3.OkHttpClient#followRedirects()',
'okhttp3.OkHttpClient#followSslRedirects()',
'okhttp3.OkHttpClient#hostnameVerifier()',
'okhttp3.OkHttpClient#interceptors()',
'okhttp3.OkHttpClient#networkInterceptors()',
'okhttp3.OkHttpClient#pingIntervalMillis()',
'okhttp3.OkHttpClient#protocols()',
'okhttp3.OkHttpClient#proxy()',
'okhttp3.OkHttpClient#proxyAuthenticator()',
'okhttp3.OkHttpClient#proxySelector()',
'okhttp3.OkHttpClient#readTimeoutMillis()',
'okhttp3.OkHttpClient#retryOnConnectionFailure()',
'okhttp3.OkHttpClient#socketFactory()',
'okhttp3.OkHttpClient#sslSocketFactory()',
'okhttp3.OkHttpClient#writeTimeoutMillis()',
'okhttp3.OkHttpClient#writeTimeoutMillis()',
'okhttp3.Request$Builder#delete()',
]
}
check.dependsOn(japicmp)