1
0
mirror of https://github.com/square/okhttp.git synced 2025-07-31 05:04:26 +03:00

Tweak the MkDocs build

Retain the 3.x docs by doing a dirty MkDocs build
Build more Dokka projects
This commit is contained in:
Jesse Wilson
2019-06-19 23:33:02 -04:00
parent 13ff2b9157
commit 70cd67c75d
9 changed files with 77 additions and 7 deletions

View File

@ -111,7 +111,7 @@ subprojects { project ->
spotless {
kotlin {
target "**/*.kt"
ktlint(versions.ktlint).userData(['indent_size': '2', 'continuation_indent_size' : '2'])
ktlint(versions.ktlint).userData(['indent_size': '2', 'continuation_indent_size': '2'])
}
}

View File

@ -21,11 +21,23 @@ git clone $REPO $DIR
cd $DIR
# Generate the API docs
./gradlew :okhttp:dokka
./gradlew \
:mockwebserver:dokka \
:okhttp-dnsoverhttps:dokka \
:okhttp-logging-interceptor:dokka \
:okhttp-sse:dokka \
:okhttp-tls:dokka \
:okhttp-urlconnection:dokka \
:okhttp:dokka
# Build the site and push the new files up to GitHub
mkdocs gh-deploy
# Restore Javadocs from 1.x, 2.x, and 3.x.
git checkout gh-pages
git cherry-pick bb229b9dcc9a21a73edbf8d936bea88f52e0a3ff
git push
# Delete our temp folder
cd ..
rm -rf $DIR

View File

@ -47,4 +47,20 @@ nav:
- 'Upgrading to OkHttp 4': upgrading_to_okhttp_4.md
- 'Works with OkHttp': works_with_okhttp.md
- 'Stack Overflow': https://stackoverflow.com/questions/tagged/okhttp?sort=active
- 'API Docs': api/okhttp/okhttp3/index.md
- '4.x API':
- 'okhttp': api/okhttp/okhttp3/index.md
- 'dnsoverhttps': api/okhttp-dnsoverhttps/okhttp3.dnsoverhttps/index.md
- 'logging-interceptor': api/okhttp-logging-interceptor/okhttp3.logging/index.md
- 'sse': api/okhttp-sse/okhttp3.sse/index.md
- 'tls': api/okhttp-tls/okhttp3.tls/index.md
- 'urlconnection': api/okhttp-urlconnection/okhttp3/index.md
- 'mockwebserver': api/mockwebserver/okhttp3.mockwebserver/index.md
- '3.x API':
- 'okhttp': https://square.github.io/okhttp/3.x/okhttp/
- 'dnsoverhttps': https://square.github.io/okhttp/3.x/okhttp-dnsoverhttps/
- 'logging-interceptor': https://square.github.io/okhttp/3.x/logging-interceptor/
- 'sse': https://square.github.io/okhttp/3.x/okhttp-sse/
- 'tls': https://square.github.io/okhttp/3.x/okhttp-tls/
- 'urlconnection': https://square.github.io/okhttp/3.x/okhttp-urlconnection/
- 'mockwebserver': https://square.github.io/okhttp/3.x/mockwebserver/

View File

@ -16,6 +16,13 @@ dependencies {
testImplementation deps.assertj
}
afterEvaluate { project ->
project.tasks.dokka {
outputDirectory = "$rootDir/docs/api"
outputFormat = 'gfm'
}
}
task japicmp(type: me.champeau.gradle.japicmp.JapicmpTask, dependsOn: 'jar') {
oldClasspath = files(baselineJar(project, baselineVersion))
newClasspath = files(jar.archivePath)

View File

@ -16,3 +16,10 @@ dependencies {
testImplementation deps.junit
testImplementation deps.assertj
}
afterEvaluate { project ->
project.tasks.dokka {
outputDirectory = "$rootDir/docs/api"
outputFormat = 'gfm'
}
}

View File

@ -19,6 +19,13 @@ dependencies {
testImplementation deps.assertj
}
afterEvaluate { project ->
project.tasks.dokka {
outputDirectory = "$rootDir/docs/api"
outputFormat = 'gfm'
}
}
task japicmp(type: me.champeau.gradle.japicmp.JapicmpTask, dependsOn: 'jar') {
oldClasspath = files(baselineJar(project, baselineVersion))
newClasspath = files(jar.archivePath)

View File

@ -18,6 +18,13 @@ dependencies {
testCompileOnly deps.jsr305
}
afterEvaluate { project ->
project.tasks.dokka {
outputDirectory = "$rootDir/docs/api"
outputFormat = 'gfm'
}
}
task japicmp(type: me.champeau.gradle.japicmp.JapicmpTask, dependsOn: 'jar') {
oldClasspath = files(baselineJar(project, baselineVersion))
newClasspath = files(jar.archivePath)

View File

@ -18,6 +18,13 @@ dependencies {
testImplementation deps.assertj
}
afterEvaluate { project ->
project.tasks.dokka {
outputDirectory = "$rootDir/docs/api"
outputFormat = 'gfm'
}
}
task japicmp(type: me.champeau.gradle.japicmp.JapicmpTask, dependsOn: 'jar') {
oldClasspath = files(baselineJar(project, baselineVersion))
newClasspath = files(jar.archivePath)

View File

@ -19,6 +19,13 @@ dependencies {
testImplementation deps.assertj
}
afterEvaluate { project ->
project.tasks.dokka {
outputDirectory = "$rootDir/docs/api"
outputFormat = 'gfm'
}
}
task japicmp(type: me.champeau.gradle.japicmp.JapicmpTask, dependsOn: 'jar') {
oldClasspath = files(baselineJar(project, baselineVersion))
newClasspath = files(jar.archivePath)