Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Docs

on:
push:
branches: [ master ]
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: pages
cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21

- uses: gradle/actions/setup-gradle@v4

- name: Generate API docs
run: ./gradlew :dokkaGenerate

- uses: actions/upload-pages-artifact@v3
with:
path: build/dokka

deploy:
needs: build
runs-on: ubuntu-latest

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

steps:
- id: deployment
uses: actions/deploy-pages@v4
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

A Gradle plugin that generates type-safe Kotlin [Ktor](https://ktor.io/) client code from OpenAPI 3.0 specifications.

API documentation: https://avsystem.github.io/justworks/

## Installation

Add the plugin to your `build.gradle.kts`:
Expand Down
15 changes: 15 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ plugins {
id("org.jlleitschuh.gradle.ktlint") version "14.2.0" apply false
id("org.jetbrains.kotlinx.kover") version "0.9.9" apply false
id("com.vanniktech.maven.publish") version "0.37.0" apply false
id("org.jetbrains.dokka") version "2.2.0"
}

allprojects {
Expand Down Expand Up @@ -63,3 +64,17 @@ subprojects {
}
}
}

dependencies {
dokka(project(":core"))
dokka(project(":plugin"))
}

dokka {
moduleName.set("justworks")

dokkaPublications.html {
outputDirectory.set(layout.buildDirectory.dir("dokka"))
includes.from("README.md")
}
}
13 changes: 13 additions & 0 deletions core/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,25 @@ plugins {
kotlin("jvm")
id("org.jetbrains.kotlinx.kover")
id("com.vanniktech.maven.publish")
id("org.jetbrains.dokka") version "2.2.0"
}

kotlin {
jvmToolchain(21)
}

dokka {
moduleName.set("justworks-core")

dokkaSourceSets.main {
sourceLink {
localDirectory.set(file("src/main/kotlin"))
remoteUrl("https://github.com/AVSystem/justworks/tree/master/core/src/main/kotlin")
remoteLineSuffix.set("#L")
}
}
}

// todo: remove when https://github.com/JLLeitschuh/ktlint-gradle/issues/912 resolved
ktlint {
version = "1.8.0"
Expand Down
13 changes: 13 additions & 0 deletions plugin/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,25 @@ plugins {
`java-gradle-plugin`
id("com.vanniktech.maven.publish")
id("org.jetbrains.kotlinx.kover")
id("org.jetbrains.dokka") version "2.2.0"
}

kotlin {
jvmToolchain(21)
}

dokka {
moduleName.set("justworks-plugin")

dokkaSourceSets.main {
sourceLink {
localDirectory.set(file("src/main/kotlin"))
remoteUrl("https://github.com/AVSystem/justworks/tree/master/plugin/src/main/kotlin")
remoteLineSuffix.set("#L")
}
}
}

dependencies {
implementation(project(":core"))
testImplementation(kotlin("test"))
Expand Down
Loading