Skip to content

Fix/plugin file generation#214

Merged
twisti-dev merged 2 commits into
version/1.21.11from
fix/plugin-file-generation
Feb 8, 2026
Merged

Fix/plugin file generation#214
twisti-dev merged 2 commits into
version/1.21.11from
fix/plugin-file-generation

Conversation

@twisti-dev

Copy link
Copy Markdown
Contributor

This pull request updates the versioning scheme of the Gradle plugin and corrects the output annotation for the plugin file generation task. The main changes include incrementing the plugin's patch version and ensuring that the plugin file task is properly marked as producing a single output file rather than a directory.

Versioning update:

  • Bumped the plugin version suffix from -1.12.1 to -1.12.2 in build.gradle.kts to reflect a new patch release.

Gradle task annotation fix:

  • Changed the annotation for the outputFile property in GeneratePluginFile from @OutputDirectory to @OutputFile, correctly indicating that the task produces a single file output instead of a directory. [1] [2]

@twisti-dev twisti-dev self-assigned this Feb 8, 2026
Copilot AI review requested due to automatic review settings February 8, 2026 13:14
@twisti-dev twisti-dev merged commit 12d3e9c into version/1.21.11 Feb 8, 2026
5 of 6 checks passed
@twisti-dev twisti-dev deleted the fix/plugin-file-generation branch February 8, 2026 13:14

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 updates the surf-api-gradle-plugin to a new patch version and corrects the Gradle task output annotation for plugin-file generation so Gradle tracks the task output as a single file (not a directory).

Changes:

  • Bump Gradle plugin version suffix from -1.12.1 to -1.12.2.
  • Fix GeneratePluginFile.outputFile annotation from @OutputDirectory to @OutputFile.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
surf-api-gradle-plugin/src/main/kotlin/dev/slne/surf/surfapi/gradle/generators/GeneratePluginFile.kt Corrects task output annotation to a file output for proper Gradle up-to-date/cache behavior.
surf-api-gradle-plugin/build.gradle.kts Bumps the plugin patch version suffix for release/versioning alignment.
Comments suppressed due to low confidence (1)

surf-api-gradle-plugin/src/main/kotlin/dev/slne/surf/surfapi/gradle/generators/GeneratePluginFile.kt:25

  • With @OutputFile, the task is declared to produce a file output, but generate() deletes that file when pluginFileJson is blank (see the else branch). In that scenario Gradle will consider the declared output missing and the task will be out-of-date on every build (and remote/local build cache reuse may be impacted). Consider either (a) not registering/adding this task as a resources source when generation is skipped, or (b) making the output explicitly optional / using onlyIf { pluginFileJson.get().isNotBlank() } plus a separate cleanup step to avoid packaging stale files.
    @get:OutputFile
    abstract val outputFile: RegularFileProperty

    @TaskAction
    fun generate() {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants