Skip to content

Conversation

@jonapoul
Copy link
Contributor

@jonapoul jonapoul commented May 25, 2025

As mentioned in #28, there hasn't yet been a gradle plugin to add to this project. Main use case for me is to help automate the generation logic.

Here's my initial stab at it - it's maybe not 100% fully featured but I thought I'd put it out there and see what people think. There are a few test cases to show basic usage too.

One thing to be aware of: it depends on the various components modules. So if/when you publish the gradle plugin, you'll either need to:

  • also publish the components modules, or
  • figure out some kind of fat-JAR logic to bundle them all together when publishing.

The second one will be a fair bit more complicated than the one you've already done in the CLI app, but it might be possible. Publishing them all is probably best though.

gemini-code-assist[bot]

This comment was marked as outdated.

gemini-code-assist[bot]

This comment was marked as outdated.

@jonapoul jonapoul changed the title Add gradle plugin Add Gradle Plugin May 25, 2025
@jonapoul jonapoul marked this pull request as ready for review May 25, 2025 19:53
@gemini-code-assist

This comment was marked as off-topic.

@gemini-code-assist

This comment was marked as off-topic.

1 similar comment
@gemini-code-assist
Copy link

Warning

There is an error in the Gemini Code Assist config file for this repository at .gemini/config.yaml and the configuration cannot be used until the file is fixed.

@gemini-code-assist

This comment was marked as off-topic.

@ComposeGears ComposeGears deleted a comment from gemini-code-assist bot May 26, 2025
@Goooler
Copy link
Member

Goooler commented May 26, 2025

I'll review the rest carefully later.

@Goooler Goooler force-pushed the gradle-plugin branch 2 times, most recently from 60897af to 6a074c8 Compare May 27, 2025 09:08
@egorikftp
Copy link
Member

@jonapoul hello, thank you for contribution ❤️
Will you able to complete PR?

@jonapoul
Copy link
Contributor Author

@egorikftp I'll be honest - it completely slipped my mind! Will take another look over the next few days

@jonapoul
Copy link
Contributor Author

Reworked a big chunk of the PR (finally!) - should be good for re-review now

@egorikftp
Copy link
Member

@Goooler could you please take a look? 🙂

@jonapoul
Copy link
Contributor Author

@egorikftp I can't reply to the comment directly but the compose dependency is only there to verify that the project compiles once the codegen has been run. It's not being auto-added to any project outside of unit tests

coderabbitai[bot]

This comment was marked as outdated.

coderabbitai[bot]

This comment was marked as outdated.

coderabbitai[bot]

This comment was marked as outdated.

@egorikftp
Copy link
Member

@Goooler is it finalized from your side? 🙂

@Goooler Goooler requested a review from Copilot October 29, 2025 03:49
coderabbitai[bot]

This comment was marked as outdated.

Copy link

Copilot AI left a 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 adds a new Gradle plugin for Valkyrie that enables automatic generation of Kotlin ImageVector accessors from SVG and Android drawable XML files during the build process. The plugin integrates with Kotlin JVM, Android, and Kotlin Multiplatform projects, providing build-time code generation capabilities.

Key changes:

  • New Gradle plugin with task registration and source set integration
  • Comprehensive test suite covering various project configurations (JVM, Android, KMP)
  • Integration with Kotlin compilation tasks and IDE sync

Reviewed Changes

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

Show a summary per file
File Description
tools/gradle-plugin/src/main/kotlin/io/github/composegears/valkyrie/gradle/ValkyrieGradlePlugin.kt Main plugin implementation with task registration and lifecycle hooks
tools/gradle-plugin/src/main/kotlin/io/github/composegears/valkyrie/gradle/ValkyrieExtension.kt Configuration DSL interface for plugin users
tools/gradle-plugin/src/main/kotlin/io/github/composegears/valkyrie/gradle/GenerateImageVectorsTask.kt Gradle task implementation for generating ImageVector code
tools/gradle-plugin/src/main/kotlin/io/github/composegears/valkyrie/gradle/Utils.kt Utility functions for package resolution and source set discovery
tools/gradle-plugin/src/test/kotlin/io/github/composegears/valkyrie/gradle/ValkyrieGradlePluginTest.kt Comprehensive test suite covering plugin functionality
tools/gradle-plugin/src/test/kotlin/io/github/composegears/valkyrie/gradle/Utils.kt Test utilities for Gradle test kit
tools/gradle-plugin/build.gradle.kts Build configuration for the gradle plugin module
gradle/libs.versions.toml Added AGP and compose-ui dependency declarations
sdk/core/extensions/src/jvmMain/kotlin/io/github/composegears/valkyrie/sdk/core/extensions/PathUtils.kt Modified writeToKt to return Path for gradle task usage
settings.gradle.kts Included gradle-plugin module in build
components/test/coverage/build.gradle.kts Added gradle-plugin to coverage reports
README.md Updated to reflect Gradle plugin availability

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@Goooler Goooler merged commit 4a41138 into ComposeGears:main Oct 29, 2025
9 checks passed
@jonapoul jonapoul deleted the gradle-plugin branch October 29, 2025 06:03
@egorikftp
Copy link
Member

@jonapoul thanks so much for your contribution on the project! ❤️

@jonapoul
Copy link
Contributor Author

We got there in the end!

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Consider extending to support Gradle plugin

3 participants