Skip to content

Commit

Permalink
⚙️ Correctly disable configuration cache for Dokka tasks
Browse files Browse the repository at this point in the history
This will be supported in version 1.8.0.

See: Kotlin/dokka#1217
  • Loading branch information
SimonMarquis committed Feb 3, 2023
1 parent 37d9106 commit 464e5e0
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 7 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ name: Build

on: push

env:
# https://github.com/Kotlin/dokka/issues/1217
ORG_GRADLE_PROJECT_org.gradle.unsafe.configuration-cache: false

jobs:
build_test_report:
name: Build → Test → Report
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/dokka.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ on:
branches: ["main"]
workflow_dispatch:

env:
# https://github.com/Kotlin/dokka/issues/1217
ORG_GRADLE_PROJECT_org.gradle.unsafe.configuration-cache: false

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ on:
release:
types: [created]

env:
# https://github.com/Kotlin/dokka/issues/1217
ORG_GRADLE_PROJECT_org.gradle.unsafe.configuration-cache: false

jobs:
publish:
runs-on: ubuntu-latest
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/publish_to_repositories.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ on:
default: false
type: boolean

env:
# https://github.com/Kotlin/dokka/issues/1217
ORG_GRADLE_PROJECT_org.gradle.unsafe.configuration-cache: false

jobs:
publish:
runs-on: ubuntu-latest
Expand Down
17 changes: 10 additions & 7 deletions processor/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -46,18 +46,21 @@ tasks.test {
useJUnitPlatform()
}

java {
withSourcesJar()
withJavadocJar()
}
val sourcesJar by tasks.registering(Jar::class)

val dokkaHtml by tasks.getting(DokkaTask::class) {
moduleName.set("SealedObjectInstances")
outputDirectory.set(rootProject.layout.buildDirectory.dir("dokka").get().asFile)
}

val javadocJar = tasks.named<Jar>("javadocJar") {
from(tasks.named("dokkaJavadoc"))
val javadocJar by tasks.registering(Jar::class) {
dependsOn(dokkaHtml)
from(dokkaHtml.outputDirectory)
}

java {
withSourcesJar()
withJavadocJar()
}

publishing {
Expand Down Expand Up @@ -128,6 +131,6 @@ signing {
tasks.withType<Sign>().configureEach {
notCompatibleWithConfigurationCache("https://github.com/gradle/gradle/issues/13470")
}
tasks.dokkaHtml {
tasks.withType<DokkaTask> {
notCompatibleWithConfigurationCache("https://github.com/Kotlin/dokka/issues/1217")
}

0 comments on commit 464e5e0

Please sign in to comment.