Skip to content

Commit 2fe59c9

Browse files
authored
Merge pull request #92 from lupuuss/release-2.9.0
Release 2.9.0
2 parents 75d7ec1 + 8b06770 commit 2fe59c9

File tree

14 files changed

+4148
-29
lines changed

14 files changed

+4148
-29
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
</br>
99

1010
[![Gradle Plugin Portal Stable](https://img.shields.io/gradle-plugin-portal/v/dev.mokkery)](https://plugins.gradle.org/plugin/dev.mokkery)
11-
[![Kotlin](https://img.shields.io/badge/kotlin-2.1.21-blue.svg?logo=kotlin)](http://kotlinlang.org)
11+
[![Kotlin](https://img.shields.io/badge/kotlin-2.2.0-blue.svg?logo=kotlin)](http://kotlinlang.org)
1212
[![GitHub](https://img.shields.io/github/license/lupuuss/Mokkery)](https://github.com/lupuuss/Mokkery/blob/main/LICENSE)
1313
[![Docs](https://img.shields.io/static/v1?label=api&message=reference&labelColor=gray&color=blueviolet&logo=gitbook&logoColor=white)](https://mokkery.dev/api_reference)
1414

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@ kotlin.code.style=official
33
kotlin.suppressGradlePluginWarnings=IncorrectCompileOnlyDependencyWarning
44
kotlin.native.ignoreDisabledTargets=true
55
org.gradle.jvmargs=-Xmx3g
6-
version=2.8.0
6+
version=2.9.0
77
org.jetbrains.dokka.experimental.gradle.pluginMode=V2Enabled
88
org.jetbrains.dokka.experimental.gradle.pluginMode.noWarn=true

gradle/libs.versions.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
[versions]
2-
kotlin = "2.1.21"
2+
kotlin = "2.2.0"
33
kotlinx-coroutines = "1.10.2"
44
buildconfig = "4.0.4"
55
google-autoservice = "1.1.1"
66
atomicfu = "0.27.0"
77
dokka = "2.0.0"
8-
poko = "0.18.5"
8+
poko = "0.18.7"
99
vanniktech-publish-plugin = "0.32.0"
1010
objensis = "3.4"
1111
bytebuddy = "1.14.19"

kotlin-js-store/wasm/yarn.lock

Lines changed: 2060 additions & 0 deletions
Large diffs are not rendered by default.

kotlin-js-store/yarn.lock

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1732,11 +1732,6 @@ type-is@~1.6.18:
17321732
media-typer "0.3.0"
17331733
mime-types "~2.1.24"
17341734

1735-
1736-
version "5.5.4"
1737-
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.5.4.tgz#d9852d6c82bad2d2eda4fd74a5762a8f5909e9ba"
1738-
integrity sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==
1739-
17401735
ua-parser-js@^0.7.30:
17411736
version "0.7.35"
17421737
resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.35.tgz#8bda4827be4f0b1dda91699a29499575a1f1d307"

mokkery-core/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ buildConfig {
1212
buildConfigField("String", "RUNTIME", str("mokkery-runtime"))
1313
buildConfigField("String", "PLUGIN_ID", str(rootProject.ext["pluginId"]))
1414
buildConfigField("String", "PLUGIN_ARTIFACT_ID", str(pluginProject.name))
15-
buildConfigField("String", "MINIMUM_KOTLIN_VERSION", str("2.1.20"))
15+
buildConfigField("String", "MINIMUM_KOTLIN_VERSION", str("2.2.0"))
1616
buildConfigField("String", "COMPILED_KOTLIN_VERSION", str(libs.versions.kotlin.get()))
1717
}
1818

mokkery-plugin/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ plugins {
44
kotlin("kapt")
55
}
66

7+
kotlin.compilerOptions.freeCompilerArgs.add("-Xcontext-parameters")
78

89
kotlin.sourceSets.all {
910
languageSettings.apply {

mokkery-plugin/src/main/kotlin/dev/mokkery/plugin/diagnostics/MokkeryCallsChecker.kt

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package dev.mokkery.plugin.diagnostics
33
import dev.mokkery.plugin.core.MembersValidationMode
44
import dev.mokkery.plugin.core.Mokkery.Callable
55
import dev.mokkery.plugin.core.validationMode
6-
import dev.mokkery.plugin.fir.constructors
6+
import dev.mokkery.plugin.fir.declaredMembers
77
import org.jetbrains.kotlin.AbstractKtSourceElement
88
import org.jetbrains.kotlin.config.CompilerConfiguration
99
import org.jetbrains.kotlin.descriptors.ClassKind
@@ -15,6 +15,7 @@ import org.jetbrains.kotlin.fir.FirSession
1515
import org.jetbrains.kotlin.fir.analysis.checkers.MppCheckerKind
1616
import org.jetbrains.kotlin.fir.analysis.checkers.context.CheckerContext
1717
import org.jetbrains.kotlin.fir.analysis.checkers.expression.FirFunctionCallChecker
18+
import org.jetbrains.kotlin.fir.declarations.constructors
1819
import org.jetbrains.kotlin.fir.declarations.utils.isFinal
1920
import org.jetbrains.kotlin.fir.declarations.utils.isInline
2021
import org.jetbrains.kotlin.fir.declarations.utils.isInterface
@@ -60,7 +61,8 @@ class MokkeryCallsChecker(
6061

6162
private val validationMode = configuration.validationMode
6263

63-
override fun check(expression: FirFunctionCall, context: CheckerContext, reporter: DiagnosticReporter) {
64+
context(context: CheckerContext, reporter: DiagnosticReporter)
65+
override fun check(expression: FirFunctionCall) {
6466
val callee = expression.calleeReference as? FirResolvedNamedReference ?: return
6567
val symbol = callee.resolvedSymbol as? FirNamedFunctionSymbol ?: return
6668
val scope = MokkeryScopedCallsChecker(
@@ -210,7 +212,7 @@ private class MokkeryScopedCallsChecker(
210212
source: AbstractKtSourceElement?,
211213
classSymbol: FirRegularClassSymbol
212214
): Boolean {
213-
val constructors = classSymbol.constructors
215+
val constructors = classSymbol.constructors(session)
214216
if (constructors.none { it.visibility.isPublicAPI }) {
215217
reporter.reportOn(
216218
source = source,
@@ -225,9 +227,9 @@ private class MokkeryScopedCallsChecker(
225227
.resolvedSuperTypes
226228
.asSequence()
227229
.mapNotNull { it.toRegularClassSymbol(session) }
228-
.flatMap { it.declarationSymbols }
230+
.flatMap { it.declaredMembers(session) }
229231
val allDeclarationSymbols = classSymbol
230-
.declarationSymbols
232+
.declaredMembers(session)
231233
.asSequence()
232234
.plus(inheritedSymbols)
233235
val finalDeclarations = allDeclarationSymbols
Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
package dev.mokkery.plugin.fir
22

3-
import org.jetbrains.kotlin.fir.symbols.impl.FirConstructorSymbol
3+
import org.jetbrains.kotlin.fir.FirSession
4+
import org.jetbrains.kotlin.fir.declarations.declaredFunctions
5+
import org.jetbrains.kotlin.fir.declarations.declaredProperties
6+
import org.jetbrains.kotlin.fir.symbols.FirBasedSymbol
47
import org.jetbrains.kotlin.fir.symbols.impl.FirRegularClassSymbol
58

6-
val FirRegularClassSymbol.constructors get() = declarationSymbols.filterIsInstance<FirConstructorSymbol>()
9+
fun FirRegularClassSymbol.declaredMembers(session: FirSession): List<FirBasedSymbol<*>> {
10+
return declaredFunctions(session) + declaredProperties(session)
11+
}

test-mokkery/gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
kotlinVersion=2.1.20
2-
mokkeryVersion=2.8.0
1+
kotlinVersion=2.2.0
2+
mokkeryVersion=2.9.0
33
org.gradle.jvmargs=-Xmx1g

0 commit comments

Comments
 (0)