Commit 0b9da3d 1 parent 3921da9 commit 0b9da3d Copy full SHA for 0b9da3d
File tree 3 files changed +27
-84
lines changed
3 files changed +27
-84
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ FROM gradle:8.13-jdk21 as build-docs
2
+
3
+ WORKDIR /build/docs
4
+
5
+ COPY . ./
6
+
7
+ RUN ./gradlew dokkaHtml
8
+
9
+ FROM node:lts-alpine AS serve-docs
10
+
11
+ WORKDIR /build/docs
12
+
13
+ RUN npm install -g http-server
14
+ RUN http-server
Original file line number Diff line number Diff line change @@ -5,6 +5,10 @@ import org.jetbrains.kotlin.gradle.dsl.JvmTarget
5
5
import java.net.HttpURLConnection
6
6
import java.net.URL
7
7
import java.io.ByteArrayOutputStream
8
+ import kotlin.io.path.Path
9
+ import kotlin.io.path.exists
10
+ import kotlin.io.path.readBytes
11
+ import kotlin.io.path.readText
8
12
9
13
buildscript {
10
14
dependencies {
@@ -164,12 +168,17 @@ tasks {
164
168
}
165
169
166
170
doFirst {
167
- val archiveBase = " https://www.chattriggers.com/javadocs-archive/"
168
- val versions = String (downloadFile(archiveBase + " versions" )).lines().map(String ::trim)
171
+ val javadocsArchive = projectDir.resolve(" javadocs-archive" )
172
+ if (! javadocsArchive.exists())
173
+ return @doFirst
174
+
169
175
val tmpFile = File (temporaryDir, " oldVersionsZip.zip" )
170
176
171
- versions.filter(String ::isNotEmpty).map(String ::trim).forEach { version ->
172
- val zipBytes = downloadFile(" $archiveBase$version .zip" )
177
+ javadocsArchive.listFiles()?.forEach {
178
+ if (it.extension != " zip" )
179
+ return @forEach
180
+
181
+ val zipBytes = it.readBytes()
173
182
tmpFile.writeBytes(zipBytes)
174
183
unzipTo(docVersionsDir, tmpFile)
175
184
}
You can’t perform that action at this time.
0 commit comments