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:
@ -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'])
|
||||
}
|
||||
}
|
||||
|
||||
@ -159,9 +159,9 @@ subprojects { project ->
|
||||
// We have to set the dokka configuration after evaluation since the com.vanniktech.maven.publish
|
||||
// plugin overwrites our dokka configuration on projects where it's applied.
|
||||
afterEvaluate { p ->
|
||||
p.tasks.dokka {
|
||||
reportUndocumented = false
|
||||
skipDeprecated = true
|
||||
p.tasks.dokka {
|
||||
reportUndocumented = false
|
||||
skipDeprecated = true
|
||||
jdkVersion = 8
|
||||
packageOptions {
|
||||
prefix = "okhttp3.internal"
|
||||
|
@ -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
|
||||
|
18
mkdocs.yml
18
mkdocs.yml
@ -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/
|
||||
|
||||
|
@ -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)
|
||||
|
@ -16,3 +16,10 @@ dependencies {
|
||||
testImplementation deps.junit
|
||||
testImplementation deps.assertj
|
||||
}
|
||||
|
||||
afterEvaluate { project ->
|
||||
project.tasks.dokka {
|
||||
outputDirectory = "$rootDir/docs/api"
|
||||
outputFormat = 'gfm'
|
||||
}
|
||||
}
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
Reference in New Issue
Block a user