-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.gradle.kts
77 lines (68 loc) · 2.19 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
import org.gradle.internal.classpath.Instrumented.systemProperty
plugins {
id("java")
id("org.jetbrains.intellij") version "1.7.0"
}
group = "com.darksheep"
version = "2023-0620-02"
repositories {
/*上述代码将阿里云Maven仓库设置为优先级最高,
从而加快Gradle的构建速度。请注意,通常只需将 "public" 仓库添加到 repositories 中,
因为这个仓库会根据请求自动代理其他仓库(例如 jcenter、google 等)。
但是,为了确保更好的兼容性和分级,您也可以用上述配置添加所有阿里云Maven仓库*/
mavenLocal()
mavenCentral()
maven {
setUrl("https://maven.aliyun.com/repository/public")
}
maven {
setUrl("https://maven.aliyun.com/repository/jcenter")
}
maven {
setUrl("https://maven.aliyun.com/repository/gradle-plugin")
}
maven {
setUrl("https://maven.aliyun.com/repository/google")
}
maven {
setUrl("https://maven.aliyun.com/repository/spring")
}
maven {
setUrl("https://maven.aliyun.com/repository/spring-plugin")
}
}
dependencies {
implementation("org.xerial:sqlite-jdbc:3.21.0.1")
/* implementation("com.intellij:psi:2021.3.0")
implementation("com.intellij:java-psi:2021.3.0")*/
}
// Configure Gradle IntelliJ Plugin
// Read more: https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html
intellij {
version.set("2021.3")
type.set("IC") // Target IDE Platform
//这里应用了java插件 java语言类型才不会报错
plugins.set(listOf("java"))
//com.intellij.java
}
tasks {
// Set the JVM compatibility versions
withType<JavaCompile> {
sourceCompatibility = "11"
targetCompatibility = "11"
options.encoding = "UTF-8"
}
patchPluginXml {
sinceBuild.set("213")
untilBuild.set("243.*")
}
signPlugin {
certificateChain.set(System.getenv("CERTIFICATE_CHAIN"))
privateKey.set(System.getenv("PRIVATE_KEY"))
password.set(System.getenv("PRIVATE_KEY_PASSWORD"))
}
publishPlugin {
token.set(System.getenv("PUBLISH_TOKEN"))
}
systemProperty("file.encoding", "UTF-8")
}