From 414475f9f87a9bc49b0a27f8cc4c690d6910a13e Mon Sep 17 00:00:00 2001 From: Ignat Beresnev Date: Fri, 25 Mar 2022 19:07:53 +0300 Subject: Minor refactoring of dokka versioning and publishing (#2401) * Minor refactoring of dokka versioning and publishing * Added RC version type * Added gradle-plugin-portal as a publication channel * Removed `dokka_version_base` in favour of `dokka_version` * Change dokka_version to the relevant SNAPSHOT * Revert explicit flag for version checking, it will be executed automatically if publication channels are present * Update publish to GH pages script to include SNAPSHOT docs --- CONTRIBUTING.md | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) (limited to 'CONTRIBUTING.md') diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e9a7c819..34073a28 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,4 +1,4 @@ -## Building dokka +## Building Dokka Dokka is built with Gradle. To build it, use `./gradlew build`. Alternatively, open the project directory in IntelliJ IDEA and use the IDE to build and run dokka. @@ -24,9 +24,18 @@ Here's how to import and configure Dokka in IntelliJ IDEA: message: "Error Loading Project: Cannot load 3 modules". Open up the details of the error, and click "Remove Selected", as these module `.iml` files are safe to remove. - -In order to publish dokka locally use: `./gradlew publishToMavenLocal` and add `mavenLocal()` to repositories in the project you want to generate documentation for. -This will allow you to run the latest version in your project from local maven repository. -Keep in mind that those builds are postfixed with `-SNAPSHOT`, eg. `1.4.0-SNAPSHOT`, so remember to update plugin version. -Dokka version generated with this build is taken from `gradle.properties` file under `dokka_version_base` and is visible in logs while running `publishToMavenLocal` task. +## Using/testing locally built Dokka + +If you want to use/test your locally built Dokka in a project, do the following: +1. Change `dokka_version` in `gradle.properties` to something that you will use later on as the dependency version. + For instance, you can set it to something like `1.6.10-my-fix-SNAPSHOT`. +2. Publish it to maven local (`./gradlew publishToMavenLocal`) +3. In the project you want to generate documentation for, add maven local as a plugin/dependency + repository (`mavenLocal()`) +4. Update your dokka dependency to the version you've just published: +```kotlin +plugins { + id("org.jetbrains.dokka") version "1.6.10-my-fix-SNAPSHOT" +} +``` -- cgit