1
0
mirror of https://github.com/square/okhttp.git synced 2026-01-12 10:23:16 +03:00

Build Javadoc for OkUrlFactory and OkApacheClient.

Also create a permanent URL for 1.x Javadoc.
This commit is contained in:
Jesse Wilson
2014-05-24 10:28:50 -04:00
parent cc92c4cecc
commit e870d2645a
3 changed files with 45 additions and 4 deletions

View File

@@ -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

View File

@@ -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>

View File

@@ -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>