Skip to content

Commit

Permalink
Add Dokka and KDoc publishing workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
BenWoodworth committed Nov 5, 2023
1 parent c10cee0 commit 8049b9c
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 1 deletion.
19 changes: 18 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Publish
on:
push:
tags: [ 'v*' ]
branches: [ 'main' ]
branches: [ 'main', 'publishing' ]

env:
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME }}
Expand Down Expand Up @@ -31,3 +31,20 @@ jobs:

- name: Publish to Maven
run: ./gradlew ciPublish

docs:
needs: publish

permissions:
pages: write
id-token: write

environment:
name: Publish KDoc
url: ${{ steps.deployment.outputs.page_url }}

runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
6 changes: 6 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import org.gradle.kotlin.dsl.support.uppercaseFirstChar
import org.jetbrains.dokka.gradle.DokkaTask
import org.jetbrains.kotlin.gradle.plugin.KotlinTargetWithTests

plugins {
kotlin("multiplatform") version "1.9.20"
id("org.jetbrains.dokka") version "1.9.10"
id("org.jetbrains.kotlinx.binary-compatibility-validator") version "0.13.2"
id("parameterize.library-conventions")
}
Expand All @@ -11,6 +13,10 @@ repositories {
mavenCentral()
}

tasks.withType<DokkaTask> {
throw Throwable(suppressObviousFunctions.get().toString())
}

kotlin {
explicitApi()

Expand Down
3 changes: 3 additions & 0 deletions src/commonMain/kotlin/ParameterDelegate.kt
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@ import kotlin.reflect.KProperty
* through the current iterator.
*/

/**
* @suppress bleh
*/
public class ParameterDelegate<@Suppress("unused") out T> internal constructor() {
/*
* The internal state does not use the generic type, so T is purely for
Expand Down
6 changes: 6 additions & 0 deletions src/commonMain/kotlin/Parameterize.kt
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,9 @@ internal class ParameterizeException(override val message: String) : Exception(m
public class ParameterizeScope internal constructor(
private val state: ParameterizeState,
) {
/**
* @suppress
*/
override fun toString(): String =
state.getFailureArguments().joinToString(
prefix = "ParameterizeScope(",
Expand Down Expand Up @@ -170,6 +173,9 @@ public class ParameterizeScope internal constructor(
state.getParameterArgument(this, property as KProperty<T>)


/**
* @suppress
*/
@JvmInline
public value class Parameter<out T> internal constructor(
internal val arguments: Iterable<T>
Expand Down

0 comments on commit 8049b9c

Please sign in to comment.