-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
93 lines (73 loc) · 2.27 KB
/
Copy pathbuild.gradle.kts
File metadata and controls
93 lines (73 loc) · 2.27 KB
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
import org.jetbrains.intellij.platform.gradle.IntelliJPlatformType
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
// https://plugins.jetbrains.com/docs/intellij/api-changes-list-2024.html
plugins {
//id("java")
//https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin.html#usage
id("org.jetbrains.intellij.platform") version "2.2.0"
// https://kotlinlang.org/docs/gradle-configure-project.html
kotlin("jvm") version "2.1.0"
}
group = "org.intellij.sdk"
java {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}
// https://docs.gradle.org/current/userguide/toolchains.html
tasks.withType<KotlinCompile>().configureEach {
compilerOptions {
jvmTarget.set(JvmTarget.JVM_21)
}
}
tasks.withType<JavaCompile>().configureEach {
javaCompiler = javaToolchains.compilerFor {
languageVersion = JavaLanguageVersion.of(21)
}
}
repositories {
mavenCentral()
intellijPlatform {
defaultRepositories()
}
}
sourceSets {
main {
java {
srcDirs("src/main/gen")
}
}
}
dependencies {
testImplementation("junit:junit:4.13.2")
implementation(kotlin("stdlib-jdk8"))
intellijPlatform {
// https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-dependencies-extension.html
intellijIdeaCommunity("2024.3")
//instrumentationTools() // deprecated
// https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-extension.html#intellijPlatform-pluginVerification
pluginVerifier()
}
}
// https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin-extension.html#intellijPlatform-pluginVerification-ides
intellijPlatform {
pluginVerification {
ides {
ide(IntelliJPlatformType.IntellijIdeaCommunity, "2024.3")
recommended()
}
}
}
tasks {
buildSearchableOptions {
enabled = false
}
// https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html?from=jetbrains.org
patchPluginXml {
//version = "${project.version}"
//sinceBuild.set("232")
}
}
kotlin {
jvmToolchain(21)
}