Skip to content

Commit

Permalink
featfeat(build): refactor(build): refactor project structure and proj…
Browse files Browse the repository at this point in the history
…ect structure and dependencies #236

Ref dependencies

Refactor the projectactor the project structure by introducing structure by introducing a new module a new module named 'core named "core'. All other". Update the modules now depend dependencies of all on this 'core' other modules to module depend on this instead of the new "core" module instead of the root root project. project Also., Also update the path for the plugin description file and add, adjust the path of the new dependencies to the 'core' module. plugin description file and add new dependencies to the "core" module.
  • Loading branch information
phodal committed Sep 26, 2024
1 parent b0724fe commit 1a5dd76
Show file tree
Hide file tree
Showing 2 changed files with 90 additions and 20 deletions.
108 changes: 88 additions & 20 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,6 @@ project(":") {
}
intellijPlugins(pluginList)

pluginModule(implementation(project(":")))
pluginModule(implementation(project(":java")))
pluginModule(implementation(project(":kotlin")))
pluginModule(implementation(project(":pycharm")))
Expand Down Expand Up @@ -330,7 +329,6 @@ project(":") {
testImplementation("junit:junit:4.13.2")
testRuntimeOnly("org.junit.vintage:junit-vintage-engine:5.9.3")

kover(project(":"))
kover(project(":cpp"))
// kover(project(":csharp"))
kover(project(":goland"))
Expand Down Expand Up @@ -379,7 +377,7 @@ project(":") {
}

patchPluginXml {
pluginDescription.set(provider { file("description.html").readText() })
pluginDescription.set(provider { file("src/description.html").readText() })

changelog {
version.set(properties("pluginVersion"))
Expand Down Expand Up @@ -413,14 +411,84 @@ project(":") {
}
}

project(":core") {
repositories {
intellijPlatform {
defaultRepositories()
jetbrainsRuntime()
}
}

dependencies {
intellijPlatform {
intellijIde(prop("ideaVersion"))
intellijPlugins(ideaPlugins)
testFramework(TestFrameworkType.Bundled)
}

implementation("com.theokanning.openai-gpt3-java:service:0.18.2")
implementation("com.squareup.retrofit2:converter-jackson:2.9.0")
implementation("com.squareup.retrofit2:converter-gson:2.9.0")
implementation("com.fasterxml.jackson.module:jackson-module-kotlin:2.14.2")
implementation("com.fasterxml.jackson.core:jackson-databind:2.14.2")

implementation("org.commonmark:commonmark:0.21.0")
implementation("org.commonmark:commonmark-ext-gfm-tables:0.21.0")

implementation("org.yaml:snakeyaml:2.2")

implementation("com.nfeld.jsonpathkt:jsonpathkt:2.0.1")

implementation("org.jetbrains:markdown:0.6.1")
// implementation(libs.kotlinx.serialization.json)

// chocolate factory
// follow: https://onnxruntime.ai/docs/get-started/with-java.html
// implementation("com.microsoft.onnxruntime:onnxruntime:1.18.0")
// implementation("ai.djl.huggingface:tokenizers:0.29.0")

implementation("cc.unitmesh:cocoa-core:1.0.0")
implementation("cc.unitmesh:document:1.0.0")

// kanban
implementation("org.kohsuke:github-api:1.314")
implementation("org.gitlab4j:gitlab4j-api:5.3.0")

// template engine
implementation("org.apache.velocity:velocity-engine-core:2.3")

// http request/response
implementation("com.fasterxml.jackson.module:jackson-module-kotlin:2.14.2")

// token count
implementation("com.knuddels:jtokkit:1.0.0")

implementation("org.apache.commons:commons-text:1.12.0")

// junit
testImplementation("io.kotest:kotest-assertions-core:5.7.2")
testImplementation("junit:junit:4.13.2")
testRuntimeOnly("org.junit.vintage:junit-vintage-engine:5.9.3")
}

task("resolveDependencies") {
doLast {
rootProject.allprojects
.map { it.configurations }
.flatMap { it.filter { c -> c.isCanBeResolved } }
.forEach { it.resolve() }
}
}
}

project(":pycharm") {
dependencies {
intellijPlatform {
intellijIde(prop("ideaVersion"))
intellijPlugins(ideaPlugins + pycharmPlugins)
}

implementation(project(":"))
implementation(project(":core"))
}
}

Expand All @@ -432,7 +500,7 @@ project(":java") {
intellijPlugins(ideaPlugins)
}

implementation(project(":"))
implementation(project(":core"))
}
}

