unit-mesh / auto-dev

🧙‍AutoDev: The AI-powered coding wizard with multilingual support 🌐, auto code generation 🏗️, and a helpful bug-slaying assistant 🐞! Customizable prompts 🎨 and a magic Auto Dev/Testing/Document/Agent feature 🧪 included! 🚀
https://ide.unitmesh.cc/
Mozilla Public License 2.0
2.62k stars 303 forks source link

Support Maven build #164

Open ymli0215 opened 2 months ago

ymli0215 commented 2 months ago

從JavaAutoTestService看到有放一個 todo: add maven ?? 測試起來應該也還沒有支援Maven吧??

請問我想要動手增加,除了UI部分 應該是針對哪幾隻程式去做調整比較好呢?? 不然我就是一個一個慢慢查有gradle的蹤影,同時增加maven處理 這樣怕有遺漏,也怕沒有效率

phodal commented 2 months ago

现在相关的任务应该是:

ymli0215 commented 2 months ago

抱歉,因為真沒有開發過,想問個基本問題 就是我要import新的程式,是怎樣做的

例如 JavaAutoTestService.kt有 import GradleRunConfiguration,他要怎樣做才能import成功?? 我目前想要增加支援Maven,所以想import org.jetbrains.idea.maven.execution.MavenRunConfiguration 結果不知道怎樣去設定相關環境.. @@

補充一下,我目前是透過vscode改東西後,自己透過gradle去build的 還是說應該要用intellij開發,他就會自動匯入相關的jar?

phodal commented 2 months ago

IDEA 的插件,如果依赖于特定的其它插件,比如 maven,需要手动添加依赖。

这里应该有类似于 org.jetbrains.plugins.gradle 的依赖:

https://github.com/unit-mesh/auto-dev/blob/3e890afd1d1fc8e1853481bf89c0d6c6e45c13bd/build.gradle.kts#L94-L100

随后再 Gradle Sync 一下试试。

phodal commented 2 months ago

我刚大概看了一下 Maven 的 plugin 名字应该是:org.jetbrains.idea.maven

至于如何创建的逻辑,我还没研究过,可以参考:

https://github.com/JetBrains/intellij-community/blob/9b5e8782f3e31be25eb2a38bbb31edab58cf36c4/plugins/maven/src/main/java/org/jetbrains/idea/maven/execution/MavenRunAnythingProvider.kt

c913168497 commented 2 months ago

image 我想你说的是这个 image 你可以把命令改为其它的

phodal commented 2 months ago

@c913168497 你看你都写好了,不来个 PR 吗,哈哈哈

c913168497 commented 2 months ago

还没想好完整的功能设计啊 哈哈, 我目前都是脚本功能形式

phodal commented 2 months ago

哈哈,边写边想