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

@ -107,11 +107,11 @@ subprojects { project ->
signature 'net.sf.androidscents.signature:android-api-level-21:5.0.1_r2@signature' signature 'net.sf.androidscents.signature:android-api-level-21:5.0.1_r2@signature'
signature 'org.codehaus.mojo.signature:java18:1.0@signature' signature 'org.codehaus.mojo.signature:java18:1.0@signature'
} }
spotless { spotless {
kotlin { kotlin {
target "**/*.kt" 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 // 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. // plugin overwrites our dokka configuration on projects where it's applied.
afterEvaluate { p -> afterEvaluate { p ->
p.tasks.dokka { p.tasks.dokka {
reportUndocumented = false reportUndocumented = false
skipDeprecated = true skipDeprecated = true
jdkVersion = 8 jdkVersion = 8
packageOptions { packageOptions {
prefix = "okhttp3.internal" prefix = "okhttp3.internal"

View File

@ -21,11 +21,23 @@ git clone $REPO $DIR
cd $DIR cd $DIR
# Generate the API docs # 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 # Build the site and push the new files up to GitHub
mkdocs gh-deploy 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 # Delete our temp folder
cd .. cd ..
rm -rf $DIR rm -rf $DIR

View File

@ -47,4 +47,20 @@ nav:
- 'Upgrading to OkHttp 4': upgrading_to_okhttp_4.md - 'Upgrading to OkHttp 4': upgrading_to_okhttp_4.md
- 'Works with OkHttp': works_with_okhttp.md - 'Works with OkHttp': works_with_okhttp.md
- 'Stack Overflow': https://stackoverflow.com/questions/tagged/okhttp?sort=active - '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 testImplementation deps.assertj
} }
afterEvaluate { project ->
project.tasks.dokka {
outputDirectory = "$rootDir/docs/api"
outputFormat = 'gfm'
}
}
task japicmp(type: me.champeau.gradle.japicmp.JapicmpTask, dependsOn: 'jar') { task japicmp(type: me.champeau.gradle.japicmp.JapicmpTask, dependsOn: 'jar') {
oldClasspath = files(baselineJar(project, baselineVersion)) oldClasspath = files(baselineJar(project, baselineVersion))
newClasspath = files(jar.archivePath) newClasspath = files(jar.archivePath)

View File

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

View File

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

View File

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

View File

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

View File

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