Skip to content

Commit 0343ff8

Browse files
authored
Fixup some deploy_website problems (#8063)
* Fixup some deploy_website problems * Skip all internal packages
1 parent 6132f27 commit 0343ff8

File tree

3 files changed

+11
-26
lines changed

3 files changed

+11
-26
lines changed

Diff for: build.gradle.kts

+5-12
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import groovy.util.NodeList
77
import java.net.URL
88
import kotlinx.validation.ApiValidationExtension
99
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
10-
import org.jetbrains.dokka.gradle.DokkaTask
10+
import org.jetbrains.dokka.gradle.DokkaTaskPartial
1111
import org.jetbrains.kotlin.gradle.targets.js.testing.KotlinJsTest
1212
import org.jetbrains.kotlin.gradle.targets.jvm.tasks.KotlinJvmTest
1313
import org.jetbrains.kotlin.gradle.targets.native.tasks.KotlinNativeTest
@@ -219,30 +219,23 @@ subprojects {
219219

220220
/** Configure publishing and signing for published Java and JavaPlatform subprojects. */
221221
subprojects {
222-
tasks.withType<DokkaTask>().configureEach {
222+
tasks.withType<DokkaTaskPartial>().configureEach {
223223
dokkaSourceSets.configureEach {
224224
reportUndocumented.set(false)
225225
skipDeprecated.set(true)
226226
jdkVersion.set(8)
227227
perPackageOption {
228-
matchingRegex.set("okhttp3\\.internal.*")
229-
suppress.set(true)
230-
}
231-
perPackageOption {
232-
matchingRegex.set("mockwebserver3\\.internal.*")
228+
matchingRegex.set(".*\\.internal.*")
233229
suppress.set(true)
234230
}
235231
if (project.file("Module.md").exists()) {
236232
includes.from(project.file("Module.md"))
237233
}
238234
externalDocumentationLink {
239-
url.set(URL("https://square.github.io/okio/2.x/okio/"))
240-
packageListUrl.set(URL("https://square.github.io/okio/2.x/okio/package-list"))
235+
url.set(URL("https://square.github.io/okio/3.x/okio/"))
236+
packageListUrl.set(URL("https://square.github.io/okio/3.x/okio/okio/package-list"))
241237
}
242238
}
243-
if (name == "dokkaGfm") {
244-
outputDirectory.set(file("${rootDir}/docs/4.x"))
245-
}
246239
}
247240

248241
plugins.withId("com.vanniktech.maven.publish.base") {

Diff for: deploy_website.sh

+5-4
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,7 @@
22

33
# The website is built using MkDocs with the Material theme.
44
# https://squidfunk.github.io/mkdocs-material/
5-
# It requires Python to run.
6-
# Install the packages with the following command:
7-
# pip install mkdocs mkdocs-material mkdocs-redirects
5+
# It requires python3 to run.
86

97
set -ex
108

@@ -26,14 +24,17 @@ cd $DIR
2624
# Generate the API docs
2725
./gradlew dokkaHtmlMultiModule
2826

29-
mv ./build/dokka/htmlMultiModule docs/4.x
27+
mv ./build/dokka/htmlMultiModule docs/5.x
3028

3129
# Copy in special files that GitHub wants in the project root.
3230
cat README.md | grep -v 'project website' > docs/index.md
3331
cp CHANGELOG.md docs/changelogs/changelog.md
3432
cp CONTRIBUTING.md docs/contribute/contributing.md
3533

3634
# Build the site and push the new files up to GitHub
35+
python3 -m venv venv
36+
source venv/bin/activate
37+
pip install mkdocs-material mkdocs-redirects
3738
mkdocs gh-deploy
3839

3940
# Restore Javadocs from 1.x, 2.x, and 3.x.

Diff for: mkdocs.yml

+1-10
Original file line numberDiff line numberDiff line change
@@ -102,15 +102,7 @@ nav:
102102
- 'Providers': security/security_providers.md
103103
- 'Configuration History': security/tls_configuration_history.md
104104
- 'Works with OkHttp': works_with_okhttp.md
105-
- 'API':
106-
- 'okhttp': 4.x/okhttp/okhttp3/index.html
107-
- 'brotli': 4.x/okhttp-brotli/okhttp3.brotli/index.html
108-
- 'dnsoverhttps': 4.x/okhttp-dnsoverhttps/okhttp3.dnsoverhttps/index.html
109-
- 'logging-interceptor': 4.x/logging-interceptor/okhttp3.logging/index.html
110-
- 'sse': 4.x/okhttp-sse/okhttp3.sse/index.html
111-
- 'tls': 4.x/okhttp-tls/okhttp3.tls/index.html
112-
- 'urlconnection': 4.x/okhttp-urlconnection/okhttp3/index.html
113-
- 'mockwebserver': 4.x/mockwebserver/okhttp3.mockwebserver/index.html
105+
- 'API': 5.x/okhttp/okhttp3/
114106
- 'Change Logs':
115107
- 'Change Log': changelogs/changelog.md
116108
- '4.x Change Log': changelogs/changelog_4x.md
@@ -123,4 +115,3 @@ nav:
123115
- 'Code of Conduct': contribute/code_of_conduct.md
124116
- 'Concurrency': contribute/concurrency.md
125117
- 'Debug Logging': contribute/debug_logging.md
126-

0 commit comments

Comments
 (0)