Expand All @@ -444,7 +512,7 @@ project(":javascript") {
intellijPlugins(javaScriptPlugins)
}

implementation(project(":"))
implementation(project(":core"))
}
}

Expand All @@ -455,7 +523,7 @@ project(":kotlin") {
intellijPlugins(ideaPlugins)
}

implementation(project(":"))
implementation(project(":core"))
implementation(project(":java"))
}
}
Expand All @@ -467,7 +535,7 @@ project(":scala") {
intellijPlugins(ideaPlugins + scalaPlugin)
}

implementation(project(":"))
implementation(project(":core"))
implementation(project(":java"))
}
}
Expand All @@ -479,7 +547,7 @@ project(":rust") {
intellijPlugins(rustPlugins)
}

implementation(project(":"))
implementation(project(":core"))
}
}

Expand All @@ -494,7 +562,7 @@ project(":cpp") {
intellijPlugins(cppPlugins)
}

implementation(project(":"))
implementation(project(":core"))
}
}

Expand All @@ -505,7 +573,7 @@ project(":cpp") {
// intellijPlugins(riderPlugins)
// }
//
// implementation(project(":"))
// implementation(project(":core"))
// }
//}

Expand All @@ -516,7 +584,7 @@ project(":goland") {
intellijPlugins(prop("goPlugin").split(',').map(String::trim).filter(String::isNotEmpty))
}

implementation(project(":"))
implementation(project(":core"))
}
}

Expand All @@ -526,7 +594,7 @@ project(":exts:ext-database") {
intellijIde(prop("ideaVersion"))
intellijPlugins(ideaPlugins + "com.intellij.database")
}
implementation(project(":"))
implementation(project(":core"))
}
}

Expand All @@ -537,7 +605,7 @@ project(":exts:ext-android") {
intellijPlugins((ideaPlugins + prop("androidPlugin").ifBlank { "" }).filter(String::isNotEmpty))
}

implementation(project(":"))
implementation(project(":core"))
}
}

Expand All @@ -549,7 +617,7 @@ project(":exts:ext-harmonyos") {
}


implementation(project(":"))
implementation(project(":core"))
}
}

Expand All @@ -560,7 +628,7 @@ project(":exts:ext-git") {
intellijPlugins(ideaPlugins + "Git4Idea")
}

implementation(project(":"))
implementation(project(":core"))
implementation("cc.unitmesh:git-commit-message:0.4.6")
}
}
Expand All @@ -572,7 +640,7 @@ project(":exts:ext-http-client") {
intellijPlugins(ideaPlugins + "com.jetbrains.restClient")
}

implementation(project(":"))
implementation(project(":core"))
}
}

Expand All @@ -582,7 +650,7 @@ project(":local-bundle") {
intellijIde(prop("ideaVersion"))
}

implementation(project(":"))
implementation(project(":core"))
}
}

Expand All @@ -593,7 +661,7 @@ project(":exts:ext-terminal") {
intellijPlugins(ideaPlugins + "org.jetbrains.plugins.terminal")
}

implementation(project(":"))
implementation(project(":core"))
}

sourceSets {
Expand Down Expand Up @@ -627,7 +695,7 @@ project(":exts:devins-lang") {
intellijPlugins(ideaPlugins + "org.intellij.plugins.markdown" + "com.jetbrains.sh" + "Git4Idea")
}

implementation(project(":"))
implementation(project(":core"))
implementation(project(":exts:ext-git"))
}

Expand Down
2 changes: 2 additions & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ rootProject.name = "AutoDev-Intellij"

enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")

include("core");

include(
"pycharm",
"java",
Expand Down

0 comments on commit 1a5dd76

Please sign in to comment.