-
Notifications
You must be signed in to change notification settings - Fork 0
Migrate to Reaction API
#47
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR migrates the project to use the new Dokka 2.1.0 API with the Reaction system for generating documentation. The changes consolidate documentation generation setup and update dependency versions.
- Migrates from Dokka 2.0.0 to 2.1.0 with updated plugin configuration
- Consolidates Dokka setup into a single
dokka-setupplugin - Updates various dependency versions (Protobuf, Gradle, Validation, etc.)
Reviewed changes
Copilot reviewed 43 out of 45 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| version.gradle.kts | Updates compiler version from 030 to 031 |
| pom.xml | Updates Protobuf, Validation, and Dokka dependency versions |
| params/src/main/kotlin/.../CommandLineInterface.kt | Updates documentation reference to new format API |
| jvm/src/main/kotlin/.../ModifiedTypeAnnotation.kt | Updates documentation references from Modified.date to Modified.timestamp |
| gradlew.bat | Removes unused CLASSPATH environment variable |
| gradlew | Moves Protobuf version check export to top of file |
| gradle/wrapper/gradle-wrapper.properties | Updates Gradle wrapper from 9.1.0 to 9.2.1 |
| gradle-plugin/.../PluginSpec.kt | Adds environment variable for Protobuf version check |
| dependencies.md | Updates dependency versions and generation timestamp |
| config | Updates subproject commit reference |
| buildSrc/.../module.gradle.kts | Consolidates dokka plugins into single setup |
| buildSrc/.../kmp-publish.gradle.kts | Renames dokka jar methods |
| buildSrc/.../jvm-module.gradle.kts | Consolidates dokka configuration |
| buildSrc/.../InceptionYear.kt | Refactors constant to public property |
| buildSrc/.../RepoSlug.kt | Fixes error message and git host URL |
| buildSrc/.../SpinePublishing.kt | Removes ProtoJar and DokkaJar configuration options |
| buildSrc/.../PublishingExts.kt | Updates artifact configuration for new dokka setup |
| buildSrc/.../PublicationHandler.kt | Adds POM metadata (inception year, SCM info) |
| buildSrc/.../JarDsl.kt | Removes DokkaJar and ProtoJar DSL classes |
| buildSrc/.../UpdateGitHubPagesExtension.kt | Removes internal javadoc configuration |
| buildSrc/.../UpdateGitHubPages.kt | Renames tasks and updates documentation format handling |
| buildSrc/.../Update.kt | Refactors documentation update to use format-based approach |
| buildSrc/.../TaskName.kt | Updates task names for new documentation structure |
| buildSrc/.../SshKey.kt | Updates SSH configuration for GitHub publishing |
| buildSrc/.../RepositoryExtensions.kt | Updates documentation clone method |
| buildSrc/.../Repository.kt | Adds logging and pull operations to git commands |
| buildSrc/.../LazyTempPath.kt | Removes nullable type parameters |
| buildSrc/.../TaskContainerExtensions.kt | Removes deprecated file |
| buildSrc/.../DokkaExtensions.kt | Removes deprecated file |
| buildSrc/.../Runtime.kt | Updates documentation and visibility |
| buildSrc/.../Validation.kt | Updates version to 354 |
| buildSrc/.../CoreJvm.kt | Fixes repository URL in documentation |
| buildSrc/.../Compiler.kt | Updates fallback versions |
| buildSrc/.../Base.kt | Updates repository URL and version |
| buildSrc/.../Protobuf.kt | Updates version to 4.33.1 |
| buildSrc/.../Dokka.kt | Updates version to 2.1.0 |
| dokka-for-kotlin.gradle.kts | Removes deprecated plugin file |
| dokka-for-java.gradle.kts | Updates for new Dokka API |
| DokkaExts.kt | Refactors for new Dokka 2.1.0 API |
| DocumentationSettings.kt | Adds repository URL generation methods |
| BuildExtensions.kt | Updates task dependencies and adds duplication handling |
| buildSrc/build.gradle.kts | Updates Dokka version and adds Kotest dependencies |
| build.gradle.kts | Updates dokka plugin reference |
| api/.../Policy.kt | Simplifies documentation comment |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| * Dependencies on `core-java` modules. | ||
| * | ||
| * See [`SpineEventEngine/core-java`](https://github.com/SpineEventEngine/core-jvm/). | ||
| * See [`SpineEventEngine/core-java`](https://github.com/SpineEventEngine/core-java/). |
Copilot
AI
Nov 28, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The repository name is inconsistent. The link text says 'core-java' but according to line 32 comment, this module is about 'core-jvm'. Either the link text or the URL should be corrected to match the actual repository.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 57 out of 59 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (3)
test-env/src/main/kotlin/io/spine/tools/compiler/test/DocilePlugin.kt:1
- The parameter name
policiesis inconsistent with its typeReaction<*>. Since the API has migrated fromPolicytoReaction, the parameter should be renamed toreactionsto match the type and maintain consistency with the parent class.
test-env/src/main/kotlin/io/spine/tools/compiler/test/DocilePlugin.kt:1 - The constructor parameter
policiesis being passed to thereactionsproperty of the parent class. This creates confusion as the names don't match. Consider renaming the parameter frompoliciestoreactionsto maintain consistency throughout the API migration.
jvm/src/main/kotlin/io/spine/tools/compiler/jvm/annotation/TypeAnnotationPlugin.kt:1 - The parameter name
policiesis inconsistent with its typeReaction<*>. The parameter should be renamed toreactionsto align with the API migration fromPolicytoReaction.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 57 out of 59 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (2)
test-env/src/main/kotlin/io/spine/tools/compiler/test/DocilePlugin.kt:1
- The parameter name
policiesis inconsistent with its typeReaction. It should be renamed toreactionsto match the type and align with the API migration.
test-env/src/main/kotlin/io/spine/tools/compiler/test/DocilePlugin.kt:1 - The parameter
policiesis being passed to thereactionsproperty. This creates confusion due to the naming mismatch. The parameter should be renamed toreactionsfor clarity.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| val dokkaGenerate = "dokkaGenerate" | ||
| dokkaGenerate.run { | ||
| dependOn(generateProto) | ||
| dependOn(kspKotlin) | ||
| } | ||
| val dokkaJavadoc = "dokkaJavadoc" | ||
| dokkaJavadoc.run { | ||
| dependOn(kspKotlin) | ||
| } | ||
| val dokkaGeneratePublicationJavadoc = "dokkaGeneratePublicationJavadoc" | ||
| dokkaGeneratePublicationJavadoc.dependOn(kspKotlin) | ||
| "publishPluginJar".dependOn(createVersionFile) | ||
| compileKotlin.dependOn(kspKotlin) | ||
| compileTestKotlin.dependOn("kspTestKotlin") | ||
| "compileTestFixturesKotlin".dependOn("kspTestFixturesKotlin") | ||
| "javadocJar".dependOn(dokkaHtml) | ||
| "dokkaKotlinJar".dependOn(dokkaJavadoc) | ||
| "javadocJar".dependOn(dokkaGeneratePublicationJavadoc) | ||
| "htmlDocsJar".dependOn(dokkaGenerate) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wire html docs to real Dokka task
The dependency wiring for documentation still targets a task named dokkaGenerate, but the Dokka setup in this commit now exposes dokkaGeneratePublicationHtml/dokkaGeneratePublicationJavadoc instead (see the new dokkaHtmlTask() lookup). Because dokkaGenerate is never created, the dependOn(generateProto/kspKotlin) calls and the htmlDocsJar dependency become no-ops, so running htmlDocsJar/publishing from a clean checkout will no longer trigger Dokka or proto generation and can produce empty or stale documentation artifacts.
Useful? React with 👍 / 👎.
This PR migrates the Compiler to use
ReactionAPI recently introduced in CoreJvm in addition to the "canonical"Pollicy. The PR updates the documentation and renames the properties accordingly.Other notable changes
config.