Skip to content

Commit 5f8958f

Browse files
committed
Use Javadoc's -linkoffline instead of -link
`-link` does I/O to download the package list, for every javadoc invocation. There is no caching, so this happens many times per build. Swap to offline mode to avoid spamming the servers, and avoid build failures if the servers aren't entirely healthy.
1 parent 871aaac commit 5f8958f

File tree

9 files changed

+307
-5
lines changed

9 files changed

+307
-5
lines changed

all/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ tasks.named("javadoc").configure {
4949
continue;
5050
}
5151
source subproject.javadoc.source
52-
options.links subproject.javadoc.options.links.toArray(new String[0])
52+
options.linksOffline.addAll subproject.javadoc.options.linksOffline
5353
}
5454
}
5555

build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,8 @@ subprojects {
207207
options {
208208
encoding = 'UTF-8'
209209
use = true
210-
links 'https://docs.oracle.com/javase/8/docs/api/'
210+
linksOffline 'https://docs.oracle.com/javase/8/docs/api/',
211+
"${rootProject.projectDir}/gradle/javadoc/docs.oracle.com-javase-8-docs-api/"
211212
source = "8"
212213
}
213214
}
Lines changed: 217 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,217 @@
1+
java.applet
2+
java.awt
3+
java.awt.color
4+
java.awt.datatransfer
5+
java.awt.dnd
6+
java.awt.event
7+
java.awt.font
8+
java.awt.geom
9+
java.awt.im
10+
java.awt.im.spi
11+
java.awt.image
12+
java.awt.image.renderable
13+
java.awt.print
14+
java.beans
15+
java.beans.beancontext
16+
java.io
17+
java.lang
18+
java.lang.annotation
19+
java.lang.instrument
20+
java.lang.invoke
21+
java.lang.management
22+
java.lang.ref
23+
java.lang.reflect
24+
java.math
25+
java.net
26+
java.nio
27+
java.nio.channels
28+
java.nio.channels.spi
29+
java.nio.charset
30+
java.nio.charset.spi
31+
java.nio.file
32+
java.nio.file.attribute
33+
java.nio.file.spi
34+
java.rmi
35+
java.rmi.activation
36+
java.rmi.dgc
37+
java.rmi.registry
38+
java.rmi.server
39+
java.security
40+
java.security.acl
41+
java.security.cert
42+
java.security.interfaces
43+
java.security.spec
44+
java.sql
45+
java.text
46+
java.text.spi
47+
java.time
48+
java.time.chrono
49+
java.time.format
50+
java.time.temporal
51+
java.time.zone
52+
java.util
53+
java.util.concurrent
54+
java.util.concurrent.atomic
55+
java.util.concurrent.locks
56+
java.util.function
57+
java.util.jar
58+
java.util.logging
59+
java.util.prefs
60+
java.util.regex
61+
java.util.spi
62+
java.util.stream
63+
java.util.zip
64+
javax.accessibility
65+
javax.activation
66+
javax.activity
67+
javax.annotation
68+
javax.annotation.processing
69+
javax.crypto
70+
javax.crypto.interfaces
71+
javax.crypto.spec
72+
javax.imageio
73+
javax.imageio.event
74+
javax.imageio.metadata
75+
javax.imageio.plugins.bmp
76+
javax.imageio.plugins.jpeg
77+
javax.imageio.spi
78+
javax.imageio.stream
79+
javax.jws
80+
javax.jws.soap
81+
javax.lang.model
82+
javax.lang.model.element
83+
javax.lang.model.type
84+
javax.lang.model.util
85+
javax.management
86+
javax.management.loading
87+
javax.management.modelmbean
88+
javax.management.monitor
89+
javax.management.openmbean
90+
javax.management.relation
91+
javax.management.remote
92+
javax.management.remote.rmi
93+
javax.management.timer
94+
javax.naming
95+
javax.naming.directory
96+
javax.naming.event
97+
javax.naming.ldap
98+
javax.naming.spi
99+
javax.net
100+
javax.net.ssl
101+
javax.print
102+
javax.print.attribute
103+
javax.print.attribute.standard
104+
javax.print.event
105+
javax.rmi
106+
javax.rmi.CORBA
107+
javax.rmi.ssl
108+
javax.script
109+
javax.security.auth
110+
javax.security.auth.callback
111+
javax.security.auth.kerberos
112+
javax.security.auth.login
113+
javax.security.auth.spi
114+
javax.security.auth.x500
115+
javax.security.cert
116+
javax.security.sasl
117+
javax.sound.midi
118+
javax.sound.midi.spi
119+
javax.sound.sampled
120+
javax.sound.sampled.spi
121+
javax.sql
122+
javax.sql.rowset
123+
javax.sql.rowset.serial
124+
javax.sql.rowset.spi
125+
javax.swing
126+
javax.swing.border
127+
javax.swing.colorchooser
128+
javax.swing.event
129+
javax.swing.filechooser
130+
javax.swing.plaf
131+
javax.swing.plaf.basic
132+
javax.swing.plaf.metal
133+
javax.swing.plaf.multi
134+
javax.swing.plaf.nimbus
135+
javax.swing.plaf.synth
136+
javax.swing.table
137+
javax.swing.text
138+
javax.swing.text.html
139+
javax.swing.text.html.parser
140+
javax.swing.text.rtf
141+
javax.swing.tree
142+
javax.swing.undo
143+
javax.tools
144+
javax.transaction
145+
javax.transaction.xa
146+
javax.xml
147+
javax.xml.bind
148+
javax.xml.bind.annotation
149+
javax.xml.bind.annotation.adapters
150+
javax.xml.bind.attachment
151+
javax.xml.bind.helpers
152+
javax.xml.bind.util
153+
javax.xml.crypto
154+
javax.xml.crypto.dom
155+
javax.xml.crypto.dsig
156+
javax.xml.crypto.dsig.dom
157+
javax.xml.crypto.dsig.keyinfo
158+
javax.xml.crypto.dsig.spec
159+
javax.xml.datatype
160+
javax.xml.namespace
161+
javax.xml.parsers
162+
javax.xml.soap
163+
javax.xml.stream
164+
javax.xml.stream.events
165+
javax.xml.stream.util
166+
javax.xml.transform
167+
javax.xml.transform.dom
168+
javax.xml.transform.sax
169+
javax.xml.transform.stax
170+
javax.xml.transform.stream
171+
javax.xml.validation
172+
javax.xml.ws
173+
javax.xml.ws.handler
174+
javax.xml.ws.handler.soap
175+
javax.xml.ws.http
176+
javax.xml.ws.soap
177+
javax.xml.ws.spi
178+
javax.xml.ws.spi.http
179+
javax.xml.ws.wsaddressing
180+
javax.xml.xpath
181+
org.ietf.jgss
182+
org.omg.CORBA
183+
org.omg.CORBA.DynAnyPackage
184+
org.omg.CORBA.ORBPackage
185+
org.omg.CORBA.TypeCodePackage
186+
org.omg.CORBA.portable
187+
org.omg.CORBA_2_3
188+
org.omg.CORBA_2_3.portable
189+
org.omg.CosNaming
190+
org.omg.CosNaming.NamingContextExtPackage
191+
org.omg.CosNaming.NamingContextPackage
192+
org.omg.Dynamic
193+
org.omg.DynamicAny
194+
org.omg.DynamicAny.DynAnyFactoryPackage
195+
org.omg.DynamicAny.DynAnyPackage
196+
org.omg.IOP
197+
org.omg.IOP.CodecFactoryPackage
198+
org.omg.IOP.CodecPackage
199+
org.omg.Messaging
200+
org.omg.PortableInterceptor
201+
org.omg.PortableInterceptor.ORBInitInfoPackage
202+
org.omg.PortableServer
203+
org.omg.PortableServer.CurrentPackage
204+
org.omg.PortableServer.POAManagerPackage
205+
org.omg.PortableServer.POAPackage
206+
org.omg.PortableServer.ServantLocatorPackage
207+
org.omg.PortableServer.portable
208+
org.omg.SendingContext
209+
org.omg.stub.java.rmi
210+
org.w3c.dom
211+
org.w3c.dom.bootstrap
212+
org.w3c.dom.events
213+
org.w3c.dom.ls
214+
org.w3c.dom.views
215+
org.xml.sax
216+
org.xml.sax.ext
217+
org.xml.sax.helpers
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
io.netty.bootstrap
2+
io.netty.buffer
3+
io.netty.buffer.search
4+
io.netty.channel
5+
io.netty.channel.embedded
6+
io.netty.channel.epoll
7+
io.netty.channel.group
8+
io.netty.channel.internal
9+
io.netty.channel.kqueue
10+
io.netty.channel.local
11+
io.netty.channel.nio
12+
io.netty.channel.oio
13+
io.netty.channel.pool
14+
io.netty.channel.rxtx
15+
io.netty.channel.sctp
16+
io.netty.channel.sctp.nio
17+
io.netty.channel.sctp.oio
18+
io.netty.channel.socket
19+
io.netty.channel.socket.nio
20+
io.netty.channel.socket.oio
21+
io.netty.channel.udt
22+
io.netty.channel.udt.nio
23+
io.netty.channel.unix
24+
io.netty.handler.address
25+
io.netty.handler.codec
26+
io.netty.handler.codec.base64
27+
io.netty.handler.codec.bytes
28+
io.netty.handler.codec.compression
29+
io.netty.handler.codec.dns
30+
io.netty.handler.codec.haproxy
31+
io.netty.handler.codec.http
32+
io.netty.handler.codec.http.cookie
33+
io.netty.handler.codec.http.cors
34+
io.netty.handler.codec.http.multipart
35+
io.netty.handler.codec.http.websocketx
36+
io.netty.handler.codec.http.websocketx.extensions
37+
io.netty.handler.codec.http.websocketx.extensions.compression
38+
io.netty.handler.codec.http2
39+
io.netty.handler.codec.json
40+
io.netty.handler.codec.marshalling
41+
io.netty.handler.codec.memcache
42+
io.netty.handler.codec.memcache.binary
43+
io.netty.handler.codec.mqtt
44+
io.netty.handler.codec.protobuf
45+
io.netty.handler.codec.redis
46+
io.netty.handler.codec.rtsp
47+
io.netty.handler.codec.sctp
48+
io.netty.handler.codec.serialization
49+
io.netty.handler.codec.smtp
50+
io.netty.handler.codec.socks
51+
io.netty.handler.codec.socksx
52+
io.netty.handler.codec.socksx.v4
53+
io.netty.handler.codec.socksx.v5
54+
io.netty.handler.codec.spdy
55+
io.netty.handler.codec.stomp
56+
io.netty.handler.codec.string
57+
io.netty.handler.codec.xml
58+
io.netty.handler.flow
59+
io.netty.handler.flush
60+
io.netty.handler.ipfilter
61+
io.netty.handler.logging
62+
io.netty.handler.pcap
63+
io.netty.handler.proxy
64+
io.netty.handler.ssl
65+
io.netty.handler.ssl.ocsp
66+
io.netty.handler.ssl.util
67+
io.netty.handler.stream
68+
io.netty.handler.timeout
69+
io.netty.handler.traffic
70+
io.netty.resolver
71+
io.netty.resolver.dns
72+
io.netty.resolver.dns.macos
73+
io.netty.util
74+
io.netty.util.collection
75+
io.netty.util.concurrent
76+
io.netty.util.internal
77+
io.netty.util.internal.logging
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
com.google.protobuf
2+
com.google.protobuf.compiler
3+
com.google.protobuf.util
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
com.squareup.okhttp

