mirror of
https://github.com/chylex/IntelliJ-IdeaVim.git
synced 2024-11-24 22:42:53 +01:00
71 lines
1.8 KiB
Plaintext
71 lines
1.8 KiB
Plaintext
import org.jetbrains.intellij.platform.gradle.TestFrameworkType
|
|
import org.jetbrains.intellij.platform.gradle.extensions.intellijPlatform
|
|
|
|
plugins {
|
|
java
|
|
kotlin("jvm")
|
|
id("org.jetbrains.intellij.platform.module")
|
|
}
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
|
|
intellijPlatform {
|
|
defaultRepositories()
|
|
}
|
|
}
|
|
|
|
val kotlinVersion: String by project
|
|
val ideaType: String by project
|
|
val ideaVersion: String by project
|
|
val javaVersion: String by project
|
|
|
|
dependencies {
|
|
testImplementation("org.junit.jupiter:junit-jupiter")
|
|
compileOnly("org.jetbrains.kotlin:kotlin-stdlib:$kotlinVersion")
|
|
testImplementation("org.jetbrains.kotlin:kotlin-test:$kotlinVersion")
|
|
testImplementation(testFixtures(project(":"))) // The root project
|
|
testImplementation("org.junit.vintage:junit-vintage-engine:5.10.3")
|
|
|
|
intellijPlatform {
|
|
create(ideaType, ideaVersion)
|
|
testFramework(TestFrameworkType.Platform)
|
|
testFramework(TestFrameworkType.JUnit5)
|
|
instrumentationTools()
|
|
}
|
|
}
|
|
|
|
intellijPlatform {
|
|
buildSearchableOptions = false
|
|
}
|
|
|
|
tasks {
|
|
// This task is disabled because it should be excluded from `gradle test` run (because it's slow)
|
|
// I didn't find a better way to exclude except disabling and defining a new task with a different name
|
|
// Note that useJUnitTestPlatform() is required to prevent red code
|
|
test {
|
|
enabled = false
|
|
useJUnitPlatform()
|
|
}
|
|
|
|
// The `test` task is automatically set up with IntelliJ goodness. A custom test task needs to be configured for it
|
|
val testLongRunning by intellijPlatformTesting.testIde.registering {
|
|
task {
|
|
group = "verification"
|
|
useJUnitPlatform()
|
|
}
|
|
}
|
|
}
|
|
|
|
java {
|
|
toolchain {
|
|
languageVersion.set(JavaLanguageVersion.of(javaVersion))
|
|
}
|
|
}
|
|
|
|
kotlin {
|
|
jvmToolchain {
|
|
languageVersion.set(JavaLanguageVersion.of(javaVersion))
|
|
}
|
|
}
|