14
14
* limitations under the License.
15
15
*/
16
16
17
- import org.jetbrains.dokka.gradle.DokkaTask
18
17
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
19
- import io.javalin.Javalin
20
- import io.javalin.http.staticfiles.Location
21
18
22
19
plugins {
23
20
id(" firebase-library" )
24
21
id(" kotlin-android" )
25
22
id(" com.google.protobuf" )
26
23
id(" copy-google-services" )
27
- alias(libs.plugins.dokka)
28
24
alias(libs.plugins.kotlinx.serialization)
29
25
}
30
26
@@ -188,13 +184,6 @@ tasks.withType<KotlinCompile>().all {
188
184
}
189
185
}
190
186
191
- tasks.withType<DokkaTask >().configureEach {
192
- moduleName.set(" firebase-dataconnect" )
193
- val cacheRootDirectory = layout.buildDirectory.dir(" dokka/cache" )
194
- cacheRootDirectory.get().asFile.mkdirs()
195
- cacheRoot.set(cacheRootDirectory)
196
- }
197
-
198
187
// Enable Kotlin "Explicit API Mode". This causes the Kotlin compiler to fail if any
199
188
// classes, methods, or properties have implicit `public` visibility. This check helps
200
189
// avoid accidentally leaking elements into the public API, requiring that any public
@@ -208,33 +197,3 @@ tasks.withType<KotlinCompile>().all {
208
197
}
209
198
}
210
199
}
211
-
212
- // Runs dokkaHtml and starts a web server to serve it locally.
213
- tasks.register(" dokkaHtmlServe" ) {
214
- group = " documentation"
215
- description = " Run a web server to serve the HTML output of the dokkaHtml task"
216
- mustRunAfter(" dokkaHtml" )
217
-
218
- doLast {
219
- val port = 8000
220
- val directory = layout.buildDirectory.dir(" dokka/html" ).get().asFile.absolutePath
221
-
222
- val javelin = Javalin .create { javalinConfig ->
223
- javalinConfig.staticFiles.add { staticFileConfig ->
224
- staticFileConfig.directory = directory
225
- staticFileConfig.location = Location .EXTERNAL
226
- staticFileConfig.hostedPath = " /"
227
- }
228
- }
229
-
230
- javelin.start(port)
231
- try {
232
- println (" Starting HTTP server at http://localhost:$port which serves the contents of directory: $directory " )
233
- println (" Press ENTER to stop the server" )
234
- readlnOrNull()
235
- println (" Stopping HTTP server at http://localhost:$port " )
236
- } finally {
237
- javelin.stop()
238
- }
239
- }
240
- }
0 commit comments