netty/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@ import net.ltgt.gradle.errorprone.CheckSeverity
7777
}
7878

7979
tasks.named("javadoc").configure {
80-
options.links 'http://netty.io/4.1/api/'
80+
options.linksOffline 'https://netty.io/4.1/api/',
81+
"${rootProject.projectDir}/gradle/javadoc/netty.io-4.1-api/"
8182
exclude 'io/grpc/netty/*Provider.java'
8283
exclude 'io/grpc/netty/GrpcHttp2ConnectionHandler.java'
8384
exclude 'io/grpc/netty/Internal*'

okhttp/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ tasks.named("checkstyleMain").configure {
4545
}
4646

4747
tasks.named("javadoc").configure {
48-
options.links 'http://square.github.io/okhttp/2.x/okhttp/'
48+
options.linksOffline 'https://square.github.io/okhttp/2.x/okhttp/',
49+
"${rootProject.projectDir}/gradle/javadoc/square.github.io-okhttp-2.x-okhttp/"
4950
exclude 'io/grpc/okhttp/Internal*'
5051
exclude 'io/grpc/okhttp/*Provider.java'
5152
exclude 'io/grpc/okhttp/internal/**'

protobuf/build.gradle

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,6 @@ dependencies {
3636
}
3737

3838
tasks.named("javadoc").configure {
39-
options.links 'https://protobuf.dev/reference/java/api-docs/'
39+
options.linksOffline 'https://protobuf.dev/reference/java/api-docs/',
40+
"${rootProject.projectDir}/gradle/javadoc/protobuf.dev-reference-java-api-docs/"
4041
}

0 commit comments

Comments
 (0)