-
Notifications
You must be signed in to change notification settings - Fork 31
/
build.gradle.kts
111 lines (96 loc) · 3.06 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
105
106
107
108
109
110
111
import org.jetbrains.intellij.platform.gradle.TestFrameworkType
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
buildscript {
val kotlinVersion = "2.0.20"
repositories {
mavenCentral()
}
dependencies {
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion")
}
}
plugins {
id("java")
id("org.jetbrains.intellij.platform") version "2.1.0"
id("org.jetbrains.kotlin.jvm") version "2.0.20"
id("org.jlleitschuh.gradle.ktlint") version "12.1.2"
id("jvm-test-suite")
}
java {
sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_17
}
val pluginVersion = "2.0.0"
intellijPlatform {
buildSearchableOptions = true
instrumentCode = true
projectName = project.name
pluginConfiguration {
id = "com.suusan2go.kotlin-fill-class"
version = pluginVersion
name = "kotlin-fill-class"
ideaVersion {
sinceBuild = "242.21829.142"
untilBuild = null
}
}
publishing {
token = System.getenv("TOKEN")
}
}
group = "com.github.suusan2go.kotlin-fill-class"
version = pluginVersion
repositories {
mavenCentral()
maven("https://cache-redirector.jetbrains.com/maven.pkg.jetbrains.space/kotlin/p/kotlin/kotlin-ide-plugin-dependencies")
intellijPlatform {
defaultRepositories()
}
}
dependencies {
intellijPlatform {
intellijIdeaCommunity("2024.2.4")
bundledPlugin("com.intellij.java")
bundledPlugin("org.jetbrains.kotlin")
instrumentationTools()
testFramework(TestFrameworkType.Platform)
}
implementation("org.jetbrains.kotlin:kotlin-stdlib")
// Lorem : An extremely useful Lorem Ipsum generator for Java!
implementation("com.thedeanda:lorem:2.1")
testImplementation(platform("org.junit:junit-bom:5.11.3"))
testImplementation("org.junit.jupiter:junit-jupiter")
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
testRuntimeOnly("junit:junit:4.13.2")
testImplementation("io.mockk:mockk:1.13.13")
testImplementation("com.intellij.platform:kotlinx-coroutines-core-jvm:1.8.0-intellij-9")
}
tasks.named<KotlinCompile>("compileKotlin") {
compilerOptions.jvmTarget = JvmTarget.JVM_17
}
tasks.named<KotlinCompile>("compileTestKotlin") {
compilerOptions.jvmTarget = JvmTarget.JVM_17
}
tasks.named<Test>("test") {
useJUnitPlatform()
if (System.getProperty("idea.kotlin.plugin.use.k2") == "true") {
include("com/github/suusan2go/kotlinfillclass/inspections/k2/**/*")
systemProperty("idea.kotlin.plugin.use.k2", true)
} else {
exclude("com/github/suusan2go/kotlinfillclass/inspections/k2/**/*")
}
}
val runK2 by intellijPlatformTesting.runIde.creating {
task {
systemProperty("idea.kotlin.plugin.use.k2", true)
}
}
kotlin {
compilerOptions {
freeCompilerArgs.add("-Xcontext-receivers")
}
compilerOptions {
apiVersion = org.jetbrains.kotlin.gradle.dsl.KotlinVersion.KOTLIN_2_0
}
}