1414 * limitations under the License.
1515 */
1616
17- import org.jetbrains.dokka.gradle.DokkaTask
1817import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
19- import io.javalin.Javalin
20- import io.javalin.http.staticfiles.Location
2118
2219plugins {
2320 id(" firebase-library" )
2421 id(" kotlin-android" )
2522 id(" com.google.protobuf" )
2623 id(" copy-google-services" )
27- alias(libs.plugins.dokka)
2824 alias(libs.plugins.kotlinx.serialization)
2925}
3026
@@ -188,13 +184,6 @@ tasks.withType<KotlinCompile>().all {
188184 }
189185}
190186
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-
198187// Enable Kotlin "Explicit API Mode". This causes the Kotlin compiler to fail if any
199188// classes, methods, or properties have implicit `public` visibility. This check helps
200189// avoid accidentally leaking elements into the public API, requiring that any public
@@ -208,33 +197,3 @@ tasks.withType<KotlinCompile>().all {
208197 }
209198 }
210199}
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