-
Notifications
You must be signed in to change notification settings - Fork 29
Add Toml & Edit Struct Name #34
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 refactors a Kotlin compiler plugin template by renaming project modules from generic names to more descriptive names with a "template-" prefix and modernizing the build configuration to use Gradle version catalogs.
Key changes:
- Renames modules from
compiler-plugin,gradle-plugin, andplugin-annotationstotemplate-compiler-plugin,template-gradle-plugin, andtemplate-plugin-annotations - Migrates plugin declarations in build files from string-based to version catalog aliases
- Adds complete implementation of compiler plugin infrastructure including FIR extension, IR generation, Gradle plugin, and test fixtures
Reviewed Changes
Copilot reviewed 10 out of 38 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| settings.gradle.kts | Updates module names to use "template-" prefix |
| build.gradle.kts | Reorganizes plugin declarations and updates references to use version catalog |
| gradle/libs.versions.toml | Adds comprehensive library and plugin definitions with version catalog structure |
| template-plugin-annotations/build.gradle.kts | Converts plugin declarations to use version catalog aliases |
| template-plugin-annotations/src/.../SomeAnnotation.kt | Adds new annotation class for plugin |
| template-plugin-annotations/api/plugin-annotations.api | Adds binary compatibility validation API signature |
| template-gradle-plugin/build.gradle.kts | Updates to use version catalog and corrects project references |
| template-gradle-plugin/src/.../SimpleGradlePlugin.kt | Implements Gradle plugin support for compiler plugin |
| template-gradle-plugin/src/.../SimpleGradleExtension.kt | Adds extension class for Gradle plugin configuration |
| template-compiler-plugin/build.gradle.kts | Migrates dependencies to version catalog and updates project references |
| template-compiler-plugin/src/.../SimplePluginComponentRegistrar.kt | Implements compiler plugin registrar |
| template-compiler-plugin/src/.../SimplePluginRegistrar.kt | Registers FIR extensions |
| template-compiler-plugin/src/.../SimpleCommandLineProcessor.kt | Implements command line processor for plugin |
| template-compiler-plugin/src/.../fir/SimpleClassGenerator.kt | Implements FIR declaration generation extension |
| template-compiler-plugin/src/.../ir/SimpleIrGenerationExtension.kt | Implements IR generation extension |
| template-compiler-plugin/src/.../ir/SimpleIrBodyGenerator.kt | Generates IR body for synthetic declarations |
| template-compiler-plugin/src/.../ir/AbstractTransformerForGenerator.kt | Provides base transformer for IR generation |
| template-compiler-plugin/test-fixtures/.../services/* | Adds test configuration services |
| template-compiler-plugin/test-fixtures/.../runners/* | Adds abstract test runner classes |
| template-compiler-plugin/test-fixtures/.../GenerateTests.kt | Updates test generation paths |
| template-compiler-plugin/testData/* | Adds test data files and expected output |
| template-compiler-plugin/test-gen/* | Adds generated test classes |
| template-compiler-plugin/resources/META-INF/services/* | Adds service provider configuration files |
| compiler-plugin/test-gen/* | Updates generated test file paths in legacy location |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| kotlin-multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" } | ||
| build-config = { id = "com.github.gmazzo.buildconfig", version.ref = "build-config" } | ||
| binary-compatibility-validator = { id = "org.jetbrains.kotlinx.binary-compatibility-validator", version.ref = "bcv" } | ||
| kotlin-binary-compatibility-validator = { id = "org.jetbrains.kotlinx.binary-compatibility-validator", version.ref = "kotlin-binaryCompatibilityValidator"} |
Copilot
AI
Nov 10, 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.
Missing space after closing brace. Should be kotlin-binary-compatibility-validator = { id = "org.jetbrains.kotlinx.binary-compatibility-validator", version.ref = "kotlin-binaryCompatibilityValidator" }
| kotlin-binary-compatibility-validator = { id = "org.jetbrains.kotlinx.binary-compatibility-validator", version.ref = "kotlin-binaryCompatibilityValidator"} | |
| kotlin-binary-compatibility-validator = { id = "org.jetbrains.kotlinx.binary-compatibility-validator", version.ref = "kotlin-binaryCompatibilityValidator" } |
| build-config = { id = "com.github.gmazzo.buildconfig", version.ref = "build-config" } | ||
| binary-compatibility-validator = { id = "org.jetbrains.kotlinx.binary-compatibility-validator", version.ref = "bcv" } | ||
| kotlin-binary-compatibility-validator = { id = "org.jetbrains.kotlinx.binary-compatibility-validator", version.ref = "kotlin-binaryCompatibilityValidator"} | ||
| buildconfig = { id = "com.github.gmazzo.buildconfig", version.ref = "buildconfig"} |
Copilot
AI
Nov 10, 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.
Missing space after closing brace. Should be buildconfig = { id = "com.github.gmazzo.buildconfig", version.ref = "buildconfig" }
| buildconfig = { id = "com.github.gmazzo.buildconfig", version.ref = "buildconfig"} | |
| buildconfig = { id = "com.github.gmazzo.buildconfig", version.ref = "buildconfig" } |
| kotlin-annotations-jvm = { group = "org.jetbrains.kotlin", name = "kotlin-annotations-jvm", version.ref = "kotlin" } | ||
| kotlin-compiler = { group = "org.jetbrains.kotlin", name = "kotlin-compiler", version.ref = "kotlin" } | ||
| kotlin-reflect = { group = "org.jetbrains.kotlin", name = "kotlin-reflect", version.ref = "kotlin" } | ||
| kotlin-gradle-plugin-api = { group = "org.jetbrains.kotlin", name = "kotlin-gradle-plugin-api", version.ref = "kotlin" } |
Copilot
AI
Nov 10, 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.
Extra trailing space after kotlin-gradle-plugin-api. Consider removing the space for consistency with other library declarations.
| kotlin-gradle-plugin-api = { group = "org.jetbrains.kotlin", name = "kotlin-gradle-plugin-api", version.ref = "kotlin" } | |
| kotlin-gradle-plugin-api = { group = "org.jetbrains.kotlin", name = "kotlin-gradle-plugin-api", version.ref = "kotlin" } |
bnorm
left a comment
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.
I like the Toml + Gradle updates here but I'm still thinking about the subproject renaming part. If you can separate these changes into different PRs, I can merge the Toml changes and provide some feedback on the renaming.


Plugins and dependencies are now managed uniformly using TOML, including Gradle's built-in plugins.
File names have been renamed for easier searching and a more aesthetically pleasing appearance when prefixes are the same.