-
Notifications
You must be signed in to change notification settings - Fork 5
/
build.gradle.kts
104 lines (89 loc) · 2.99 KB
/
build.gradle.kts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
plugins {
id("java")
id("org.jetbrains.intellij") version "1.17.3"
id("org.jetbrains.changelog") version "2.2.0"
kotlin("jvm") version "2.0.0"
kotlin("plugin.serialization") version "2.0.0"
}
group = "ai.devchat"
version = "0.2.9"
repositories {
mavenCentral()
}
dependencies {
implementation("com.alibaba:fastjson:2.0.51")
implementation("com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:2.17.1")
implementation("com.fasterxml.jackson.module:jackson-module-kotlin:2.17.1")
implementation(kotlin("stdlib-jdk8"))
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.1")
implementation("io.ktor:ktor-server-core:2.3.11") {exclude("org.slf4j")}
implementation("io.ktor:ktor-server-netty:2.3.11") {exclude("org.slf4j")}
implementation("io.ktor:ktor-server-cors:2.3.11") {exclude("org.slf4j")}
implementation("io.ktor:ktor-features:1.6.8") {exclude("org.slf4j")}
implementation("io.ktor:ktor-serialization-kotlinx-json:2.3.11") {exclude("org.slf4j")}
implementation("io.ktor:ktor-server-content-negotiation:2.3.11") {exclude("org.slf4j")}
implementation("com.squareup.okhttp3:okhttp:4.12.0")
}
// Configure Gradle Changelog Plugin - read more: https://github.com/JetBrains/gradle-changelog-plugin
changelog {
groups.empty()
}
// Configure Gradle IntelliJ Plugin
// Read more: https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html
intellij {
version.set("2023.2.5")
type.set("IC") // Target IDE Platform
plugins.set(listOf(/* Plugin Dependencies */))
}
tasks.register<Copy>("copyTools") {
from(layout.projectDirectory.dir("tools")) {
include(
"gpt-token/**",
"micromamba-*/**",
"python-3.11.6-embed-amd64/**",
"site-packages/**",
"replace.sh"
)
}
into(layout.buildDirectory.dir("tmp/copyTools/tools"))
}
tasks.register<Copy>("copyWorkflows") {
from(layout.projectDirectory.dir("workflows")) { exclude(".git/**", ".gitignore") }
into(layout.buildDirectory.dir("tmp/copyWorkflows/workflows"))
}
tasks.register<Exec>("buildGUI") {
commandLine("yarn", "idea")
workingDir(layout.projectDirectory.dir("gui"))
}
sourceSets {
main {
resources {
srcDir(layout.buildDirectory.dir("tmp/copyTools"))
srcDir(layout.buildDirectory.dir("tmp/copyWorkflows"))
}
}
}
tasks {
// Set the JVM compatibility versions
withType<JavaCompile> {
}
patchPluginXml {
sinceBuild.set("223")
untilBuild.set("241.*")
}
signPlugin {
certificateChain.set(System.getenv("CERTIFICATE_CHAIN"))
privateKey.set(System.getenv("PRIVATE_KEY"))
password.set(System.getenv("PRIVATE_KEY_PASSWORD"))
}
processResources {
dependsOn("copyTools", "copyWorkflows")
}
publishPlugin {
token.set(System.getenv("INTELLIJ_PUBLISH_TOKEN"))
channels.set(listOf("stable", "eap"))
}
}
kotlin {
jvmToolchain(17)
}