-
Notifications
You must be signed in to change notification settings - Fork 8
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
Support adding dependencies to an existing Ktor project #44
Conversation
…shells Use group/name and module attributes based on existing Ktor dependencies Small fixes Accept variable number of modules to add Allow adding client dependencies and refactoring Extract into function getting the TOML catalog path Refactor checking if dependency is already exist Add a Ktor dependency to a list where versions stored in Kotlin variables Check if Ktor dep with version variable does already exist Consider platform suffixes of other Ktor dependencies Use the same variable reference for the dependency if any dependencies have version got by a delegate Print messages about not supported Maven and Groovy DSL projects Print a message that adding dependency to a KMP project isn't supported Print info messages when configuration isn't supported for adding a Ktor dependency Print friendly message to file a bug on panicking Add prompt to ask if changes should be applied to apply the changes Add a case when no dependencies in build and no libraries in toml Look for serialization plugin with full ID Add Ktor dependency with a proper suffix taken from other Ktor dependencies Add raw Ktor test dependency Add raw Ktor dependency when Ktor Gradle plugin is defined Fix parsing Gradle files without a new line at EOF Check if serialization plugin is already defined Add serialization plugin when a dependency requires it Refactor TOML parsing Refactor Kotlin parsing WIP Add a Ktor dependency when no other dependencies and no catalog file Check if a hardcoded dependency is present with BOM Fix the BOM test and distinguish Ktor shared dependencies Add dependency for case when BOM is present Check if the given Ktor dependency is already defined Add a case when no Ktor versions in the toml file Add a case when versions file doesn't contain any Ktor dependencies Add shared dependencies and improve finding by edit distance Test adding dependencies and add a simple scenario Use MavenCoords struct KTOR-7749 Find Ktor maven coordinates by module name or an associated symbol KTOR-7749 Add basic implementation for adding a Ktor dependency into version catalog
…module and for completions respectively
…at syntax errors as fatal ones.
Could you add a few screenshots here? I'm curious to see what the diff looks like etc. |
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.
Very cool 👍
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.
Looks good! Some small adjustments to the texts below.
https://youtrack.jetbrains.com/issue/KTOR-7749
The PR seems huge, but it's not. Most of the files are generated by ANTLR or are part of the test projects.
This PR adds the
add
command, which can be used to add Ktor dependencies to a Gradle project.The usage instructions can be found in the README.md.
How it works
build.gradle.kts
and version catalog files./project/settings
endpoint.artifacts/{version}/search
endpoint to search for the Ktor artifacts by a given name.build.gradle.kts
and the version catalog files (if it exists).