1
0
mirror of https://github.com/square/okhttp.git synced 2025-04-19 07:42:15 +03:00

Fixup some deploy_website problems (#8063)

* Fixup some deploy_website problems

* Skip all internal packages
This commit is contained in:
Jesse Wilson 2023-11-20 07:26:12 -08:00 committed by GitHub
parent 6132f27104
commit 0343ff823c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 11 additions and 26 deletions

View File

@ -7,7 +7,7 @@ import groovy.util.NodeList
import java.net.URL
import kotlinx.validation.ApiValidationExtension
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
import org.jetbrains.dokka.gradle.DokkaTask
import org.jetbrains.dokka.gradle.DokkaTaskPartial
import org.jetbrains.kotlin.gradle.targets.js.testing.KotlinJsTest
import org.jetbrains.kotlin.gradle.targets.jvm.tasks.KotlinJvmTest
import org.jetbrains.kotlin.gradle.targets.native.tasks.KotlinNativeTest
@ -219,30 +219,23 @@ subprojects {
/** Configure publishing and signing for published Java and JavaPlatform subprojects. */
subprojects {
tasks.withType<DokkaTask>().configureEach {
tasks.withType<DokkaTaskPartial>().configureEach {
dokkaSourceSets.configureEach {
reportUndocumented.set(false)
skipDeprecated.set(true)
jdkVersion.set(8)
perPackageOption {
matchingRegex.set("okhttp3\\.internal.*")
suppress.set(true)
}
perPackageOption {
matchingRegex.set("mockwebserver3\\.internal.*")
matchingRegex.set(".*\\.internal.*")
suppress.set(true)
}
if (project.file("Module.md").exists()) {
includes.from(project.file("Module.md"))
}
externalDocumentationLink {
url.set(URL("https://square.github.io/okio/2.x/okio/"))
packageListUrl.set(URL("https://square.github.io/okio/2.x/okio/package-list"))
url.set(URL("https://square.github.io/okio/3.x/okio/"))
packageListUrl.set(URL("https://square.github.io/okio/3.x/okio/okio/package-list"))
}
}
if (name == "dokkaGfm") {
outputDirectory.set(file("${rootDir}/docs/4.x"))
}
}
plugins.withId("com.vanniktech.maven.publish.base") {

View File

@ -2,9 +2,7 @@
# The website is built using MkDocs with the Material theme.
# https://squidfunk.github.io/mkdocs-material/
# It requires Python to run.
# Install the packages with the following command:
# pip install mkdocs mkdocs-material mkdocs-redirects
# It requires python3 to run.
set -ex
@ -26,7 +24,7 @@ cd $DIR
# Generate the API docs
./gradlew dokkaHtmlMultiModule
mv ./build/dokka/htmlMultiModule docs/4.x
mv ./build/dokka/htmlMultiModule docs/5.x
# Copy in special files that GitHub wants in the project root.
cat README.md | grep -v 'project website' > docs/index.md
@ -34,6 +32,9 @@ cp CHANGELOG.md docs/changelogs/changelog.md
cp CONTRIBUTING.md docs/contribute/contributing.md
# Build the site and push the new files up to GitHub
python3 -m venv venv
source venv/bin/activate
pip install mkdocs-material mkdocs-redirects
mkdocs gh-deploy
# Restore Javadocs from 1.x, 2.x, and 3.x.

View File

@ -102,15 +102,7 @@ nav:
- 'Providers': security/security_providers.md
- 'Configuration History': security/tls_configuration_history.md
- 'Works with OkHttp': works_with_okhttp.md
- 'API':
- 'okhttp': 4.x/okhttp/okhttp3/index.html
- 'brotli': 4.x/okhttp-brotli/okhttp3.brotli/index.html
- 'dnsoverhttps': 4.x/okhttp-dnsoverhttps/okhttp3.dnsoverhttps/index.html
- 'logging-interceptor': 4.x/logging-interceptor/okhttp3.logging/index.html
- 'sse': 4.x/okhttp-sse/okhttp3.sse/index.html
- 'tls': 4.x/okhttp-tls/okhttp3.tls/index.html
- 'urlconnection': 4.x/okhttp-urlconnection/okhttp3/index.html
- 'mockwebserver': 4.x/mockwebserver/okhttp3.mockwebserver/index.html
- 'API': 5.x/okhttp/okhttp3/
- 'Change Logs':
- 'Change Log': changelogs/changelog.md
- '4.x Change Log': changelogs/changelog_4x.md
@ -123,4 +115,3 @@ nav:
- 'Code of Conduct': contribute/code_of_conduct.md
- 'Concurrency': contribute/concurrency.md
- 'Debug Logging': contribute/debug_logging.md