aboutsummaryrefslogtreecommitdiff
path: root/mkdocs/src/doc/docs/developer_guide/plugin-development/introduction.md
diff options
context:
space:
mode:
authorIgnat Beresnev <ignat.beresnev@jetbrains.com>2023-01-10 13:14:43 +0100
committerGitHub <noreply@github.com>2023-01-10 13:14:43 +0100
commit7544a215fb580ae0c47d1f397334f150d1a1ec65 (patch)
treea30aa62c827e3ba88a498a7406ac57fa7334b270 /mkdocs/src/doc/docs/developer_guide/plugin-development/introduction.md
parent2161c397e1b1aadcf3d39c8518258e9bdb2b431a (diff)
downloaddokka-7544a215fb580ae0c47d1f397334f150d1a1ec65.tar.gz
dokka-7544a215fb580ae0c47d1f397334f150d1a1ec65.tar.bz2
dokka-7544a215fb580ae0c47d1f397334f150d1a1ec65.zip
Revise documentation (#2728)
Co-authored-by: Sarah Haggarty <sarahhaggarty@users.noreply.github.com>
Diffstat (limited to 'mkdocs/src/doc/docs/developer_guide/plugin-development/introduction.md')
-rw-r--r--mkdocs/src/doc/docs/developer_guide/plugin-development/introduction.md59
1 files changed, 59 insertions, 0 deletions
diff --git a/mkdocs/src/doc/docs/developer_guide/plugin-development/introduction.md b/mkdocs/src/doc/docs/developer_guide/plugin-development/introduction.md
new file mode 100644
index 00000000..fbfb32ac
--- /dev/null
+++ b/mkdocs/src/doc/docs/developer_guide/plugin-development/introduction.md
@@ -0,0 +1,59 @@
+# Introduction to plugin development
+
+In order to have an easier time developing plugins, it's a good idea to go through
+[Dokka's internals](../architecture/architecture_overview.md) first to learn more about its
+[data model](../architecture/data_model/documentables.md) and
+[extensions](../architecture/extension_points/introduction.md).
+
+## Setup
+
+### Template
+
+The easiest way to start is to use the convenient [Dokka plugin template](https://github.com/Kotlin/dokka-plugin-template).
+It has pre-configured dependencies, publishing and signing of your artifacts.
+
+### Manual
+
+At a bare minimum, Dokka requires `Kotlin Gradle Plugin` and `dokka-core` dependencies:
+
+```kotlin
+plugins {
+ kotlin("jvm") version "<kotlin_version>"
+}
+
+dependencies {
+ compileOnly("org.jetbrains.dokka:dokka-core:<dokka_version>")
+}
+
+tasks.withType<KotlinCompile> {
+ kotlinOptions.jvmTarget = "1.8"
+}
+```
+
+In order to load a plugin into Dokka, your class must extend `DokkaPlugin` class. A fully qualified name of that class
+must be placed in a file named `org.jetbrains.dokka.plugability.DokkaPlugin` under `resources/META-INF/services`.
+All instances are automatically loaded during Dokka setup using `java.util.ServiceLoader`.
+
+## Extension points
+
+Dokka provides a set of entry points for which you can create your own implementations. If you are not sure which
+extension point to use, have a look at [core extensions](../architecture/extension_points/core_extensions.md) and
+[base extensions](../architecture/extension_points/base_extensions.md).
+
+You can learn how to declare extension points and use extensions in
+[Introduction to Extension points](../architecture/extension_points/introduction.md).
+
+In case no suitable extension point exists for your use case, do share the details - it might be added in future
+versions of Dokka.
+
+## Example
+
+You can follow the [sample plugin tutorial](sample-plugin-tutorial.md) which covers creation of a simple plugin: hide members
+annotated with your own `@Internal` annotation, that is exclude these members from generated documentation.
+
+Fore more practical examples, have a look at sources of [community plugins](../../community/plugins-list.md).
+
+## Help
+
+If you have any further questions, feel free to get in touch with maintainers via [Slack](../../community/slack.md) or
+[GitHub](https://github.com/kotlin/dokka).