Skip to content

Commit 524d2ce

Browse files
committed
feat: add code
1 parent cb49c79 commit 524d2ce

375 files changed

Lines changed: 53934 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

extensions/intellij/.checkignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
com.*
2+
org.*

extensions/intellij/.gitignore

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
.gradle
2+
*.sw?
3+
.#*
4+
*#
5+
*~
6+
/build
7+
/code
8+
.classpath
9+
.project
10+
.settings
11+
.metadata
12+
.factorypath
13+
.recommenders
14+
bin
15+
build
16+
lib/
17+
target
18+
.springBeans
19+
interpolated*.xml
20+
dependency-reduced-pom.xml
21+
build.log
22+
_site/
23+
.*.md.html
24+
manifest.yml
25+
MANIFEST.MF
26+
settings.xml
27+
activemq-data
28+
overridedb.*
29+
*.iml
30+
*.ipr
31+
*.iws
32+
.idea
33+
*.jar
34+
.DS_Store
35+
dump.rdb
36+
transaction-logs
37+
.flattened-pom.xml
38+
/.run/
39+
out
40+
src/main/resources/static/*

extensions/intellij/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<!-- Plugin description -->
2+
3+
<h1 >VoidMuse</h1>
4+
VoidMuse is an AI-powered IDE plugin that integrates open-source components to minimize development costs.
5+
Our mission is to empower every developer to build their own AI tools effortlessly through carefully curated open-source solutions.
6+
7+
<!-- Plugin description end -->
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
import org.jetbrains.changelog.markdownToHTML
2+
3+
4+
fun properties(key: String): Provider<String> {
5+
return providers.gradleProperty(key)
6+
}
7+
8+
plugins {
9+
id("java")
10+
id("idea")
11+
id("org.jetbrains.intellij") version "1.17.4"
12+
id("org.jetbrains.kotlin.jvm") version "1.9.21"
13+
id("org.jetbrains.changelog") version "2.2.1"
14+
}
15+
16+
group = properties("pluginGroup").get()
17+
version = properties("pluginVersion").get() + "-" + properties("pluginSinceBuild").get()
18+
19+
java {
20+
sourceCompatibility = JavaVersion.VERSION_17
21+
targetCompatibility = JavaVersion.VERSION_17
22+
}
23+
24+
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
25+
kotlinOptions {
26+
jvmTarget = "17"
27+
}
28+
}
29+
30+
repositories {
31+
mavenCentral()
32+
gradlePluginPortal()
33+
}
34+
35+
intellij {
36+
pluginName.set(properties("pluginName"))
37+
version.set(properties("platformVersion"))
38+
type.set(properties("platformType"))
39+
plugins.set(listOf("java", "PythonCore:243.24978.46"))//, "PythonCore:241.14494.240"
40+
}
41+
42+
sourceSets {
43+
val main by getting {
44+
kotlin {
45+
srcDirs("src/main/kotlin") // 添加 Kotlin 源代码目录
46+
}
47+
java {
48+
srcDirs("src/main/java") // 添加 Java 源代码目录
49+
}
50+
}
51+
}
52+
53+
dependencies {
54+
implementation("cn.hutool:hutool-all:5.8.24")
55+
implementation("io.github.java-diff-utils:java-diff-utils:4.12")
56+
compileOnly("org.projectlombok:lombok:1.18.30")
57+
implementation("com.jetbrains:ideaIC:2024.3.5")
58+
annotationProcessor("org.projectlombok:lombok:1.18.30")
59+
implementation("com.knuddels:jtokkit:1.1.0")
60+
implementation("io.modelcontextprotocol.sdk:mcp:0.11.3")
61+
// 添加Lucene依赖
62+
implementation("org.apache.lucene:lucene-queryparser:9.12.0")
63+
}
64+
65+
tasks {
66+
verifyPlugin {
67+
enabled = true
68+
}
69+
runPluginVerifier {
70+
enabled = true
71+
}
72+
73+
patchPluginXml {
74+
enabled = true
75+
version.set(properties("pluginVersion").get() + "-" + properties("pluginSinceBuild").get())
76+
sinceBuild.set(properties("pluginSinceBuild"))
77+
untilBuild.set(properties("pluginUntilBuild"))
78+
79+
pluginDescription.set(providers.fileContents(layout.projectDirectory.file("README.md")).asText.map {
80+
val start = "<!-- Plugin description -->"
81+
val end = "<!-- Plugin description end -->"
82+
83+
with(it.lines()) {
84+
if (!containsAll(listOf(start, end))) {
85+
throw GradleException("Plugin description section not found in DESCRIPTION.md:\n$start ... $end")
86+
}
87+
subList(indexOf(start) + 1, indexOf(end)).joinToString("\n").let(::markdownToHTML)
88+
}
89+
})
90+
}
91+
92+
buildPlugin {
93+
enabled = true
94+
}
95+
96+
runIde {
97+
enabled = true
98+
autoReloadPlugins.set(false)
99+
// jdk19以上才支持
100+
systemProperty("org.apache.lucene.store.MMapDirectory.enableMemorySegments", "false")
101+
}
102+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Opt-out flag for bundling Kotlin standard library -> https://jb.gg/intellij-platform-kotlin-stdlib
2+
kotlin.stdlib.default.dependency = false
3+
4+
# Enable Gradle Configuration Cache -> https://docs.gradle.org/current/userguide/configuration_cache.html
5+
org.gradle.configuration-cache = true
6+
7+
# Enable Gradle Build Cache -> https://docs.gradle.org/current/userguide/build_cache.html
8+
org.gradle.caching = true
9+
10+
org.gradle.jvmargs='-Dfile.encoding=UTF-8'
11+
12+
javaVersion = 17
13+
14+
pluginGroup = com.voidmuse.idea.plugin
15+
pluginVersion = 0.0.1
16+
pluginName = VoidMuse
17+
pluginSinceBuild = 241.1
18+
pluginUntilBuild =
19+
platformType = IC
20+
platformVersion = 2024.3.5
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
distributionBase=GRADLE_USER_HOME
2+
distributionPath=wrapper/dists
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
4+
zipStoreBase=GRADLE_USER_HOME
5+
zipStorePath=wrapper/dists

0 commit comments

Comments
 (0)