Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Work around publish Dokka problem #38

Merged
merged 1 commit into from
Jun 12, 2024
Merged

Work around publish Dokka problem #38

merged 1 commit into from
Jun 12, 2024

Conversation

dagguh
Copy link
Member

@dagguh dagguh commented Jun 12, 2024

It was discovered using the gradle-release devloop: atlassian-labs/gradle-release@806c334

Here, in Docker infra, it was locally confirmed by publishToMavenLocal --stacktrace.

Before:

* What went wrong:
org/jetbrains/kotlin/gradle/dsl/KotlinSingleTargetExtension
> org.jetbrains.kotlin.gradle.dsl.KotlinSingleTargetExtension

* Try:
> Run with --info or --debug option to get more log output.

* Exception is:
java.lang.NoClassDefFoundError: org/jetbrains/kotlin/gradle/dsl/KotlinSingleTargetExtension
        at org.jetbrains.dokka.gradle.kotlin.KotlinCompilationUtilsKt.allCompilationsOf(kotlinCompilationUtils.kt:25)
        at org.jetbrains.dokka.gradle.kotlin.IsMainSourceSetKt.isMainSourceSet(isMainSourceSet.kt:10)
        at org.jetbrains.dokka.gradle.kotlin.KotlinSourceSetGistKt$gistOf$2.call(KotlinSourceSetGist.kt:21)
        at org.jetbrains.dokka.gradle.kotlin.KotlinSourceSetGistKt$gistOf$2.call(KotlinSourceSetGist.kt)
        at org.gradle.api.internal.provider.DefaultProvider.calculateOwnValue(DefaultProvider.java:72)

BUILD FAILED in 11s

After:

BUILD SUCCESSFUL in 4s
10 actionable tasks: 4 executed, 6 up-to-date

It was discovered using the gradle-release devloop:
atlassian-labs/gradle-release@806c334

Here, in Docker infra, it was locally confirmed by `publishToMavenLocal --stacktrace`.

Before:
```
* What went wrong:
org/jetbrains/kotlin/gradle/dsl/KotlinSingleTargetExtension
> org.jetbrains.kotlin.gradle.dsl.KotlinSingleTargetExtension

* Try:
> Run with --info or --debug option to get more log output.

* Exception is:
java.lang.NoClassDefFoundError: org/jetbrains/kotlin/gradle/dsl/KotlinSingleTargetExtension
        at org.jetbrains.dokka.gradle.kotlin.KotlinCompilationUtilsKt.allCompilationsOf(kotlinCompilationUtils.kt:25)
        at org.jetbrains.dokka.gradle.kotlin.IsMainSourceSetKt.isMainSourceSet(isMainSourceSet.kt:10)
        at org.jetbrains.dokka.gradle.kotlin.KotlinSourceSetGistKt$gistOf$2.call(KotlinSourceSetGist.kt:21)
        at org.jetbrains.dokka.gradle.kotlin.KotlinSourceSetGistKt$gistOf$2.call(KotlinSourceSetGist.kt)
        at org.gradle.api.internal.provider.DefaultProvider.calculateOwnValue(DefaultProvider.java:72)

BUILD FAILED in 11s
```

After:
```
BUILD SUCCESSFUL in 4s
10 actionable tasks: 4 executed, 6 up-to-date
```
@dagguh dagguh requested a review from a team as a code owner June 12, 2024 16:37
@dagguh dagguh enabled auto-merge (rebase) June 12, 2024 16:53
@@ -4,9 +4,10 @@ val testContainersVersion = "1.17.5"
val log4jVersion = "2.17.2"

plugins {
// gradle-release has to go first, see https://github.com/atlassian-labs/gradle-release/pull/5/commits/0e89b0646d3393e5cf2827240d64bc9bdc2060c1
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: Maybe it's just me, but I find the message of linked commit not completely clear. I don't think that matters too much though.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True, the second paragraph is the most relevant part, the first one is only partially talking about what will happen if we don't have the workaround. I should have split that commit into two.

@dagguh dagguh merged commit 72f4df4 into master Jun 12, 2024
7 checks passed
@dagguh dagguh deleted the fix-publishing branch June 12, 2024 22:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants