Skip to content

Commit 72c66f2

Browse files
authored
Merge pull request #75 from lupuuss/release-2.7.0
Release 2.7.0
2 parents 300d8dc + e006a6c commit 72c66f2

78 files changed

Lines changed: 1233 additions & 513 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/publish.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Publish Mokkery to staging
2+
on:
3+
workflow_dispatch:
4+
jobs:
5+
publish-staging:
6+
runs-on: macos-latest
7+
env:
8+
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_USERNAME }}
9+
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_PASSWORD }}
10+
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.GPG_KEY }}
11+
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.GPG_PASSWORD }}
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v4
15+
- name: Setup Gradle
16+
uses: gradle/actions/setup-gradle@v3
17+
- name: Gradle build
18+
run: ./gradlew publishAllPublicationsToMavenCentralRepository

.github/workflows/tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
name: Tests Mokkery
22
on:
33
workflow_dispatch:
4-
pull_request:
4+
push:
55
concurrency:
66
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
77
cancel-in-progress: true
88
jobs:
99
build:
10-
runs-on: ubuntu-latest
10+
runs-on: macos-latest
1111
steps:
1212
- name: Checkout
1313
uses: actions/checkout@v4

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.0-blue.svg?logo=kotlin)](http://kotlinlang.org)
11+
[![Kotlin](https://img.shields.io/badge/kotlin-2.1.10-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

build-mokkery/src/main/kotlin/mokkery-publish.gradle.kts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,9 @@ loadLocalProperties()
1414

1515
mavenPublishing {
1616
coordinates(project.group.toString(), project.name, project.version.toString())
17-
signAllPublications()
17+
if (gradle.startParameter.taskNames.any { it.contains("MavenCentral") }) {
18+
signAllPublications()
19+
}
1820
publishToMavenCentral(SonatypeHost.S01, automaticRelease = false)
1921
pom {
2022
name.set(project.name)

gradle.properties

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@ kotlin.code.style=official
33
kotlin.suppressGradlePluginWarnings=IncorrectCompileOnlyDependencyWarning
44
kotlin.native.ignoreDisabledTargets=true
55
org.gradle.jvmargs=-Xmx3g
6-
version=2.6.1-SNAPSHOT
6+
version=2.7.0
77
org.jetbrains.dokka.experimental.gradle.pluginMode=V2Enabled
8+
org.jetbrains.dokka.experimental.gradle.pluginMode.noWarn=true

gradle/libs.versions.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
[versions]
2-
kotlin = "2.1.0"
3-
kotlinx-coroutines = "1.9.0"
2+
kotlin = "2.1.10"
3+
kotlinx-coroutines = "1.10.1"
44
buildconfig = "4.0.4"
5-
google-autoservice = "1.0.1"
6-
atomicfu = "0.26.0"
7-
dokka = "2.0.0-Beta"
5+
google-autoservice = "1.1.1"
6+
atomicfu = "0.27.0"
7+
dokka = "2.0.0"
88
poko = "0.17.2"
99
vanniktech-publish-plugin = "0.30.0"
1010
objensis = "3.4"

mokkery-coroutines/src/commonTest/kotlin/dev/mokkery/coroutines/Fakes.kt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,12 @@ internal fun fakeFunctionScope(
88
returnType: KClass<*> = Unit::class,
99
self: Any? = Unit,
1010
supers: Map<KClass<*>, (List<Any?>) -> Any?> = emptyMap(),
11-
args: List<Any?> = emptyList()
11+
args: List<Any?> = emptyList(),
12+
classSupertypes: List<KClass<*>> = listOf(Unit::class)
1213
) = FunctionScope(
1314
returnType = returnType,
1415
args = args,
1516
self = self,
16-
supers = supers
17+
supers = supers,
18+
classSupertypes = classSupertypes
1719
)

mokkery-gradle/src/main/kotlin/dev/mokkery/gradle/MokkeryGradleExtension.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ public interface MokkeryGradleExtension {
3333
*/
3434
@Deprecated(
3535
"Scheduled to be removed. Due to https://youtrack.jetbrains.com/issue/KT-71283 it won't work in most cases. " +
36-
"Also, this feature is a little bit hacky and probably not very useful."
36+
"Also, this feature is a little bit hacky and probably not very useful.",
37+
level = DeprecationLevel.ERROR
3738
)
3839
public val allowIndirectSuperCalls: Property<Boolean>
3940

mokkery-gradle/src/main/kotlin/dev/mokkery/gradle/MokkeryGradlePlugin.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@file:Suppress("DEPRECATION_ERROR")
2+
13
package dev.mokkery.gradle
24

35
import dev.mokkery.MokkeryCompilerDefaults

mokkery-plugin/src/main/kotlin/dev/mokkery/plugin/core/Mokkery.kt

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,29 +16,34 @@ object Mokkery {
1616
val dev_mokkery_context by fqName
1717
val dev_mokkery_interceptor by fqName
1818
val dev_mokkery_internal by fqName
19-
val dev_mokkery_internal_calls by fqName
2019
val dev_mokkery_internal_context by fqName
20+
val dev_mokkery_internal_calls by fqName
2121
val dev_mokkery_internal_interceptor by fqName
2222
val dev_mokkery_matcher by fqName
2323

2424
object Class {
2525

2626
val MockMode by dev_mokkery.klass
27+
val MokkeryScope by dev_mokkery.klass
2728
val MokkeryKind by dev_mokkery_internal_interceptor.klass
2829
val ArgMatchersScope by dev_mokkery_matcher.klass
2930
val MockMany2 by dev_mokkery.klass
3031
val MockMany3 by dev_mokkery.klass
3132
val MockMany4 by dev_mokkery.klass
3233
val MockMany5 by dev_mokkery.klass
3334

35+
val MokkerySuiteScope by dev_mokkery.klass
36+
3437
val MokkeryCallInterceptor by dev_mokkery_interceptor.klass
3538
val MokkeryInstance by dev_mokkery_internal.klass
3639
val MokkeryMockInstance by dev_mokkery_internal.klass
3740

3841
val CallArgument by dev_mokkery_context.klass
42+
val SuiteName by dev_mokkery_internal_context.klass
3943

4044
val TemplatingScope by dev_mokkery_internal_calls.klass
4145
val MokkeryInstanceLookup by dev_mokkery_internal.klass
46+
val GlobalMokkeryScope by dev_mokkery_internal.klass
4247

4348
fun mockMany(value: Int): ClassResolver {
4449
return mockManyMap[value] ?: error("Unsupported types number! Expected value: in ${2..5}; Actual value: $value")
@@ -55,22 +60,24 @@ object Mokkery {
5560
object Function {
5661
val autofillConstructor by dev_mokkery_internal.function
5762
val MokkeryMockInstance by dev_mokkery_internal.function
58-
val generateMockId by dev_mokkery_internal.function
5963
val internalEvery by dev_mokkery_internal.function
6064
val internalEverySuspend by dev_mokkery_internal.function
6165
val internalVerify by dev_mokkery_internal.function
6266
val internalVerifySuspend by dev_mokkery_internal.function
6367
val callIgnoringClassCastException by dev_mokkery_internal.function
6468
val createMokkeryBlockingCallScope by dev_mokkery_internal.function
6569
val createMokkerySuspendCallScope by dev_mokkery_internal.function
70+
val createMokkeryInstanceContext by dev_mokkery_internal.function
6671
val MokkeryMockInterceptor by dev_mokkery_internal_interceptor.function
6772
val TemplatingScope by dev_mokkery_internal_calls.function
73+
val invokeMockInstantiationCallbacks by dev_mokkery_internal_context.function
74+
val MokkerySuiteScope by dev_mokkery.function
6875
}
6976

7077
object Property {
7178

72-
val GlobalMokkeryContext by dev_mokkery_internal_context.property
73-
val mokkeryInstanceLookup by dev_mokkery_internal.property
79+
val GlobalMokkeryInstanceLookup by dev_mokkery_internal.property
80+
val mockId by dev_mokkery_internal.property
7481
}
7582

7683
object Name {

0 commit comments

Comments
 (0)