-
Notifications
You must be signed in to change notification settings - Fork 24
[Gradle] Support AGP 9 #960
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
Open
egorikftp
wants to merge
6
commits into
main
Choose a base branch
from
feature/gradle/agp-9
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
b987326
docs: add AI Agent Guide to project documentation
egorikftp 2dc7727
Update Gradle to 9.4.1
egorikftp 986cf31
Remove deprecated Configuring annotation
egorikftp 3ea8eb9
Add support for AGP 9.0+
egorikftp 06a2616
Add compatibility section to README and update AGP version in build.gβ¦
egorikftp 9b6def4
Enhance icon file retrieval logic
egorikftp File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,104 @@ | ||
| # Valkyrie β AI Agent Guide | ||
|
|
||
| ## Project Overview | ||
|
|
||
| Valkyrie converts SVG/XML icons to Compose `ImageVector` Kotlin code. It ships as four tools sharing the same core | ||
| pipeline: **IDEA/Android Studio plugin**, **CLI**, **Gradle plugin**, and a **WASM web app** (WIP). | ||
|
|
||
| ## Architecture: Data Flow | ||
|
|
||
| ``` | ||
| SVG / XML file | ||
| β | ||
| βΌ | ||
| components:parser (jvm/svg, jvm/xml, kmp/xml, kmp/svg) | ||
| β produces βββΆ sdk:ir:core (IrImageVector, IrVectorNode, IrPathNode, β¦) | ||
| βΌ | ||
| components:parser:unified (SvgXmlParser β single entry point for both formats) | ||
| β | ||
| βΌ | ||
| components:generator (kmp/imagevector, jvm/imagevector, iconpack) | ||
| β produces βββΆ Kotlin source string | ||
| βΌ | ||
| tools:idea-plugin / tools:cli / tools:gradle-plugin | ||
| ``` | ||
|
|
||
| - **`sdk/ir/core`** β Intermediate Representation (IR). All domain types live here (`IrImageVector`, `IrVectorNode`, | ||
| `IrFill`, `IrStroke`, etc.). Parsers produce IR; generators consume IR. | ||
| - **`components/parser/unified`** β `SvgXmlParser` is the unified entry point used by all tools. | ||
| - **`components/generator/kmp/imagevector`** β KMP-compatible generator (used by web/CLI/Gradle); JVM variant ( | ||
| `jvm/imagevector`) uses KotlinPoet. | ||
| - **`sdk/shared`** β `ValkyrieMode` enum (`Simple` | `IconPack`) controls generation style across all tools. | ||
| - **`build-logic/`** β Convention plugins (`valkyrie.jvm`, `valkyrie.kmp`, `valkyrie.abi`, `valkyrie.compose`, | ||
| `valkyrie.kover`) applied via `alias(libs.plugins.valkyrie.*)`. | ||
|
|
||
| ## Module Taxonomy | ||
|
|
||
| | Prefix | Purpose | | ||
| |----------------|---------------------------------------------------------------------| | ||
| | `sdk/*` | Reusable building blocks (IR, Compose UI, IntelliJ PSI, utils) | | ||
| | `components/*` | Core pipeline: parsers & generators; have public ABI tracked | | ||
| | `tools/*` | End-user deliverables: idea-plugin, cli, gradle-plugin, compose-app | | ||
|
|
||
| ## Developer Workflows | ||
|
|
||
| ```bash | ||
| # Verify before committing | ||
| ./gradlew test | ||
| ./gradlew spotlessCheck | ||
| ./gradlew checkLegacyAbi # ABI compatibility check for components/* | ||
|
|
||
| # Fix formatting | ||
| ./gradlew spotlessApply | ||
|
|
||
| # Update ABI snapshots after intentional API changes | ||
| ./gradlew updateLegacyAbi | ||
|
|
||
| # IDEA plugin | ||
| ./gradlew buildPlugin # produces tools/idea-plugin/build/distributions/ | ||
| ./gradlew runIde # launches sandbox IDE | ||
|
|
||
| # Web / WASM | ||
| ./gradlew tools:compose-app:wasmJsBrowserDevelopmentRun | ||
|
|
||
| # Coverage | ||
| ./gradlew components:test:coverage:koverLog | ||
| ./gradlew components:test:coverage:koverHtmlReport | ||
| ``` | ||
|
|
||
| **Java 21+ is required** (`settings.gradle.kts` enforces this at configuration time). | ||
|
|
||
| ## Code Style | ||
|
|
||
| - **ktlint** via Spotless on all `src/**/*.kt`. Run `./gradlew spotlessApply` before pushing. | ||
| - Compose rules enforced: Material2 disallowed (`compose_disallow_material2 = true`), preview naming required (suffix | ||
| strategy), lambda-param-event-trailing disabled. | ||
| - KotlinGradle files also linted. | ||
|
|
||
| ## Convention Plugins (build-logic) | ||
|
|
||
| Every module picks exactly one of: | ||
|
|
||
| - `alias(libs.plugins.valkyrie.jvm)` β JVM-only library | ||
| - `alias(libs.plugins.valkyrie.kmp)` β Kotlin Multiplatform (JVM + wasmJs targets) | ||
| - `alias(libs.plugins.valkyrie.compose)` β adds Compose compiler | ||
|
|
||
| Plus optional: `valkyrie.abi` (ABI tracking), `valkyrie.kover` (coverage). | ||
|
|
||
| ## Key Files | ||
|
|
||
| - `sdk/ir/core/src/commonMain/.../IrImageVector.kt` β central domain model | ||
| - `components/parser/unified/src/commonMain/.../SvgXmlParser.kt` β unified parser entry point | ||
| - `components/generator/kmp/imagevector/src/commonMain/.../ImageVectorGenerator.kt` β KMP generator | ||
| - `sdk/shared/src/commonMain/.../ValkyrieMode.kt` β Simple vs IconPack mode | ||
| - `gradle/libs.versions.toml` β main version catalog; `gradle/cli.versions.toml`, `gradle/gradle.versions.toml`, | ||
| `gradle/plugin.versions.toml` for tool-specific versions | ||
| - `tools/idea-plugin/CHANGELOG.md` β updated via `./gradlew tools:idea-plugin:patchChangelog` | ||
|
|
||
| ## IDEA Plugin Specifics | ||
|
|
||
| - Targets IntelliJ IDEA 2025.3.3 (`sinceBuild = "253.31033.145"`, `untilBuild` is unbounded). | ||
| - Bundled Kotlin/Coroutines/Compose are excluded from the plugin ZIP (classpath clash workaround). | ||
| - Signing credentials read from env vars: `CERTIFICATE_CHAIN`, `PRIVATE_KEY`, `PRIVATE_KEY_PASSWORD`. | ||
| - Publish token: `PUBLISH_TOKEN`. | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.