Skip to content

Commit e870d26

Browse files
committed
Build Javadoc for OkUrlFactory and OkApacheClient.
Also create a permanent URL for 1.x Javadoc.
1 parent cc92c4c commit e870d26

File tree

3 files changed

+45
-4
lines changed

3 files changed

+45
-4
lines changed

deploy_website.sh

+14-4
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,20 @@ rm -rf *
2626
# Copy website files from real repo
2727
cp -R ../website/* .
2828

29-
# Download the latest javadoc
30-
curl -L "http://repository.sonatype.org/service/local/artifact/maven/redirect?r=central-proxy&g=$GROUP_ID&a=$ARTIFACT_ID&v=LATEST&c=javadoc" > javadoc.zip
31-
mkdir javadoc
32-
unzip javadoc.zip -d javadoc
29+
# Download the latest javadoc to directories like 'javadoc' or 'javadoc-urlconnection'.
30+
for DOCUMENTED_ARTIFACT in okhttp okhttp-urlconnection okhttp-apache
31+
do
32+
curl -L "http://repository.sonatype.org/service/local/artifact/maven/redirect?r=central-proxy&g=$GROUP_ID&a=$DOCUMENTED_ARTIFACT&v=LATEST&c=javadoc" > javadoc.zip
33+
JAVADOC_DIR="javadoc${DOCUMENTED_ARTIFACT//okhttp/}"
34+
mkdir $JAVADOC_DIR
35+
unzip javadoc.zip -d $JAVADOC_DIR
36+
rm javadoc.zip
37+
done
38+
39+
# Download the 1.6.0 javadoc to '1.x/javadoc'.
40+
curl -L "http://repository.sonatype.org/service/local/artifact/maven/redirect?r=central-proxy&g=$GROUP_ID&a=$ARTIFACT_ID&v=1.6.0&c=javadoc" > javadoc.zip
41+
mkdir -p 1.x/javadoc
42+
unzip javadoc.zip -d 1.x/javadoc
3343
rm javadoc.zip
3444

3545
# Stage all files in git and create a commit

okhttp-apache/pom.xml

+16
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,20 @@
3636
<scope>test</scope>
3737
</dependency>
3838
</dependencies>
39+
40+
<build>
41+
<plugins>
42+
<plugin>
43+
<groupId>org.apache.maven.plugins</groupId>
44+
<artifactId>maven-javadoc-plugin</artifactId>
45+
<configuration>
46+
<links>
47+
<link>http://square.github.io/okhttp/javadoc/</link>
48+
<link>http://hc.apache.org/httpcomponents-client-4.3.x/httpclient/apidocs/</link>
49+
<link>https://hc.apache.org/httpcomponents-core-4.3.x/httpcore/apidocs/</link>
50+
</links>
51+
</configuration>
52+
</plugin>
53+
</plugins>
54+
</build>
3955
</project>

okhttp-urlconnection/pom.xml

+15
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,19 @@
2525
<scope>test</scope>
2626
</dependency>
2727
</dependencies>
28+
29+
<build>
30+
<plugins>
31+
<plugin>
32+
<groupId>org.apache.maven.plugins</groupId>
33+
<artifactId>maven-javadoc-plugin</artifactId>
34+
<configuration>
35+
<excludePackageNames>com.squareup.okhttp.internal.*</excludePackageNames>
36+
<links>
37+
<link>http://square.github.io/okhttp/javadoc/</link>
38+
</links>
39+
</configuration>
40+
</plugin>
41+
</plugins>
42+
</build>
2843
</project>

0 commit comments

Comments
 (0)