diff --git a/.github/workflows/master.yml b/.github/workflows/master.yml index 2acb6a2..1462d09 100644 --- a/.github/workflows/master.yml +++ b/.github/workflows/master.yml @@ -14,17 +14,8 @@ jobs: strategy: matrix: - product: [ "IC-231", "IC-232", "IC-233", "IC-241", "IC-242", "IC-243" ] + product: [ "IC-241", "IC-242", "IC-243" ] include: - - product: "IC-231" - java: "17" - distribution: "temurin" - - product: "IC-232" - java: "17" - distribution: "temurin" - - product: "IC-233" - java: "17" - distribution: "temurin" - product: "IC-241" java: "17" distribution: "temurin" diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index a1344c3..7edff94 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -12,17 +12,8 @@ jobs: strategy: matrix: - product: [ "IC-231", "IC-232", "IC-233", "IC-241", "IC-242", "IC-243" ] + product: [ "IC-241", "IC-242", "IC-243" ] include: - - product: "IC-231" - java: "17" - distribution: "temurin" - - product: "IC-232" - java: "17" - distribution: "temurin" - - product: "IC-233" - java: "17" - distribution: "temurin" - product: "IC-241" java: "17" distribution: "temurin" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 509648c..346787e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,17 +8,8 @@ jobs: strategy: matrix: - product: [ "IC-231", "IC-232", "IC-233", "IC-241", "IC-242", "IC-243" ] + product: [ "IC-241", "IC-242", "IC-243" ] include: - - product: "IC-231" - java: "17" - distribution: "temurin" - - product: "IC-232" - java: "17" - distribution: "temurin" - - product: "IC-233" - java: "17" - distribution: "temurin" - product: "IC-241" java: "17" distribution: "temurin" diff --git a/build.gradle.kts b/build.gradle.kts index 6258ad4..76d4911 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -5,7 +5,7 @@ import org.jetbrains.intellij.platform.gradle.models.ProductRelease plugins { id("java") alias(libs.plugins.kotlin.jvm) - id("org.jetbrains.intellij.platform") version "2.1.0" + id("org.jetbrains.intellij.platform") version "2.2.0" } repositories { @@ -45,27 +45,6 @@ data class PluginDescriptor( // and 'until' we can use a wildcard eg 213.* val descriptors = listOf( - PluginDescriptor( - since = "231.8109.163", // this version is 2023.1 release - until = "231.*", - sdkVersion = "2023.1", - sourceFolder = "IC-231", - useInstaller = true, - ), - PluginDescriptor( - since = "232.5150.116", // this version is 2023.2 - until = "232.*", - sdkVersion = "2023.2", - sourceFolder = "IC-232", - useInstaller = true, - ), - PluginDescriptor( - since = "233.9802.16", // this version is 2023.3 - until = "233.*", - sdkVersion = "2023.3", - sourceFolder = "IC-233", - useInstaller = true, - ), PluginDescriptor( since = "241.15989.150", // this version is 2024.1.x until = "242.*", @@ -89,7 +68,7 @@ val descriptors = listOf( ), ) -val productName = System.getenv("PRODUCT_NAME") ?: "IC-243" +val productName = System.getenv("PRODUCT_NAME") ?: "IC-242" val jvmTargetVersion = System.getenv("JVM_TARGET") ?: "11" val descriptor = descriptors.first { it.sourceFolder == productName } @@ -148,16 +127,6 @@ dependencies { testFramework(TestFrameworkType.Plugin.Java) } - // we bundle this for 4.1 support - // in kotest 4.2.0 the launcher has moved to a stand-alone module - implementation(libs.runtime.kotest.legacy.launcher) - - // this is needed to use the launcher in 4.2.0, in 4.2.1+ the launcher is built - // into the engine dep which should already be on the classpath - implementation(libs.runtime.kotest.framework.launcher) { - - } - // needed for the resource files which are loaded into java light tests testImplementation(libs.test.kotest.framework.api) testImplementation(libs.test.kotest.assertions.core) diff --git a/src/IC-231/kotlin/io/kotest/plugin/intellij/files.kt b/src/IC-231/kotlin/io/kotest/plugin/intellij/files.kt deleted file mode 100644 index 3f04700..0000000 --- a/src/IC-231/kotlin/io/kotest/plugin/intellij/files.kt +++ /dev/null @@ -1,33 +0,0 @@ -package io.kotest.plugin.intellij - -import com.intellij.execution.PsiLocation -import com.intellij.openapi.project.Project -import com.intellij.openapi.vfs.VirtualFile -import com.intellij.psi.PsiElement -import com.intellij.psi.search.FilenameIndex -import com.intellij.psi.search.GlobalSearchScope -import io.kotest.plugin.intellij.psi.elementAtLine -import io.kotest.plugin.intellij.psi.isTestFile -import io.kotest.plugin.intellij.psi.toPsiLocation -import io.kotest.plugin.intellij.toolwindow.TagsFilename -import org.jetbrains.kotlin.idea.core.util.toPsiFile - -fun findFiles(project: Project): List { - return FilenameIndex - .getVirtualFilesByName(TagsFilename, false, GlobalSearchScope.allScope(project)) - .toList() -} - -fun getLocationForFile( - project: Project, - scope: GlobalSearchScope, - name: String, - lineNumber: Int -): PsiLocation? { - return FilenameIndex - .getVirtualFilesByName(name, scope) - .firstOrNull { it.isTestFile(project) } - ?.toPsiFile(project) - ?.elementAtLine(lineNumber) - ?.toPsiLocation() -} diff --git a/src/IC-231/kotlin/io/kotest/plugin/intellij/psi/superClasses.kt b/src/IC-231/kotlin/io/kotest/plugin/intellij/psi/superClasses.kt deleted file mode 100644 index a15ccab..0000000 --- a/src/IC-231/kotlin/io/kotest/plugin/intellij/psi/superClasses.kt +++ /dev/null @@ -1,36 +0,0 @@ -package io.kotest.plugin.intellij.psi - -import org.jetbrains.kotlin.idea.caches.resolve.analyze -import org.jetbrains.kotlin.name.FqName -import org.jetbrains.kotlin.psi.KtClassOrObject -import org.jetbrains.kotlin.resolve.BindingContext -import org.jetbrains.kotlin.resolve.descriptorUtil.classId -import org.jetbrains.kotlin.types.typeUtil.supertypes - -/** - * Recursively returns the list of classes and interfaces extended or implemented by the class. - */ -fun KtClassOrObject.getAllSuperClasses(): List { - return superTypeListEntries - .mapNotNull { it.typeReference } - .mapNotNull { - runCatching { - val bindingContext = it.analyze() - bindingContext.get(BindingContext.TYPE, it) - }.getOrNull() - }.flatMap { - runCatching { - it.supertypes() + it - }.getOrElse { emptyList() } - }.mapNotNull { - runCatching { - it.constructor.declarationDescriptor.classId - }.getOrNull() - }.mapNotNull { - runCatching { - val packageName = it.packageFqName - val simpleName = it.relativeClassName - FqName("$packageName.$simpleName") - }.getOrNull() - }.filterNot { it.toString() == "kotlin.Any" } -} diff --git a/src/IC-232/kotlin/io/kotest/plugin/intellij/files.kt b/src/IC-232/kotlin/io/kotest/plugin/intellij/files.kt deleted file mode 100644 index 3f04700..0000000 --- a/src/IC-232/kotlin/io/kotest/plugin/intellij/files.kt +++ /dev/null @@ -1,33 +0,0 @@ -package io.kotest.plugin.intellij - -import com.intellij.execution.PsiLocation -import com.intellij.openapi.project.Project -import com.intellij.openapi.vfs.VirtualFile -import com.intellij.psi.PsiElement -import com.intellij.psi.search.FilenameIndex -import com.intellij.psi.search.GlobalSearchScope -import io.kotest.plugin.intellij.psi.elementAtLine -import io.kotest.plugin.intellij.psi.isTestFile -import io.kotest.plugin.intellij.psi.toPsiLocation -import io.kotest.plugin.intellij.toolwindow.TagsFilename -import org.jetbrains.kotlin.idea.core.util.toPsiFile - -fun findFiles(project: Project): List { - return FilenameIndex - .getVirtualFilesByName(TagsFilename, false, GlobalSearchScope.allScope(project)) - .toList() -} - -fun getLocationForFile( - project: Project, - scope: GlobalSearchScope, - name: String, - lineNumber: Int -): PsiLocation? { - return FilenameIndex - .getVirtualFilesByName(name, scope) - .firstOrNull { it.isTestFile(project) } - ?.toPsiFile(project) - ?.elementAtLine(lineNumber) - ?.toPsiLocation() -} diff --git a/src/IC-232/kotlin/io/kotest/plugin/intellij/psi/superClasses.kt b/src/IC-232/kotlin/io/kotest/plugin/intellij/psi/superClasses.kt deleted file mode 100644 index a15ccab..0000000 --- a/src/IC-232/kotlin/io/kotest/plugin/intellij/psi/superClasses.kt +++ /dev/null @@ -1,36 +0,0 @@ -package io.kotest.plugin.intellij.psi - -import org.jetbrains.kotlin.idea.caches.resolve.analyze -import org.jetbrains.kotlin.name.FqName -import org.jetbrains.kotlin.psi.KtClassOrObject -import org.jetbrains.kotlin.resolve.BindingContext -import org.jetbrains.kotlin.resolve.descriptorUtil.classId -import org.jetbrains.kotlin.types.typeUtil.supertypes - -/** - * Recursively returns the list of classes and interfaces extended or implemented by the class. - */ -fun KtClassOrObject.getAllSuperClasses(): List { - return superTypeListEntries - .mapNotNull { it.typeReference } - .mapNotNull { - runCatching { - val bindingContext = it.analyze() - bindingContext.get(BindingContext.TYPE, it) - }.getOrNull() - }.flatMap { - runCatching { - it.supertypes() + it - }.getOrElse { emptyList() } - }.mapNotNull { - runCatching { - it.constructor.declarationDescriptor.classId - }.getOrNull() - }.mapNotNull { - runCatching { - val packageName = it.packageFqName - val simpleName = it.relativeClassName - FqName("$packageName.$simpleName") - }.getOrNull() - }.filterNot { it.toString() == "kotlin.Any" } -} diff --git a/src/IC-233/kotlin/io/kotest/plugin/intellij/files.kt b/src/IC-233/kotlin/io/kotest/plugin/intellij/files.kt deleted file mode 100644 index 3f04700..0000000 --- a/src/IC-233/kotlin/io/kotest/plugin/intellij/files.kt +++ /dev/null @@ -1,33 +0,0 @@ -package io.kotest.plugin.intellij - -import com.intellij.execution.PsiLocation -import com.intellij.openapi.project.Project -import com.intellij.openapi.vfs.VirtualFile -import com.intellij.psi.PsiElement -import com.intellij.psi.search.FilenameIndex -import com.intellij.psi.search.GlobalSearchScope -import io.kotest.plugin.intellij.psi.elementAtLine -import io.kotest.plugin.intellij.psi.isTestFile -import io.kotest.plugin.intellij.psi.toPsiLocation -import io.kotest.plugin.intellij.toolwindow.TagsFilename -import org.jetbrains.kotlin.idea.core.util.toPsiFile - -fun findFiles(project: Project): List { - return FilenameIndex - .getVirtualFilesByName(TagsFilename, false, GlobalSearchScope.allScope(project)) - .toList() -} - -fun getLocationForFile( - project: Project, - scope: GlobalSearchScope, - name: String, - lineNumber: Int -): PsiLocation? { - return FilenameIndex - .getVirtualFilesByName(name, scope) - .firstOrNull { it.isTestFile(project) } - ?.toPsiFile(project) - ?.elementAtLine(lineNumber) - ?.toPsiLocation() -} diff --git a/src/IC-233/kotlin/io/kotest/plugin/intellij/psi/superClasses.kt b/src/IC-233/kotlin/io/kotest/plugin/intellij/psi/superClasses.kt deleted file mode 100644 index a15ccab..0000000 --- a/src/IC-233/kotlin/io/kotest/plugin/intellij/psi/superClasses.kt +++ /dev/null @@ -1,36 +0,0 @@ -package io.kotest.plugin.intellij.psi - -import org.jetbrains.kotlin.idea.caches.resolve.analyze -import org.jetbrains.kotlin.name.FqName -import org.jetbrains.kotlin.psi.KtClassOrObject -import org.jetbrains.kotlin.resolve.BindingContext -import org.jetbrains.kotlin.resolve.descriptorUtil.classId -import org.jetbrains.kotlin.types.typeUtil.supertypes - -/** - * Recursively returns the list of classes and interfaces extended or implemented by the class. - */ -fun KtClassOrObject.getAllSuperClasses(): List { - return superTypeListEntries - .mapNotNull { it.typeReference } - .mapNotNull { - runCatching { - val bindingContext = it.analyze() - bindingContext.get(BindingContext.TYPE, it) - }.getOrNull() - }.flatMap { - runCatching { - it.supertypes() + it - }.getOrElse { emptyList() } - }.mapNotNull { - runCatching { - it.constructor.declarationDescriptor.classId - }.getOrNull() - }.mapNotNull { - runCatching { - val packageName = it.packageFqName - val simpleName = it.relativeClassName - FqName("$packageName.$simpleName") - }.getOrNull() - }.filterNot { it.toString() == "kotlin.Any" } -}