Skip to content

Commit edeae55

Browse files
authored
Fix LV and signing (#424)
1 parent 447b581 commit edeae55

File tree

3 files changed

+21
-3
lines changed

3 files changed

+21
-3
lines changed

gradle-conventions/src/main/kotlin/conventions-publishing.gradle.kts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,12 @@ fun PublishingExtension.configurePublication() {
7373
fixModuleMetadata(project)
7474
}
7575

76+
// no way around this: https://github.com/gradle/gradle/issues/26091
77+
val signingTasks = tasks.withType<Sign>()
78+
tasks.withType<PublishToMavenRepository>().configureEach {
79+
dependsOn(signingTasks)
80+
}
81+
7682
logger.info("Project ${project.name} -> Publication configured: $name, $version")
7783
}
7884
}

krpc/krpc-test/build.gradle.kts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@
33
*/
44

55
import org.jetbrains.kotlin.gradle.dsl.ExplicitApiMode
6+
import org.jetbrains.kotlin.gradle.dsl.KotlinVersion
67
import org.jetbrains.kotlin.gradle.targets.js.testing.KotlinJsTest
78
import org.jetbrains.kotlin.gradle.targets.jvm.tasks.KotlinJvmTest
9+
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
810
import java.nio.file.Files
911

1012
plugins {
@@ -14,6 +16,16 @@ plugins {
1416
alias(libs.plugins.atomicfu)
1517
}
1618

19+
tasks.withType<KotlinCompile> {
20+
if (this.name.contains("Test")) {
21+
compilerOptions {
22+
// for kotlin.time.Clock API
23+
languageVersion.set(KotlinVersion.KOTLIN_2_1)
24+
apiVersion.set(KotlinVersion.KOTLIN_2_1)
25+
}
26+
}
27+
}
28+
1729
kotlin {
1830
sourceSets {
1931
commonMain {

krpc/krpc-test/src/commonMain/kotlin/kotlinx/rpc/krpc/test/KrpcTransportTestBase.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -305,13 +305,13 @@ abstract class KrpcTransportTestBase {
305305
}
306306

307307
@Test
308-
fun `RPC should be able to receive 100_000 ints in reasonable time`() = runTest(timeout = JS_EXTENDED_TIMEOUT) {
308+
fun RPC_should_be_able_to_receive_100_000_ints_in_reasonable_time() = runTest(timeout = JS_EXTENDED_TIMEOUT) {
309309
val n = 100_000
310310
assertEquals(client.getNInts(n).last(), n)
311311
}
312312

313313
@Test
314-
fun `RPC should be able to receive 100_000 ints with batching in reasonable time`() = runTest {
314+
fun RPC_should_be_able_to_receive_100_000_ints_with_batching_in_reasonable_time() = runTest {
315315
val n = 100_000
316316
assertEquals(client.getNIntsBatched(n).last().last(), n)
317317
}
@@ -405,7 +405,7 @@ abstract class KrpcTransportTestBase {
405405
}
406406

407407
@Test
408-
fun `rpc continuation is called in the correct scope and doesn't block other rpcs`() = runTest {
408+
fun rpc_continuation_is_called_in_the_correct_scope_and_doesnt_block_other_rpcs() = runTest {
409409
if (isJs) {
410410
println("Test is skipped on JS, because it doesn't support multiple threads.")
411411
return@runTest

0 commit comments

Comments
 (0)