Kotlin / dokka

API documentation engine for Kotlin
https://kotl.in/dokka
Apache License 2.0
3.44k stars 410 forks source link

Reoccurrence of #2260 in 2.0.0-Beta #3903

Closed ShreckYe closed 3 days ago

ShreckYe commented 3 days ago

Describe the bug The same as #2260.

Expected behaviour The same as #2260.

Screenshots

Execution failed for task ':dokkaGenerateModuleHtml'.
> Could not resolve all files for configuration ':dokkaHtmlPluginIntransitiveResolver~internal'.
   > Cannot resolve external dependency org.jetbrains.dokka:templating-plugin:2.0.0-Beta because no repositories are defined.
     Required by:
         root project :
   > Cannot resolve external dependency org.jetbrains.dokka:dokka-base:2.0.0-Beta because no repositories are defined.
     Required by:
         root project :

To Reproduce Clone and check out https://github.com/huanshankeji/gradle-common/commit/d0c81059c453e854043475d9e7f077826ad84c8a and run the dokkaGenerate Gradle task.

Dokka configuration See the changes in https://github.com/huanshankeji/gradle-common/commit/d0c81059c453e854043475d9e7f077826ad84c8a.

Installation

Additional context The same as #2260. The solution there works too.

adam-enko commented 3 days ago

Hi, thanks for the report and reproducer.

To me this looks like expected behaviour. Dokka needs to download the runtime dependencies from Maven Central, and so the buildscripts must add the Maven Central repo.

The Dokka Gradle plugin V2 example declares the repository using dependencyResolutionManagement {} in settings.gradle.kts.

https://github.com/Kotlin/dokka/blob/8dba7bbcb7ca3c8ad033ca6531bd1b581a784fde/examples/gradle-v2/versioning-multimodule-example/settings.gradle.kts#L14-L19

ShreckYe commented 3 days ago

Thank you for your kind explanation.