Skip to content

Commit

Permalink
Build Javadoc for OkUrlFactory and OkApacheClient.
Browse files Browse the repository at this point in the history
Also create a permanent URL for 1.x Javadoc.
  • Loading branch information
swankjesse committed May 24, 2014
1 parent cc92c4c commit e870d26
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 4 deletions.
18 changes: 14 additions & 4 deletions deploy_website.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,20 @@ rm -rf *
# Copy website files from real repo
cp -R ../website/* .

# Download the latest javadoc
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
mkdir javadoc
unzip javadoc.zip -d javadoc
# Download the latest javadoc to directories like 'javadoc' or 'javadoc-urlconnection'.
for DOCUMENTED_ARTIFACT in okhttp okhttp-urlconnection okhttp-apache
do
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
JAVADOC_DIR="javadoc${DOCUMENTED_ARTIFACT//okhttp/}"
mkdir $JAVADOC_DIR
unzip javadoc.zip -d $JAVADOC_DIR
rm javadoc.zip
done

# Download the 1.6.0 javadoc to '1.x/javadoc'.
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
mkdir -p 1.x/javadoc
unzip javadoc.zip -d 1.x/javadoc
rm javadoc.zip

# Stage all files in git and create a commit
Expand Down
16 changes: 16 additions & 0 deletions okhttp-apache/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,4 +36,20 @@
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<links>
<link>http://square.github.io/okhttp/javadoc/</link>
<link>http://hc.apache.org/httpcomponents-client-4.3.x/httpclient/apidocs/</link>
<link>https://hc.apache.org/httpcomponents-core-4.3.x/httpcore/apidocs/</link>
</links>
</configuration>
</plugin>
</plugins>
</build>
</project>
15 changes: 15 additions & 0 deletions okhttp-urlconnection/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,19 @@
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<configuration>
<excludePackageNames>com.squareup.okhttp.internal.*</excludePackageNames>
<links>
<link>http://square.github.io/okhttp/javadoc/</link>
</links>
</configuration>
</plugin>
</plugins>
</build>
</project>

0 comments on commit e870d26

Please sign in to comment.