diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 47ad2e8..752814e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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 diff --git a/.github/workflows/dokka.yml b/.github/workflows/dokka.yml index 613df2c..de4ca2c 100644 --- a/.github/workflows/dokka.yml +++ b/.github/workflows/dokka.yml @@ -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 diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 6c9117a..7c2a657 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -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 diff --git a/.github/workflows/publish_to_repositories.yml b/.github/workflows/publish_to_repositories.yml index 8988339..4f47f39 100644 --- a/.github/workflows/publish_to_repositories.yml +++ b/.github/workflows/publish_to_repositories.yml @@ -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 diff --git a/processor/build.gradle.kts b/processor/build.gradle.kts index 227bfc6..716ab5a 100644 --- a/processor/build.gradle.kts +++ b/processor/build.gradle.kts @@ -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("javadocJar") { - from(tasks.named("dokkaJavadoc")) +val javadocJar by tasks.registering(Jar::class) { + dependsOn(dokkaHtml) + from(dokkaHtml.outputDirectory) +} + +java { + withSourcesJar() + withJavadocJar() } publishing { @@ -128,6 +131,6 @@ signing { tasks.withType().configureEach { notCompatibleWithConfigurationCache("https://github.com/gradle/gradle/issues/13470") } -tasks.dokkaHtml { +tasks.withType { notCompatibleWithConfigurationCache("https://github.com/Kotlin/dokka/issues/1217") }