From 6352326f8964603ce91ff177924b719190aeefca Mon Sep 17 00:00:00 2001 From: Matthew Pope Date: Thu, 19 Sep 2024 16:07:28 -0700 Subject: [PATCH] Require JDK 17 and fix test dependencies --- build.gradle.kts | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 259d7fc..fc5148f 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,10 +1,10 @@ import org.jetbrains.intellij.platform.gradle.IntelliJPlatformType import org.jetbrains.intellij.platform.gradle.models.ProductRelease +import org.jetbrains.intellij.platform.gradle.TestFrameworkType import plugin.PluginDescriptor import plugin.PluginDescriptor.KotlinOptions import plugin.PlatformType import org.jetbrains.kotlin.gradle.tasks.KotlinCompile -import org.jetbrains.kotlin.gradle.plugin.KotlinSourceSet buildscript { repositories { @@ -12,6 +12,12 @@ buildscript { } } +java { + toolchain { + languageVersion = JavaLanguageVersion.of(17) + } +} + plugins { kotlin("jvm") id("org.jetbrains.intellij.platform") version "2.0.1" @@ -22,7 +28,7 @@ repositories { intellijPlatform { defaultRepositories() - } + } } val plugins = listOf( @@ -101,7 +107,12 @@ dependencies { bundledPlugins(descriptor.bundledDependencies) pluginVerifier() instrumentationTools() + + testFramework(TestFrameworkType.Platform) } + + testImplementation("org.junit.jupiter:junit-jupiter:5.7.1") + testRuntimeOnly("org.junit.vintage:junit-vintage-engine") } intellijPlatform { @@ -142,8 +153,8 @@ intellijPlatform { sourceSets { main { - withConvention(KotlinSourceSet::class) { - kotlin.srcDir("src/${descriptor.sourceFolder}/kotlin") + kotlin { + srcDir("src/${descriptor.sourceFolder}/kotlin") } resources {