-
Notifications
You must be signed in to change notification settings - Fork 427
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
Gradle Plugin: Expose finalizeCoroutines
as Gradle task option
#2759
base: master
Are you sure you want to change the base?
Gradle Plugin: Expose finalizeCoroutines
as Gradle task option
#2759
Conversation
…ser matching usage in gradle.kts files)
…Coroutines_in_gradle
…' into feat/expose_finalizeCoroutines_in_gradle # Conflicts: # runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/AbstractDokkaTask.kt
An update on this: if we do start using Gradle workers from #2740, it looks like this configuration option won't be needed at all for the Gradle plugin users, can just set it to Disabling it for coroutines and serialization does make the tests pass, but if you try to run Dokka with gradle workers on any other project - I think it'll also fail until you turn set Let's wait until we get to #2740 though and decide and test it there Note: it might still be relevant for the CLI runner, also needs to be tested. But it looks like it should be set to |
…sl_plugin # Conflicts: # runners/gradle-plugin/src/main/kotlin/org/jetbrains/dokka/gradle/utils.kt # runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaCollectorTaskTest.kt # runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaConfigurationJsonTest.kt # runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaConfigurationSerializableTest.kt # runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaTaskTest.kt # runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/GradleDokkaSourceSetBuilderTest.kt # runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/KotlinDslDokkaTaskConfigurationTest.kt
…Coroutines_in_gradle # Conflicts: # runners/gradle-plugin/src/test/kotlin/org/jetbrains/dokka/gradle/DokkaCollectorTaskTest.kt
finalizeCoroutines
option to be configurable from Gradle tasksThis PR was triggered by an issue in #2740 (comment). Kotlinx Serialization and Kotlinx Coroutines requires
finalizeCoroutines
to be disabled, else Dokka generation failsExample error: https://github.com/Kotlin/dokka/actions/runs/3567615789/jobs/5995523064#step:4:4032
Currently the Kotlinx Serialization and Kotlin Coroutines integration tests are flakey because of this error.
But with this PR, the option can be configured:
I've fixed the flakey tests by setting
finalizeCoroutines
tofalse
with a Gradle init script.Since I would like to see more idiomatic Gradle config #2700, the new code in this PR follows the Gradle API more closely than pre-existing code (for example, using
abstract val
for properties, and setting the default value usingconvention()
, sogetSafe()
is not necessary).This PR includes