Skip to content

Commit

Permalink
test: move testDokka to /scripts dir
Browse files Browse the repository at this point in the history
  • Loading branch information
berezinant committed Jan 29, 2024
1 parent 562d0bb commit 8da8155
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 8 deletions.
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,14 +70,14 @@ visit [Workflow](https://kotlin.github.io/dokka/1.9.10/developer_guide/workflow/
repository (`mavenLocal()`)
4. Update your Dokka dependency to the version you've just published:

There is an automation script for this routine, see [testDokka.sh.md](./testDokka.sh.md) for details.

```kotlin
plugins {
id("org.jetbrains.dokka") version "1.9.10-my-fix-SNAPSHOT"
}
```

There is an automation script for this routine, see [testDokka.sh.md](scripts/testDokka.sh.md) for details.

### Updating public API dump

[Binary Compatibility Validator](https://github.com/Kotlin/binary-compatibility-validator/blob/master/README.md)
Expand Down
15 changes: 9 additions & 6 deletions testDokka.sh → scripts/testDokka.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
#!/bin/bash
set -e
#
# Copyright 2014-2023 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
# Copyright 2014-2024 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
#
set -e

# New version to be published
NEW_VERSION="1.9.20-my-fix-SNAPSHOT"
# Get the path to the script itself
SCRIPT_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"

# Path to Dokka
DOKKA_REPO_PATH="$SCRIPT_PATH/../"

# Path to test project
TEST_PROJECT_PATH="./examples/gradle/dokka-gradle-example"

# Path to Dokka
DOKKA_REPO_PATH="./"
# New version to be published
NEW_VERSION="1.9.20-my-fix-SNAPSHOT"

# Port to view results
PORT=8001
Expand Down
8 changes: 8 additions & 0 deletions testDokka.sh.md → scripts/testDokka.sh.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
## Purpose
This is a helper script for Dokka development and testing.
If it does not work for you, you can always do the same steps manually
as described in [CONTRIBUTING.md](../CONTRIBUTING.md#usetest-locally-built-dokka).

`.testDokka.sh` makes Dokka development and testing a bit faster

It compiles current Dokka version from the source code, \
Expand All @@ -8,6 +12,8 @@ and finally runs a webserver to open the generated documentation in the browser.

## Usage

`cd scripts` and then

### Without parameters
By default it applied to the `./examples/gradle/dokka-gradle-example` project

Expand Down Expand Up @@ -51,6 +57,8 @@ To run the server you need to have Python 3 installed.

## Troubleshooting

* Make sure thar the path to the test project specified relative to the root of the Dokka project

* If occurs `Could not resolve all files for configuration ':dokkaHtmlPlugin'` error,
* then make sure that `mavenLocal()` is added to the `repositories` section of the `build.gradle` file of the project you are testing against.
It is not automated and should be done manually.
Expand Down

0 comments on commit 8da8155

Please sign in to comment.