From 43a5ab68c27f73ab0ed4ff363c4f4947827b4634 Mon Sep 17 00:00:00 2001 From: Noel Date: Tue, 21 Jun 2022 09:42:24 -0700 Subject: [PATCH] chore: add descriptions to docs --- .../main/kotlin/sh/nino/towa/gradle/Metadata.kt | 5 ----- buildSrc/src/main/kotlin/towa-module.gradle.kts | 1 + core/DokkaDescription.md | 16 ++++++++++++++++ locator-koin/DokkaDescription.md | 4 ++++ slash-commands/DokkaDescription.md | 4 ++++ 5 files changed, 25 insertions(+), 5 deletions(-) create mode 100644 core/DokkaDescription.md create mode 100644 locator-koin/DokkaDescription.md create mode 100644 slash-commands/DokkaDescription.md diff --git a/buildSrc/src/main/kotlin/sh/nino/towa/gradle/Metadata.kt b/buildSrc/src/main/kotlin/sh/nino/towa/gradle/Metadata.kt index 7daf1eb..6ec7cd1 100644 --- a/buildSrc/src/main/kotlin/sh/nino/towa/gradle/Metadata.kt +++ b/buildSrc/src/main/kotlin/sh/nino/towa/gradle/Metadata.kt @@ -36,8 +36,3 @@ val VERSION = Version(1, 0, 0, 0, ReleaseType.None) * artifacts. */ val JAVA_VERSION = JavaVersion.VERSION_17 - -/** - * Returns the commit hash of the Git repository. - */ -// val COMMIT_HASH by lazy {} diff --git a/buildSrc/src/main/kotlin/towa-module.gradle.kts b/buildSrc/src/main/kotlin/towa-module.gradle.kts index 4c9dd5c..7670c42 100644 --- a/buildSrc/src/main/kotlin/towa-module.gradle.kts +++ b/buildSrc/src/main/kotlin/towa-module.gradle.kts @@ -102,6 +102,7 @@ tasks { dokkaHtml { dokkaSourceSets { configureEach { + moduleName.set("towa-${project.name}") platform.set(org.jetbrains.dokka.Platform.jvm) jdkVersion.set(17) includes.from("DokkaDescription.md") diff --git a/core/DokkaDescription.md b/core/DokkaDescription.md new file mode 100644 index 0000000..46bafda --- /dev/null +++ b/core/DokkaDescription.md @@ -0,0 +1,16 @@ +# Module towa-core +**towa-core** is the main core package that is used by the [slash-commands](https://towa.nino.sh/slash-commands/index.html) package. It +is also recommended to bundle **towa-core** as a dependency if you wish to use the Extensions feature. + +```kotlin +suspend fun main(args: Array) { + val towa = Towa { // this: sh.nino.towa.core.TowaBuilder + kord("token") { // this: KordBuilder + enableShutdownHook = false + } + } + + towa.start() + towa.kord.login() +} +``` diff --git a/locator-koin/DokkaDescription.md b/locator-koin/DokkaDescription.md new file mode 100644 index 0000000..4609c8e --- /dev/null +++ b/locator-koin/DokkaDescription.md @@ -0,0 +1,4 @@ +# Module towa-locator-koin +**locator-koin** is the package that uses **Koin** to find any object from your dependency injection tree. This package +only implements [KoinLoader](https://towa.nino.sh/locator-koin/sh.nino.towa.locator.koin/-koin-locator/index.html) which extends +[sh.nino.towa.core.locator.Locator](https://towa.nino.sh/core/sh.nino.towa.core.locator/-locator/index.html). diff --git a/slash-commands/DokkaDescription.md b/slash-commands/DokkaDescription.md new file mode 100644 index 0000000..e3a6b33 --- /dev/null +++ b/slash-commands/DokkaDescription.md @@ -0,0 +1,4 @@ +# Module towa-slash-commands +**slash-commands** is a Towa extension to use the Slash Commands framework. + +You can see an example project [here](https://github.com/NinoDiscord/towa/tree/master/test).