diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index ab172f1..6ee878e 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -52,4 +52,4 @@ jobs: distribution: 'adopt' - name: Validate Gradle wrapper uses: gradle/wrapper-validation-action@v1 - - run: ./gradlew ${{ matrix.publish_command }} -Pplatform=${{ matrix.platform }} -PisCI -no-daemon --no-parallel --stacktrace + - run: ./gradlew ${{ matrix.publish_command }} -Pplatform=${{ matrix.platform }} -PisCI -no-daemon --stacktrace diff --git a/build.gradle.kts b/build.gradle.kts index 9794ef0..b53958c 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -32,6 +32,13 @@ subprojects { plugin("signing") } + val dokkaHtml by tasks.getting(org.jetbrains.dokka.gradle.DokkaTask::class) + val javadocJar: TaskProvider by tasks.registering(Jar::class) { + dependsOn(dokkaHtml) + archiveClassifier.set("javadoc") + from(dokkaHtml.outputDirectory) + } + publishing { val user = System.getenv("SONATYPE_USERNAME") val pass = System.getenv("SONATYPE_PASSWORD") @@ -59,19 +66,7 @@ subprojects { } publications.withType { - val publication = this - val dokkaJar = project.tasks.register("${publication.name}DokkaJar", Jar::class) { - group = JavaBasePlugin.DOCUMENTATION_GROUP - description = "Assembles Kotlin docs with Dokka into a Javadoc jar" - archiveClassifier.set("javadoc") - from(project.tasks.named("dokkaHtml")) - - // Each archive name should be distinct, to avoid implicit dependency issues. - // We use the same format as the sources Jar tasks. - // https://youtrack.jetbrains.com/issue/KT-46466 - archiveBaseName.set("${archiveBaseName.get()}-${publication.name}") - } - artifact(dokkaJar) + artifact(javadocJar) pom { name.set("pprint-kotlin") @@ -146,4 +141,9 @@ subprojects { mustRunAfter(it) } } + + tasks.withType().configureEach { + val signingTasks = tasks.withType() + mustRunAfter(signingTasks) + } } \ No newline at end of file