Conversation
egorikftp
commented
Nov 6, 2025
- ref: Migrate project structure to sdk approach #592
42a2bfc to
41edc2d
Compare
WalkthroughThis PR relocates the IR public API and implementations from the old components.ir modules into a new sdk/ir namespace. It moves core IR types (IrImageVector, IrColor, IrFill, IrPathNode, IrStroke, IrVectorNode, enums) into sdk/ir/core, moves utilities (aspectRatio, dominantShadeColor, ColorClassification) into sdk/ir/util, adds compose/xml interop under sdk/ir/compose and sdk/ir/xml, and updates many modules, imports and Gradle dependencies to use the new sdk modules. Several previous components and their ABI dumps were removed and equivalent sdk ABI dumps were added. Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes
Possibly related PRs
Suggested reviewers
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (2)
sdk/ir/util/api/util.api (1)
6-13: Consider movingDominantShadeout of theinternalpackage.The
DominantShadeenum is part of the public API (returned bygetDominantShadeColor) but is placed in thesdk.ir.util.internalpackage. This creates a confusing API surface where public functions return types from an "internal" package.Consider moving
DominantShadetosdk.ir.utildirectly to better align with its public API usage.sdk/ir/core/api/core.klib.api (1)
77-119: Prefer read-only collection types in the SDK APISince this module is becoming the public SDK surface, returning
MutableList(e.g.,IrFill.LinearGradient.colorStops,IrFill.RadialGradient.colorStops, and similarlyIrVectorNode.IrGroupcollections) empowers callers to mutate internal state after construction. That makes it harder to reason about IR instances and complicates sharing across threads/targets. Please consider switching these properties and their constructor parameters toList(or exposing read-only views) while keeping any builder-style helpers internal to maintain immutability at the API level.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (107)
components/generator/jvm/imagevector/api/imagevector.api(1 hunks)components/generator/jvm/imagevector/build.gradle.kts(1 hunks)components/generator/jvm/imagevector/src/main/kotlin/io/github/composegears/valkyrie/generator/jvm/imagevector/ImageVectorFileSpec.kt(1 hunks)components/generator/jvm/imagevector/src/main/kotlin/io/github/composegears/valkyrie/generator/jvm/imagevector/ImageVectorGenerator.kt(1 hunks)components/generator/jvm/imagevector/src/main/kotlin/io/github/composegears/valkyrie/generator/jvm/imagevector/spec/BackingPropertySpec.kt(1 hunks)components/generator/jvm/imagevector/src/main/kotlin/io/github/composegears/valkyrie/generator/jvm/imagevector/spec/Common.kt(1 hunks)components/generator/jvm/imagevector/src/main/kotlin/io/github/composegears/valkyrie/generator/jvm/imagevector/spec/LazyPropertySpec.kt(1 hunks)components/generator/jvm/imagevector/src/main/kotlin/io/github/composegears/valkyrie/generator/jvm/imagevector/spec/PathNodeSpec.kt(2 hunks)components/generator/jvm/imagevector/src/main/kotlin/io/github/composegears/valkyrie/generator/jvm/imagevector/util/GroupBuilder.kt(1 hunks)components/generator/jvm/imagevector/src/main/kotlin/io/github/composegears/valkyrie/generator/jvm/imagevector/util/ImageVectorBuilderSpec.kt(1 hunks)components/generator/jvm/imagevector/src/main/kotlin/io/github/composegears/valkyrie/generator/jvm/imagevector/util/PathBuilder.kt(1 hunks)components/ir-compose/api/ir-compose.api(0 hunks)components/ir-compose/api/ir-compose.klib.api(0 hunks)components/ir-xml/api/ir-xml.api(0 hunks)components/ir-xml/api/ir-xml.klib.api(0 hunks)components/ir/api/ir.klib.api(0 hunks)components/ir/src/commonMain/kotlin/io/github/composegears/valkyrie/ir/util/ColorClassification.kt(0 hunks)components/ir/src/commonMain/kotlin/io/github/composegears/valkyrie/ir/util/IrImageVectorColor.kt(0 hunks)components/ir/src/commonMain/kotlin/io/github/composegears/valkyrie/ir/util/IrImageVectorExtensions.kt(0 hunks)components/parser/common/api/common.klib.api(1 hunks)components/parser/common/build.gradle.kts(1 hunks)components/parser/common/src/commonMain/kotlin/io/github/composegears/valkyrie/parser/common/PathNode.kt(1 hunks)components/parser/common/src/commonMain/kotlin/io/github/composegears/valkyrie/parser/common/PathParser.kt(1 hunks)components/parser/jvm/xml/api/xml.api(1 hunks)components/parser/jvm/xml/build.gradle.kts(1 hunks)components/parser/jvm/xml/src/main/kotlin/io/github/composegears/valkyrie/parser/jvm/xml/XmlToImageVectorParser.kt(1 hunks)components/parser/jvm/xml/src/main/kotlin/io/github/composegears/valkyrie/parser/jvm/xml/ext/Ir.kt(1 hunks)components/parser/kmp/svg/api/svg.api(1 hunks)components/parser/kmp/svg/api/svg.klib.api(1 hunks)components/parser/kmp/svg/build.gradle.kts(1 hunks)components/parser/kmp/svg/src/commonMain/kotlin/io/github/composegears/valkyrie/parser/kmp/svg/KeywordColorParser.kt(1 hunks)components/parser/kmp/svg/src/commonMain/kotlin/io/github/composegears/valkyrie/parser/kmp/svg/SVGParser.kt(1 hunks)components/parser/kmp/svg/src/commonMain/kotlin/io/github/composegears/valkyrie/parser/kmp/svg/SVGStroke.kt(1 hunks)components/parser/kmp/svg/src/commonMain/kotlin/io/github/composegears/valkyrie/parser/kmp/svg/SvgColorParser.kt(1 hunks)components/parser/kmp/svg/src/commonMain/kotlin/io/github/composegears/valkyrie/parser/kmp/svg/SvgExtensions.kt(1 hunks)components/parser/kmp/svg/src/commonTest/kotlin/io/github/composegears/valkyrie/parser/kmp/svg/KeywordColorParserTest.kt(1 hunks)components/parser/kmp/svg/src/commonTest/kotlin/io/github/composegears/valkyrie/parser/kmp/svg/SVGParserTest.kt(1 hunks)components/parser/kmp/xml/api/xml.api(1 hunks)components/parser/kmp/xml/api/xml.klib.api(1 hunks)components/parser/kmp/xml/build.gradle.kts(1 hunks)components/parser/kmp/xml/src/commonMain/kotlin/io/github/composegears/valkyrie/parser/kmp/xml/AndroidColorParser.kt(1 hunks)components/parser/kmp/xml/src/commonMain/kotlin/io/github/composegears/valkyrie/parser/kmp/xml/XmlToImageVectorParser.kt(1 hunks)components/parser/kmp/xml/src/commonTest/kotlin/io/github/composegears/valkyrie/parser/kmp/xml/AndroidColorParserTest.kt(1 hunks)components/parser/kmp/xml/src/commonTest/kotlin/io/github/composegears/valkyrie/parser/kmp/xml/XmlToImageVectorParserTest.kt(1 hunks)components/parser/unified/api/unified.api(1 hunks)components/parser/unified/api/unified.klib.api(1 hunks)components/parser/unified/build.gradle.kts(1 hunks)components/parser/unified/src/commonMain/kotlin/io/github/composegears/valkyrie/parser/unified/model/IconParserOutput.kt(1 hunks)components/psi/imagevector/api/imagevector.api(1 hunks)components/psi/imagevector/build.gradle.kts(1 hunks)components/psi/imagevector/src/main/kotlin/io/github/composegears/valkyrie/psi/imagevector/ImageVectorPsiParser.kt(1 hunks)components/psi/imagevector/src/main/kotlin/io/github/composegears/valkyrie/psi/imagevector/common/FillParser.kt(1 hunks)components/psi/imagevector/src/main/kotlin/io/github/composegears/valkyrie/psi/imagevector/common/KtCallExpression.kt(1 hunks)components/psi/imagevector/src/main/kotlin/io/github/composegears/valkyrie/psi/imagevector/common/PathNodeParser.kt(1 hunks)components/psi/imagevector/src/main/kotlin/io/github/composegears/valkyrie/psi/imagevector/parser/MaterialImageVectorPsiParser.kt(1 hunks)components/psi/imagevector/src/main/kotlin/io/github/composegears/valkyrie/psi/imagevector/parser/RegularImageVectorPsiParser.kt(1 hunks)components/psi/imagevector/src/test/kotlin/io/github/composegears/valkyrie/psi/imagevector/KtCallExpressionTests.kt(1 hunks)components/psi/imagevector/src/test/kotlin/io/github/composegears/valkyrie/psi/imagevector/KtFileToImageVectorParserTest.kt(1 hunks)components/test/coverage/build.gradle.kts(1 hunks)sdk/generator/xml/api/xml.api(1 hunks)sdk/generator/xml/api/xml.klib.api(1 hunks)sdk/generator/xml/build.gradle.kts(1 hunks)sdk/generator/xml/src/commonMain/kotlin/io/github/composegears/valkyrie/sdk/generator/xml/IrToXmlGenerator.kt(1 hunks)sdk/generator/xml/src/commonMain/kotlin/io/github/composegears/valkyrie/sdk/generator/xml/util/PathNode.kt(1 hunks)sdk/generator/xml/src/commonTest/kotlin/io/github/composegears/valkyrie/sdk/generator/xml/IrToXmlGeneratorTest.kt(1 hunks)sdk/ir/compose/api/compose.api(1 hunks)sdk/ir/compose/api/compose.klib.api(1 hunks)sdk/ir/compose/build.gradle.kts(1 hunks)sdk/ir/compose/src/commonMain/kotlin/io/github/composegears/valkyrie/sdk/ir/compose/IrToImageVector.kt(2 hunks)sdk/ir/core/api/core.api(18 hunks)sdk/ir/core/api/core.klib.api(1 hunks)sdk/ir/core/build.gradle.kts(1 hunks)sdk/ir/core/src/commonMain/kotlin/io/github/composegears/valkyrie/sdk/ir/core/IrColor.kt(1 hunks)sdk/ir/core/src/commonMain/kotlin/io/github/composegears/valkyrie/sdk/ir/core/IrFill.kt(1 hunks)sdk/ir/core/src/commonMain/kotlin/io/github/composegears/valkyrie/sdk/ir/core/IrImageVector.kt(1 hunks)sdk/ir/core/src/commonMain/kotlin/io/github/composegears/valkyrie/sdk/ir/core/IrPathFillType.kt(1 hunks)sdk/ir/core/src/commonMain/kotlin/io/github/composegears/valkyrie/sdk/ir/core/IrPathNode.kt(1 hunks)sdk/ir/core/src/commonMain/kotlin/io/github/composegears/valkyrie/sdk/ir/core/IrStroke.kt(1 hunks)sdk/ir/core/src/commonMain/kotlin/io/github/composegears/valkyrie/sdk/ir/core/IrStrokeLineCap.kt(1 hunks)sdk/ir/core/src/commonMain/kotlin/io/github/composegears/valkyrie/sdk/ir/core/IrStrokeLineJoin.kt(1 hunks)sdk/ir/core/src/commonMain/kotlin/io/github/composegears/valkyrie/sdk/ir/core/IrVectorNode.kt(1 hunks)sdk/ir/core/src/commonTest/kotlin/io/github/composegears/valkyrie/sdk/ir/core/HexParserTest.kt(1 hunks)sdk/ir/util/api/util.api(1 hunks)sdk/ir/util/api/util.klib.api(1 hunks)sdk/ir/util/build.gradle.kts(1 hunks)sdk/ir/util/src/commonMain/kotlin/io/github/composegears/valkyrie/sdk/ir/util/IrExtension.kt(1 hunks)sdk/ir/util/src/commonMain/kotlin/io/github/composegears/valkyrie/sdk/ir/util/internal/ColorClassification.kt(1 hunks)sdk/ir/util/src/commonTest/kotlin/io/github/composegears/valkyrie/sdk/ir/util/ColorClassificationTest.kt(1 hunks)sdk/ir/util/src/commonTest/kotlin/io/github/composegears/valkyrie/sdk/ir/util/IrImageVectorColorTest.kt(1 hunks)sdk/ir/xml/api/xml.api(1 hunks)sdk/ir/xml/api/xml.klib.api(1 hunks)sdk/ir/xml/build.gradle.kts(1 hunks)sdk/ir/xml/src/commonMain/kotlin/io/github/composegears/valkyrie/sdk/ir/xml/IrToVectorXml.kt(1 hunks)settings.gradle.kts(1 hunks)tools/cli/build.gradle.kts(1 hunks)tools/gradle-plugin/build.gradle.kts(1 hunks)tools/idea-plugin/build.gradle.kts(1 hunks)tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/completion/ImageVectorCompletionContributor.kt(1 hunks)tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/completion/ImageVectorIcon.kt(1 hunks)tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/editor/ui/VirtualFileImageVector.kt(1 hunks)tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/gutter/ImageVectorGutterProvider.kt(1 hunks)tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/foundation/components/previewer/ImageVectorPreviewPanel.kt(1 hunks)tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/editor/edit/EditViewModel.kt(1 hunks)tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/mode/iconpack/conversion/IconPackConversionState.kt(1 hunks)tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/mode/iconpack/conversion/ui/batch/ui/IconPreviewBox.kt(1 hunks)tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/mode/simple/conversion/model/SimpleConversionState.kt(1 hunks)tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/mode/simple/conversion/ui/action/PreviewActionContent.kt(1 hunks)
⛔ Files not processed due to max files limit (1)
- tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/util/Stub.kt
💤 Files with no reviewable changes (8)
- components/ir/src/commonMain/kotlin/io/github/composegears/valkyrie/ir/util/ColorClassification.kt
- components/ir-xml/api/ir-xml.api
- components/ir/src/commonMain/kotlin/io/github/composegears/valkyrie/ir/util/IrImageVectorColor.kt
- components/ir/src/commonMain/kotlin/io/github/composegears/valkyrie/ir/util/IrImageVectorExtensions.kt
- components/ir-compose/api/ir-compose.klib.api
- components/ir-xml/api/ir-xml.klib.api
- components/ir-compose/api/ir-compose.api
- components/ir/api/ir.klib.api
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2025-09-27T22:19:48.762Z
Learnt from: t-regbs
Repo: ComposeGears/Valkyrie PR: 587
File: sdk/generator/xml/src/commonMain/kotlin/io/github/composegears/valkyrie/sdk/generator/xml/XmlSerializer.kt:13-16
Timestamp: 2025-09-27T22:19:48.762Z
Learning: The VectorDrawable.Child sealed interface in the Valkyrie project only has Group and Path as implementations. ClipPath is not implemented in this project, despite being supported in Android's official VectorDrawable specification.
Applied to files:
components/psi/imagevector/src/main/kotlin/io/github/composegears/valkyrie/psi/imagevector/parser/MaterialImageVectorPsiParser.ktcomponents/parser/kmp/svg/src/commonTest/kotlin/io/github/composegears/valkyrie/parser/kmp/svg/SVGParserTest.ktsdk/generator/xml/src/commonTest/kotlin/io/github/composegears/valkyrie/sdk/generator/xml/IrToXmlGeneratorTest.ktcomponents/psi/imagevector/src/main/kotlin/io/github/composegears/valkyrie/psi/imagevector/common/PathNodeParser.ktcomponents/generator/jvm/imagevector/src/main/kotlin/io/github/composegears/valkyrie/generator/jvm/imagevector/util/PathBuilder.ktcomponents/parser/kmp/svg/src/commonMain/kotlin/io/github/composegears/valkyrie/parser/kmp/svg/SVGParser.ktsdk/generator/xml/src/commonMain/kotlin/io/github/composegears/valkyrie/sdk/generator/xml/IrToXmlGenerator.ktcomponents/parser/kmp/xml/src/commonTest/kotlin/io/github/composegears/valkyrie/parser/kmp/xml/XmlToImageVectorParserTest.ktcomponents/parser/kmp/svg/src/commonMain/kotlin/io/github/composegears/valkyrie/parser/kmp/svg/SvgExtensions.ktsdk/ir/core/src/commonMain/kotlin/io/github/composegears/valkyrie/sdk/ir/core/IrVectorNode.ktsdk/ir/core/api/core.klib.apisdk/ir/compose/src/commonMain/kotlin/io/github/composegears/valkyrie/sdk/ir/compose/IrToImageVector.ktsdk/ir/core/api/core.api
📚 Learning: 2025-10-21T20:55:27.073Z
Learnt from: egorikftp
Repo: ComposeGears/Valkyrie PR: 651
File: tools/idea-plugin/build.gradle.kts:147-175
Timestamp: 2025-10-21T20:55:27.073Z
Learning: In Gradle Kotlin DSL (.gradle.kts) scripts, the types `org.gradle.api.artifacts.ArtifactCollection` and `org.gradle.api.artifacts.component.ModuleComponentIdentifier` are implicitly available and do not require explicit import statements.
Applied to files:
tools/cli/build.gradle.ktscomponents/generator/jvm/imagevector/build.gradle.ktssdk/ir/compose/build.gradle.ktscomponents/psi/imagevector/build.gradle.ktscomponents/parser/unified/build.gradle.ktscomponents/test/coverage/build.gradle.ktscomponents/parser/kmp/svg/build.gradle.ktstools/gradle-plugin/build.gradle.ktssdk/ir/util/build.gradle.ktscomponents/parser/common/build.gradle.ktssdk/ir/xml/build.gradle.kts
🧬 Code graph analysis (1)
components/test/coverage/build.gradle.kts (1)
build-logic/convention/src/main/kotlin/io/github/composegears/valkyrie/internal/Project.kt (1)
kover(27-28)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: build (ubuntu-latest)
🔇 Additional comments (100)
components/parser/kmp/xml/src/commonTest/kotlin/io/github/composegears/valkyrie/parser/kmp/xml/XmlToImageVectorParserTest.kt (1)
3-10: Import migration to sdk.ir.core is complete and correct.All IR-related types have been successfully migrated from the old package paths to the new
sdk.ir.corenamespace. The imports are consistent with the PR objective to consolidate IR modules into the SDK.components/test/coverage/build.gradle.kts (1)
20-23: ✓ IR module migration verified and complete.The verification confirms that all four new SDK IR submodules exist and are properly structured:
sdk/ir/compose,sdk/ir/core,sdk/ir/util,sdk/ir/xml✓- No remaining references to the old
components.irmodule ✓The kover coverage dependencies have been correctly updated for the module restructuring.
components/psi/imagevector/src/test/kotlin/io/github/composegears/valkyrie/psi/imagevector/KtFileToImageVectorParserTest.kt (1)
26-26: LGTM! Import path correctly updated.The import statement has been properly updated to reflect the new SDK module structure. All usages of
toComposeImageVector()throughout the test file remain unchanged, and the refactoring aligns with the PR's objective of relocating IR modules into the SDK namespace.sdk/ir/core/src/commonTest/kotlin/io/github/composegears/valkyrie/sdk/ir/core/HexParserTest.kt (1)
1-1: LGTM: Package namespace updated correctly.The package declaration has been updated to reflect the new module structure as part of the IR module reorganization into the SDK namespace.
sdk/ir/util/build.gradle.kts (3)
3-4: Plugin additions align with SDK module restructuring.Adding
valkyrie.abiandvalkyrie.koverplugins is appropriate for a public SDK module to track binary compatibility and code coverage metrics during this refactoring.
10-10: Verify API surface compatibility for the dependency change.The summary indicates this line replaces both
api(projects.components.ir)andimplementation(projects.sdk.generator.xml)withimplementation(projects.sdk.ir.core). While this aligns with the PR's IR restructuring goals, note that changing from anapitoimplementationdependency may affect consumers if they were relying on re-exported types.Confirm that:
- The
sdk.ir.coremodule is properly established with all necessary IR core types.- No consumers of
sdk.ir.utildepended on transitive visibility of the oldcomponents.irtypes through theapidependency.
18-20: Consistent artifact naming for relocated module.Setting
archiveBaseName = "sdk-ir-util"ensures the built JAR artifact has a predictable name aligned with the new module structure.components/parser/jvm/xml/src/main/kotlin/io/github/composegears/valkyrie/parser/jvm/xml/ext/Ir.kt (1)
4-8: LGTM! Import paths correctly updated to the new SDK structure.The import statements have been consistently updated from the old
io.github.composegears.valkyrie.irpackage to the newio.github.composegears.valkyrie.sdk.ir.corepackage, aligning with the PR's objective to move IR modules into the SDK. The function implementations remain unchanged, ensuring no behavioral changes.Since this is part of a larger module reorganization, please verify that the build and tests pass successfully to confirm all dependencies and usages across the codebase have been updated correctly.
tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/mode/iconpack/conversion/IconPackConversionState.kt (1)
4-4: LGTM! Import path updated correctly.The import has been successfully updated to reflect the new SDK module structure, consistent with the PR's objective to move IR modules into the SDK namespace.
components/psi/imagevector/src/test/kotlin/io/github/composegears/valkyrie/psi/imagevector/KtCallExpressionTests.kt (1)
7-7: LGTM! Clean import path update.The import path correctly reflects the new SDK package structure as part of the IR module consolidation effort.
tools/gradle-plugin/build.gradle.kts (1)
88-92: Migrate public API dependency from components.ir to sdk.ir.core.The change is verified as correct and complete. The sdk.ir.core module exists and exports all necessary public IR types (IrImageVector, IrColor, IrPathNode, IrStroke, etc.) that are actively used across the codebase. No references to the old components.ir module remain, confirming the migration is complete. The gradle-plugin's api() configuration correctly exposes this dependency to downstream consumers without breaking changes.
components/psi/imagevector/src/main/kotlin/io/github/composegears/valkyrie/psi/imagevector/common/KtCallExpression.kt (1)
4-9: Clean namespace migration confirmed—no issues found.The import path updates are correct and consistent with the broader SDK namespace reorganization. Verification confirms:
- Old namespace
io.github.composegears.valkyrie.ir.corehas been completely removed from the codebase- All six imported types are properly accessible from the new
io.github.composegears.valkyrie.sdk.ir.corenamespace- The migration is applied consistently across the codebase
sdk/ir/compose/build.gradle.kts (3)
18-20: Artifact naming convention verified — no changes needed.The archiveBaseName "sdk-ir-compose" follows the established SDK naming convention (pattern:
sdk-{category}-{module}), consistent with all other SDK modules (sdk-core-xml, sdk-generator-xml, sdk-ir-core, sdk-ir-util, sdk-ir-xml). No naming conflicts detected.
5-5: Kover plugin is consistently applied across SDK modules—verification complete.The addition of
alias(libs.plugins.valkyrie.kover)tosdk/ir/compose/build.gradle.ktsfollows an established pattern: 6 out of 7 SDK modules include the kover plugin. Onlysdk/core/extensions/build.gradle.ktsis missing it, making it the outlier rather than the norm. This confirms the change aligns with standard practice across the SDK.
11-11: No breaking changes found — change follows best practices.All direct consumers of
sdk.ir.composealready explicitly depend onsdk.ir.core:
tools/idea-plugin: has bothimplementation(projects.sdk.ir.core)andimplementation(projects.sdk.ir.compose)components/psi/imagevector: has both as wellChanging from
apitoimplementationfor the internal dependency onsdk.ir.coredoes not break consumers because they don't rely on transitive dependency. The public API (toComposeImageVector) remains accessible fromsdk.ir.compose. This change actually improves encapsulation by not exposing internal dependencies transitively.components/parser/kmp/svg/src/commonMain/kotlin/io/github/composegears/valkyrie/parser/kmp/svg/KeywordColorParser.kt (1)
3-3: LGTM! Import path updated correctly.The import path has been updated to reflect the new SDK package structure.
sdk/ir/core/src/commonMain/kotlin/io/github/composegears/valkyrie/sdk/ir/core/IrStroke.kt (1)
1-1: LGTM! Package declaration updated correctly.The package has been successfully migrated to the new SDK structure.
sdk/ir/core/build.gradle.kts (1)
15-17: LGTM! Appropriate JAR naming configuration.Setting the archive base name ensures consistent artifact naming for the SDK IR core module.
components/generator/jvm/imagevector/src/main/kotlin/io/github/composegears/valkyrie/generator/jvm/imagevector/spec/LazyPropertySpec.kt (1)
14-14: LGTM! Import path updated correctly.The IrImageVector import has been updated to reference the new SDK package location.
components/psi/imagevector/src/main/kotlin/io/github/composegears/valkyrie/psi/imagevector/common/FillParser.kt (1)
5-5: LGTM! Import path updated correctly.The IrFill import has been migrated to the new SDK IR core package.
sdk/ir/core/src/commonMain/kotlin/io/github/composegears/valkyrie/sdk/ir/core/IrPathFillType.kt (1)
1-1: LGTM! Package declaration updated correctly.The enum has been successfully relocated to the SDK IR core package.
components/parser/kmp/svg/src/commonMain/kotlin/io/github/composegears/valkyrie/parser/kmp/svg/SVGStroke.kt (1)
3-3: LGTM! Import path updated correctly.The IrColor import has been updated to use the new SDK package structure.
tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/mode/simple/conversion/model/SimpleConversionState.kt (1)
4-4: LGTM! Import path updated correctly.The IrImageVector import has been successfully migrated to the SDK IR core package.
tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/editor/edit/EditViewModel.kt (1)
12-12: LGTM! Clean namespace migration.The import path has been correctly updated to the new SDK IR compose module location.
sdk/ir/core/src/commonMain/kotlin/io/github/composegears/valkyrie/sdk/ir/core/IrStrokeLineCap.kt (1)
1-7: LGTM! Package relocation is clean.The enum definition remains unchanged; only the package namespace has been updated to align with the new SDK IR core module structure.
components/generator/jvm/imagevector/src/main/kotlin/io/github/composegears/valkyrie/generator/jvm/imagevector/util/ImageVectorBuilderSpec.kt (1)
11-11: LGTM! Import path correctly updated.The IrImageVector type reference has been updated to use the new SDK IR core namespace.
sdk/ir/core/src/commonMain/kotlin/io/github/composegears/valkyrie/sdk/ir/core/IrPathNode.kt (1)
1-105: LGTM! Package namespace migration completed.The sealed interface and all its implementations remain unchanged. Only the package declaration has been updated to the new SDK IR core location.
components/parser/kmp/xml/src/commonMain/kotlin/io/github/composegears/valkyrie/parser/kmp/xml/XmlToImageVectorParser.kt (1)
5-12: LGTM! All IR type imports correctly migrated.All core IR types (IrColor, IrFill, IrImageVector, IrPathFillType, IrStroke, IrStrokeLineCap, IrStrokeLineJoin, IrVectorNode) have been updated to reference the new SDK IR core namespace.
sdk/ir/xml/build.gradle.kts (1)
1-18: LGTM! Build configuration is well-structured.The new build file correctly configures the sdk/ir/xml module with:
- Appropriate KMP, ABI, and code coverage plugins
- Correct dependencies on sdk.ir.core and sdk.generator.xml
- Proper artifact naming convention
sdk/generator/xml/src/commonMain/kotlin/io/github/composegears/valkyrie/sdk/generator/xml/IrToXmlGenerator.kt (1)
5-9: LGTM! Import paths updated correctly.All IR type imports (IrFill, IrImageVector, IrPathFillType, IrStroke, IrVectorNode) have been migrated to the new SDK IR core namespace.
tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/mode/simple/conversion/ui/action/PreviewActionContent.kt (1)
11-11: Namespace migration verified as complete and consistent.The verification confirms:
- The import at line 11 is correctly updated to
io.github.composegears.valkyrie.sdk.ir.core.IrImageVector- No references to the old
io.github.composegears.valkyrie.irnamespace remain anywhere in the codebase (0 files)- The new namespace is in use across 63 files consistently
The original review comment is accurate. The code changes are correct and require no modifications.
sdk/generator/xml/build.gradle.kts (1)
13-13: LGTM! Dependency updated correctly.The dependency change from
projects.components.irtoprojects.sdk.ir.corealigns with the module restructuring objective of this PR.components/psi/imagevector/src/main/kotlin/io/github/composegears/valkyrie/psi/imagevector/parser/MaterialImageVectorPsiParser.kt (1)
15-20: LGTM! Import paths updated consistently.All IR type imports have been correctly updated to reference the new
sdk.ir.corepackage namespace. The changes are mechanical and maintain the same functionality.sdk/ir/core/src/commonMain/kotlin/io/github/composegears/valkyrie/sdk/ir/core/IrVectorNode.kt (1)
1-1: LGTM! Package declaration updated to new SDK namespace.The package has been correctly relocated from
io.github.composegears.valkyrie.irtoio.github.composegears.valkyrie.sdk.ir.coreas part of the module restructuring.components/parser/jvm/xml/build.gradle.kts (1)
9-9: LGTM! Dependency correctly updated.The dependency declaration has been updated to reference the new
sdk.ir.coremodule, consistent with the overall module restructuring.sdk/ir/core/src/commonMain/kotlin/io/github/composegears/valkyrie/sdk/ir/core/IrFill.kt (1)
1-1: LGTM! Package namespace updated correctly.The package declaration has been updated to the new SDK namespace, consistent with the module restructuring effort.
tools/cli/build.gradle.kts (1)
91-91: LGTM! Dependency updated to new module.The dependency has been correctly updated from
projects.components.irtoprojects.sdk.ir.core, aligning with the module restructuring.sdk/ir/core/src/commonMain/kotlin/io/github/composegears/valkyrie/sdk/ir/core/IrStrokeLineJoin.kt (1)
1-1: LGTM! Package relocated to SDK namespace.The package declaration has been updated correctly as part of the IR module migration to the SDK namespace.
settings.gradle.kts (1)
77-80: LGTM! Module structure updated correctly.The Gradle project structure has been successfully migrated from the old
components:ir*modules to the newsdk:ir:*modules (compose, core, util, xml). Verification confirms:
- No remaining references to old
components:irmodules in gradle files or Kotlin imports- All 4 new
sdk:ir:*modules properly included in settings.gradle.kts (lines 77-80)- 15+ consumers across the codebase already updated to reference the new
projects.sdk.ir.*paths- Migration is complete with no dangling dependencies
tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/screen/mode/iconpack/conversion/ui/batch/ui/IconPreviewBox.kt (1)
20-23: LGTM! Import paths correctly updated.The imports have been properly migrated from the old
ir.*namespace to the newsdk.ir.*structure, aligning with the module reorganization.components/psi/imagevector/build.gradle.kts (2)
24-24: LGTM! Dependency updated to new SDK module.The dependency reference has been correctly updated from
projects.components.irtoprojects.sdk.ir.core.
30-30: LGTM! Test dependency updated to new SDK module.The test dependency reference has been correctly updated from
projects.components.irComposetoprojects.sdk.ir.compose.sdk/ir/core/src/commonMain/kotlin/io/github/composegears/valkyrie/sdk/ir/core/IrColor.kt (1)
1-1: LGTM! Package declaration updated.The package has been correctly moved to the new
sdk.ir.corenamespace as part of the module reorganization.sdk/ir/compose/api/compose.klib.api (1)
1-9: LGTM! ABI dump correctly reflects the public API.The ABI dump properly documents the
toComposeImageVectorextension function signature with the newsdk.ir.corenamespace.sdk/ir/xml/api/xml.klib.api (1)
1-9: LGTM! ABI dump correctly reflects the public API.The ABI dump properly documents the
toVectorXmlStringextension function signature with the newsdk.ir.corenamespace.sdk/ir/compose/src/commonMain/kotlin/io/github/composegears/valkyrie/sdk/ir/compose/IrToImageVector.kt (2)
1-1: LGTM! Package declaration updated.The package has been correctly updated to the new
sdk.ir.composenamespace.
18-45: LGTM! All imports correctly updated.All IR type imports have been properly migrated from the old
ir.*namespace to the newsdk.ir.core.*structure.tools/idea-plugin/build.gradle.kts (1)
34-37: LGTM! Dependencies migrated to new SDK modules.The plugin dependencies have been correctly updated to reference the new
sdk.ir.*modules instead of the oldcomponents.ir*modules.sdk/ir/util/src/commonMain/kotlin/io/github/composegears/valkyrie/sdk/ir/util/internal/ColorClassification.kt (3)
12-16: LGTM! Clean enum definition.The
DominantShadeenum provides a clear representation of icon color dominance states.
25-53: LGTM! Color classification logic is sound.The luminance-based classification correctly handles all cases:
- Early exit when both black and white shades are detected (line 43-45)
- Returns
Blackwhen all colors are dark (luminance ≤ 0.2)- Returns
Whitewhen all colors are light (luminance ≥ 0.8)- Returns
Mixedfor all other combinations (medium tones or partial coverage)The Rec. 709 luminance formula at line 34 is the standard approach for this calculation.
56-91: LGTM! Thorough color extraction.The traversal logic correctly visits all vector nodes and extracts colors from:
- Solid color fills and strokes
- Linear gradient color stops
- Radial gradient color stops
The recursive
visitNodeimplementation properly handles both groups and paths.sdk/ir/core/api/core.api (1)
1-511: API relocation aligns with sdk namespace.Public symbols mirror the prior IR surface; the move cleanly centralizes the API under sdk without regressions.
components/parser/kmp/svg/src/commonMain/kotlin/io/github/composegears/valkyrie/parser/kmp/svg/SvgColorParser.kt (1)
3-4: Import path update looks good.IrColor now resolves from the sdk package, matching the module migration.
components/parser/kmp/xml/src/commonMain/kotlin/io/github/composegears/valkyrie/parser/kmp/xml/AndroidColorParser.kt (1)
3-4: Namespace switch confirmed.AndroidColorParser now depends on the sdk IrColor, keeping functionality unchanged.
tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/completion/ImageVectorCompletionContributor.kt (1)
13-16: SDK extensions imported correctly.Completion logic continues to use the same IR helpers via the new sdk modules.
components/parser/kmp/svg/src/commonTest/kotlin/io/github/composegears/valkyrie/parser/kmp/svg/KeywordColorParserTest.kt (1)
5-5: Test import migration verified.Tests now target the sdk IrColor, consistent with the main sources.
components/generator/jvm/imagevector/src/main/kotlin/io/github/composegears/valkyrie/generator/jvm/imagevector/ImageVectorGenerator.kt (1)
3-3: Import path migration looks goodConfirmed the generator now depends on
sdk.ir.core.IrImageVector, matching the new sdk namespace.components/parser/kmp/svg/src/commonMain/kotlin/io/github/composegears/valkyrie/parser/kmp/svg/SvgExtensions.kt (1)
3-5: SVG enum imports correctly retargetedThe stroke and fill-type enums now resolve from the sdk IR package, consistent with the namespace move.
sdk/generator/xml/src/commonTest/kotlin/io/github/composegears/valkyrie/sdk/generator/xml/IrToXmlGeneratorTest.kt (1)
5-13: Tests now exercise the sdk IR typesThe updated imports keep the XML generator tests aligned with the new sdk.ir.core models.
components/generator/jvm/imagevector/src/main/kotlin/io/github/composegears/valkyrie/generator/jvm/imagevector/util/GroupBuilder.kt (1)
21-22: Group builder uses sdk IR nodesImport update correctly references the relocated
IrPathNodeandIrVectorNode.tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/editor/ui/VirtualFileImageVector.kt (1)
19-19: IDE plugin import kept in syncThe preview panel now reads IR image vectors from the sdk namespace, matching the rest of the migration.
components/psi/imagevector/src/main/kotlin/io/github/composegears/valkyrie/psi/imagevector/parser/RegularImageVectorPsiParser.kt (1)
20-21: Clean import path update.The import paths have been correctly updated to reference the new sdk.ir.core namespace. No functional changes.
components/parser/kmp/xml/src/commonTest/kotlin/io/github/composegears/valkyrie/parser/kmp/xml/AndroidColorParserTest.kt (1)
5-5: Test import correctly updated.The IrColor import path has been updated to match the new package structure. Test logic remains intact.
tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/completion/ImageVectorIcon.kt (1)
6-6: Import updated to internal utility package.The DominantShade import has been moved to the sdk.ir.util.internal package, correctly reflecting its internal API status.
components/psi/imagevector/src/main/kotlin/io/github/composegears/valkyrie/psi/imagevector/ImageVectorPsiParser.kt (1)
5-5: Import path correctly updated.The IrImageVector import now references the sdk.ir.core package. No functional impact.
components/parser/kmp/svg/build.gradle.kts (1)
10-10: Dependency correctly updated to new sdk module.The dependency has been updated from
projects.components.irtoprojects.sdk.ir.core, which aligns with the package restructuring and enables the import path changes across the codebase.components/parser/kmp/svg/src/commonMain/kotlin/io/github/composegears/valkyrie/parser/kmp/svg/SVGParser.kt (1)
4-10: All IR type imports updated consistently.All IR type imports (IrColor, IrFill, IrImageVector, IrPathFillType, IrPathNode, IrStroke, IrVectorNode) have been updated to reference the sdk.ir.core package. The parser logic remains unchanged.
tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/gutter/ImageVectorGutterProvider.kt (1)
15-18: Imports updated to new organized package structure.The imports now reference the restructured sdk.ir packages (core, util, xml), demonstrating better organization of IR-related functionality. No behavioral changes.
sdk/generator/xml/src/commonMain/kotlin/io/github/composegears/valkyrie/sdk/generator/xml/util/PathNode.kt (1)
3-22: Comprehensive IrPathNode import updates.All IrPathNode type imports (base type and all 19 subtypes) have been systematically updated to reference sdk.ir.core. The path conversion logic remains intact.
components/parser/jvm/xml/src/main/kotlin/io/github/composegears/valkyrie/parser/jvm/xml/XmlToImageVectorParser.kt (1)
14-17: LGTM! Clean import migration.The imports have been correctly updated to reference the new SDK IR core module location. The parser logic remains unchanged.
components/generator/jvm/imagevector/src/main/kotlin/io/github/composegears/valkyrie/generator/jvm/imagevector/ImageVectorFileSpec.kt (1)
7-7: LGTM! Import path correctly updated.The IrImageVector import has been properly migrated to the SDK IR core module.
components/parser/common/build.gradle.kts (1)
10-10: LGTM! Dependency correctly updated.The Gradle dependency has been properly migrated from the old components IR module to the new SDK IR core module.
components/generator/jvm/imagevector/src/main/kotlin/io/github/composegears/valkyrie/generator/jvm/imagevector/spec/Common.kt (1)
12-13: LGTM! Imports correctly migrated.The IR type imports have been properly updated to reference the SDK IR core module location.
components/parser/kmp/svg/src/commonTest/kotlin/io/github/composegears/valkyrie/parser/kmp/svg/SVGParserTest.kt (1)
3-11: LGTM! Test imports correctly updated.All IR type imports in the test file have been properly migrated to the SDK IR core module.
components/psi/imagevector/src/main/kotlin/io/github/composegears/valkyrie/psi/imagevector/common/PathNodeParser.kt (1)
4-23: LGTM! Comprehensive PathNode import migration.All IrPathNode type imports have been correctly updated to the SDK IR core module, covering the base type and all nested path node variants.
components/parser/kmp/xml/build.gradle.kts (1)
12-12: LGTM! Build dependency correctly updated.The Gradle dependency has been properly migrated to reference the SDK IR core module.
components/generator/jvm/imagevector/build.gradle.kts (1)
21-21: LGTM! Final build dependency migration complete.The Gradle dependency has been correctly updated to use the SDK IR core module, completing the module reorganization.
sdk/ir/util/src/commonMain/kotlin/io/github/composegears/valkyrie/sdk/ir/util/IrExtension.kt (1)
7-15: Extensions look solidGuarding against zero viewport dimensions avoids division errors, and delegating the dominant shade computation keeps behavior centralized with existing tests. Nicely done.
sdk/ir/xml/api/xml.api (1)
1-3: LGTM! New API surface is clean and consistent.The new XML interop API file correctly references the relocated
sdk.ir.core.IrImageVectortype and provides a focused conversion method.sdk/generator/xml/api/xml.api (1)
3-3: LGTM! API signature updated correctly.The parameter type has been successfully migrated to use
sdk.ir.core.IrImageVector, aligning with the module reorganization.components/psi/imagevector/api/imagevector.api (1)
4-4: LGTM! Return type correctly updated.The return type has been migrated to
sdk.ir.core.IrImageVector, consistent with the namespace reorganization.components/parser/unified/build.gradle.kts (1)
10-10: LGTM! Dependency correctly updated.The dependency has been properly migrated from
projects.components.irtoprojects.sdk.ir.core, aligning with the module reorganization.sdk/ir/xml/src/commonMain/kotlin/io/github/composegears/valkyrie/sdk/ir/xml/IrToVectorXml.kt (1)
1-4: LGTM! Package and imports correctly migrated.The package declaration and import path have been properly updated to reflect the new SDK namespace structure. The function implementation remains unchanged.
sdk/generator/xml/api/xml.klib.api (1)
10-10: LGTM! Klib ABI dump correctly updated.The auto-generated klib API dump accurately reflects the parameter type migration to
sdk.ir.core.IrImageVector.components/parser/kmp/xml/api/xml.api (1)
3-3: LGTM! Return type correctly migrated.The return type has been successfully updated to
sdk.ir.core.IrImageVector, consistent with the namespace reorganization.components/parser/kmp/svg/api/svg.klib.api (1)
10-14: LGTM! Klib ABI dump correctly reflects type migration.Both return types have been properly updated to use SDK namespace types:
sdk.ir.core.IrImageVectorandsdk.ir.core.IrColor?.sdk/ir/util/src/commonTest/kotlin/io/github/composegears/valkyrie/sdk/ir/util/IrImageVectorColorTest.kt (1)
1-68: Color extraction test aligned with new IR constructorConstructor arguments and the internal
iconColorsimport now match the sdk.ir migration while preserving the expected color ordering in assertions. Nicely done.components/generator/jvm/imagevector/src/main/kotlin/io/github/composegears/valkyrie/generator/jvm/imagevector/spec/PathNodeSpec.kt (1)
4-60: Generator case mapping stays consistentThe exhaustive
IrPathNodewhen-branch mapping survives the package move untouched, keeping the emitted statements stable while aligning with the new sdk namespace.components/parser/common/api/common.klib.api (1)
10-10: ABI surface matches namespace migrationThe exported return type now points at
sdk.ir.core.IrPathNode, keeping the public parser contract in sync with the underlying move.components/parser/common/src/commonMain/kotlin/io/github/composegears/valkyrie/parser/common/PathParser.kt (1)
3-41: Parser output migration looks goodSwitching
IrPathNodeto the sdk namespace keeps the parser’s behavior identical while aligning with the new module layout.sdk/ir/compose/api/compose.api (1)
1-4: Compose interop ABI alignedThe helper now lives under
sdk.ir.compose, exposing the same conversion signatures for the relocatedIrImageVector.components/parser/common/src/commonMain/kotlin/io/github/composegears/valkyrie/parser/common/PathNode.kt (2)
1-22: LGTM! Imports updated to SDK namespace.The package declaration and imports have been correctly updated to reference the new
sdk.ir.corenamespace, aligning with the broader IR module migration.
24-24: No issues found - visibility change is safe.Verification confirms
toPathNodeshas no external usages. The function is used only internally withinPathParser.kt(same module) and is properly scoped as internal with no public re-exports.components/parser/kmp/svg/api/svg.api (1)
1-9: LGTM! Public API signatures updated to SDK namespace.The public API signatures for
SVGParser.parseandSvgColorParser.parse-AzGxbLkhave been correctly updated to return types from the newsdk.ir.corenamespace.components/generator/jvm/imagevector/api/imagevector.api (1)
25-25: LGTM! Method signature updated to SDK namespace.The
convertmethod parameter type has been correctly updated to usesdk.ir.core.IrImageVectorinstead of the oldir.IrImageVector.sdk/ir/util/api/util.api (1)
1-4: LGTM! Extension functions for IrImageVector.The new extension functions
getAspectRatioandgetDominantShadeColorprovide useful utilities for working withIrImageVector.components/parser/unified/api/unified.klib.api (1)
39-51: LGTM! IconParserOutput API updated to SDK namespace.All method signatures in
IconParserOutputhave been consistently updated to usesdk.ir.core.IrImageVectorinstead of the oldir.IrImageVector.tools/idea-plugin/src/main/kotlin/io/github/composegears/valkyrie/ui/foundation/components/previewer/ImageVectorPreviewPanel.kt (1)
28-31: LGTM! Imports updated to SDK namespace.The imports have been correctly updated to reference the new SDK modules:
sdk.ir.composefortoComposeImageVectorsdk.ir.coreforIrImageVectorsdk.ir.utilfordominantShadeColorsdk.ir.util.internalforDominantShadesdk/ir/util/api/util.klib.api (1)
9-24: LGTM! New utility API for IrImageVector.The new klib API adds useful extension properties
aspectRatioanddominantShadeColorforIrImageVector. Note the earlier comment aboutDominantShadeplacement in theinternalpackage also applies here.components/parser/unified/api/unified.api (1)
35-44: LGTM! IconParserOutput API updated to SDK namespace.All method signatures in
IconParserOutputhave been consistently updated to usesdk.ir.core.IrImageVector, matching the changes in the corresponding klib API.