diff --git a/CHANGES.md b/CHANGES.md index eea02a1..d45a272 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,8 +1,11 @@ # Change Log ## Unreleased -- Ensure compatibility with Spek `1.1.0-beta3` -- Upgrade to Kotlin 1.0.6 + +## v0.3.2 +- Ensure compatibility with Spek `1.1.0-beta3`. +- Upgrade to Kotlin 1.0.6. +- Upgrade bundled Spek to `1.1.0-beta3`. ## v0.3.1 - Decouple persisted metadata from **JUnit Platform**. diff --git a/plugin/src/main/kotlin/org/jetbrains/spek/idea/SpekRunConfigurationProducer.kt b/plugin/src/main/kotlin/org/jetbrains/spek/idea/SpekRunConfigurationProducer.kt index 3e98210..d2116c6 100644 --- a/plugin/src/main/kotlin/org/jetbrains/spek/idea/SpekRunConfigurationProducer.kt +++ b/plugin/src/main/kotlin/org/jetbrains/spek/idea/SpekRunConfigurationProducer.kt @@ -12,7 +12,7 @@ import org.jetbrains.jps.model.java.JavaSourceRootType import org.jetbrains.kotlin.asJava.toLightClass import org.jetbrains.kotlin.idea.core.getPackage import org.jetbrains.kotlin.psi.KtCallExpression -import org.jetbrains.kotlin.psi.KtClass +import org.jetbrains.kotlin.psi.KtClassOrObject import org.jetbrains.kotlin.psi.KtNameReferenceExpression import org.jetbrains.spek.tooling.Target @@ -27,7 +27,7 @@ class SpekRunConfigurationProducer: JavaRunConfigurationProducerBase { + is KtClassOrObject -> { val cls = parent.toLightClass() if (cls != null && SpekUtils.isSpec(cls)) { if (cls.qualifiedName != null) { @@ -102,7 +102,7 @@ class SpekRunConfigurationProducer: JavaRunConfigurationProducerBase { + is KtClassOrObject -> { val cls = parent.toLightClass() if (cls != null && SpekUtils.isSpec(cls)) { target = Target.Spec(cls.qualifiedName!!) diff --git a/plugin/src/main/kotlin/org/jetbrains/spek/idea/SpekUtils.kt b/plugin/src/main/kotlin/org/jetbrains/spek/idea/SpekUtils.kt index e4e447e..d77a8a1 100644 --- a/plugin/src/main/kotlin/org/jetbrains/spek/idea/SpekUtils.kt +++ b/plugin/src/main/kotlin/org/jetbrains/spek/idea/SpekUtils.kt @@ -10,7 +10,6 @@ import org.jetbrains.kotlin.idea.util.findAnnotation import org.jetbrains.kotlin.lexer.KtToken import org.jetbrains.kotlin.name.FqName import org.jetbrains.kotlin.psi.KtCallExpression -import org.jetbrains.kotlin.psi.KtClass import org.jetbrains.kotlin.psi.KtClassOrObject import org.jetbrains.kotlin.psi.KtLambdaArgument import org.jetbrains.kotlin.psi.KtLambdaExpression @@ -90,7 +89,7 @@ object SpekUtils { } fun isContainedInSpec(callExpression: KtCallExpression): Boolean { - val container = KtStubbedPsiUtil.getContainingDeclaration(callExpression, KtClass::class.java) + val container = KtStubbedPsiUtil.getContainingDeclaration(callExpression, KtClassOrObject::class.java) if (container != null) { return isSpec(container) } @@ -98,7 +97,7 @@ object SpekUtils { } fun getContainingSpecClass(callExpression: KtCallExpression): KtLightClass? { - val container = KtStubbedPsiUtil.getContainingDeclaration(callExpression, KtClass::class.java) + val container = KtStubbedPsiUtil.getContainingDeclaration(callExpression, KtClassOrObject::class.java) if (container != null && isSpec(container)) { return container.toLightClass() } diff --git a/tooling/build.gradle b/tooling/build.gradle index fea96ca..c1c19b3 100644 --- a/tooling/build.gradle +++ b/tooling/build.gradle @@ -6,8 +6,8 @@ dependencies { compile "org.jetbrains.kotlin:kotlin-runtime:$kotlinVersion" // TODO: remove api reference, until we publish proper POM metadata - runtime 'org.jetbrains.spek:spek-api:1.1.0-beta2' - runtime 'org.jetbrains.spek:spek-junit-platform-engine:1.1.0-beta2' + runtime 'org.jetbrains.spek:spek-api:1.1.0-beta3' + runtime 'org.jetbrains.spek:spek-junit-platform-engine:1.1.0-beta3' compile 'org.junit.platform:junit-platform-launcher:1.0.0-M3' compile 'net.sf.jopt-simple:jopt-simple:5.0.3' compile 'com.fasterxml.jackson.module:jackson-module-kotlin:2.8.4'