Skip to content

Commit a232226

Browse files
committed
Kotlin 2.3 & Compose 1.10 & AGP 8.11.2, 8.12.3, 8.13.2, 9.0 RC1, 9.1 Alpha 1
1 parent 7c9fd63 commit a232226

File tree

9 files changed

+34
-26
lines changed

9 files changed

+34
-26
lines changed

build-logic/src/main/kotlin/Dependencies.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22

33
object libs {
44
object versions {
5-
const val kotlin = "2.1.21"
5+
const val kotlin = "2.3.0"
66
const val junitJupiter = "5.14.0"
77
const val junitVintage = "5.14.0"
88
const val junitPlatform = "1.14.0"
99

10-
const val compose = "1.7.8"
10+
const val compose = "1.10.0"
1111
const val androidXMultidex = "2.0.1"
1212
const val androidXTestAnnotation = "1.0.1"
1313
const val androidXTestCore = "1.6.1"

build-logic/src/main/kotlin/Environment.kt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,11 @@ enum class SupportedAgp(
1818
AGP_8_8("8.8.2", gradle = "8.10.2"),
1919
AGP_8_9("8.9.3", gradle = "8.11.1"),
2020
AGP_8_10("8.10.1", gradle = "8.11.1"),
21-
AGP_8_11("8.11.1", gradle = "8.13"),
22-
AGP_8_12("8.12.2", gradle = "8.13"),
23-
AGP_8_13("8.13.0", gradle = "8.13"),
24-
AGP_9_0("9.0.0-alpha04", gradle = "9.0.0"),
21+
AGP_8_11("8.11.2", gradle = "8.13"),
22+
AGP_8_12("8.12.3", gradle = "8.13"),
23+
AGP_8_13("8.13.2", gradle = "8.13"),
24+
AGP_9_0("9.0.0-rc01", gradle = "9.1.0"),
25+
AGP_9_1("9.1.0-alpha01", gradle = "9.1.0"),
2526
;
2627

2728
companion object {

instrumentation/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ Change Log
33

44
## Unreleased
55

6+
- Removed deprecated `runComposeTest` API from `ComposeExtension`
7+
- Update to Kotlin 2.3
8+
- Update to Compose 1.10
9+
610
## 1.9.0 (2025-10-10)
711

812
- Adjust constructor of `ModifiedTestPlan` to conform to newly added interface from JUnit 5.14 (#390)

instrumentation/compose/api/compose.api

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ public final class de/mannodermaus/junit5/compose/AndroidComposeExtension : de/m
77
public final fun getActivity ()Landroidx/activity/ComponentActivity;
88
public final fun getScenario ()Landroidx/test/core/app/ActivityScenario;
99
public fun resolveParameter (Lorg/junit/jupiter/api/extension/ParameterContext;Lorg/junit/jupiter/api/extension/ExtensionContext;)Ljava/lang/Object;
10-
public fun runComposeTest (Lkotlin/jvm/functions/Function1;)V
1110
public fun supportsParameter (Lorg/junit/jupiter/api/extension/ParameterContext;Lorg/junit/jupiter/api/extension/ExtensionContext;)Z
1211
public fun use (Lkotlin/jvm/functions/Function1;)V
1312
}
@@ -30,10 +29,16 @@ public abstract interface class de/mannodermaus/junit5/compose/ComposeContext :
3029
public abstract fun waitForIdle ()V
3130
public abstract fun waitUntil (JLkotlin/jvm/functions/Function0;)V
3231
public abstract fun waitUntil (Ljava/lang/String;JLkotlin/jvm/functions/Function0;)V
32+
public static synthetic fun waitUntil$default (Lde/mannodermaus/junit5/compose/ComposeContext;JLkotlin/jvm/functions/Function0;ILjava/lang/Object;)V
33+
public static synthetic fun waitUntil$default (Lde/mannodermaus/junit5/compose/ComposeContext;Ljava/lang/String;JLkotlin/jvm/functions/Function0;ILjava/lang/Object;)V
3334
public abstract fun waitUntilAtLeastOneExists (Landroidx/compose/ui/test/SemanticsMatcher;J)V
35+
public static synthetic fun waitUntilAtLeastOneExists$default (Lde/mannodermaus/junit5/compose/ComposeContext;Landroidx/compose/ui/test/SemanticsMatcher;JILjava/lang/Object;)V
3436
public abstract fun waitUntilDoesNotExist (Landroidx/compose/ui/test/SemanticsMatcher;J)V
37+
public static synthetic fun waitUntilDoesNotExist$default (Lde/mannodermaus/junit5/compose/ComposeContext;Landroidx/compose/ui/test/SemanticsMatcher;JILjava/lang/Object;)V
3538
public abstract fun waitUntilExactlyOneExists (Landroidx/compose/ui/test/SemanticsMatcher;J)V
39+
public static synthetic fun waitUntilExactlyOneExists$default (Lde/mannodermaus/junit5/compose/ComposeContext;Landroidx/compose/ui/test/SemanticsMatcher;JILjava/lang/Object;)V
3640
public abstract fun waitUntilNodeCount (Landroidx/compose/ui/test/SemanticsMatcher;IJ)V
41+
public static synthetic fun waitUntilNodeCount$default (Lde/mannodermaus/junit5/compose/ComposeContext;Landroidx/compose/ui/test/SemanticsMatcher;IJILjava/lang/Object;)V
3742
}
3843

3944
public final class de/mannodermaus/junit5/compose/ComposeContext$DefaultImpls {
@@ -46,11 +51,6 @@ public final class de/mannodermaus/junit5/compose/ComposeContext$DefaultImpls {
4651
}
4752

4853
public abstract interface class de/mannodermaus/junit5/compose/ComposeExtension : org/junit/jupiter/api/extension/Extension {
49-
public abstract fun runComposeTest (Lkotlin/jvm/functions/Function1;)V
5054
public abstract fun use (Lkotlin/jvm/functions/Function1;)V
5155
}
5256

53-
public final class de/mannodermaus/junit5/compose/ComposeExtension$DefaultImpls {
54-
public static fun runComposeTest (Lde/mannodermaus/junit5/compose/ComposeExtension;Lkotlin/jvm/functions/Function1;)V
55-
}
56-

instrumentation/compose/build.gradle.kts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import org.gradle.api.tasks.testing.logging.TestExceptionFormat
22
import org.gradle.api.tasks.testing.logging.TestLogEvent
3+
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
34

45
plugins {
56
id("com.android.library")
@@ -33,10 +34,6 @@ android {
3334
targetCompatibility = javaVersion
3435
}
3536

36-
kotlinOptions {
37-
jvmTarget = javaVersion.toString()
38-
}
39-
4037
testOptions {
4138
unitTests.isReturnDefaultValues = true
4239
targetSdk = Android.targetSdkVersion
@@ -52,6 +49,12 @@ android {
5249
}
5350
}
5451

52+
kotlin {
53+
compilerOptions {
54+
jvmTarget = JvmTarget.fromTarget(javaVersion.toString())
55+
}
56+
}
57+
5558
junitPlatform {
5659
// Using local dependency instead of Maven coordinates
5760
instrumentationTests.enabled = false

instrumentation/compose/src/main/java/de/mannodermaus/junit5/compose/ComposeExtension.kt

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,4 @@ public interface ComposeExtension : Extension {
2626
* With this function, you can pass an arbitrary composable tree to the extension and evaluate it afterwards.
2727
*/
2828
public fun use(block: ComposeContext.() -> Unit)
29-
30-
@Deprecated(message = "Change to use()", replaceWith = ReplaceWith("use(block)"))
31-
public fun runComposeTest(block: ComposeContext.() -> Unit) {
32-
use(block)
33-
}
3429
}

instrumentation/runner/src/main/kotlin/de/mannodermaus/junit5/internal/discovery/EmptyTestPlan.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ package de.mannodermaus.junit5.internal.discovery
22

33
import androidx.annotation.RequiresApi
44
import org.junit.platform.engine.ConfigurationParameters
5+
import org.junit.platform.engine.OutputDirectoryCreator
56
import org.junit.platform.engine.TestDescriptor
6-
import org.junit.platform.engine.reporting.OutputDirectoryProvider
77
import org.junit.platform.launcher.TestPlan
88
import java.io.File
99
import java.util.Optional
@@ -17,7 +17,7 @@ import java.util.Optional
1717
internal object EmptyTestPlan : TestPlan(
1818
false,
1919
emptyConfigurationParameters,
20-
emptyOutputDirectoryProvider
20+
emptyOutputDirectoryCreator
2121
)
2222

2323
@RequiresApi(26)
@@ -31,7 +31,7 @@ private val emptyConfigurationParameters = object : ConfigurationParameters {
3131
}
3232

3333
@RequiresApi(26)
34-
private val emptyOutputDirectoryProvider = object : OutputDirectoryProvider {
34+
private val emptyOutputDirectoryCreator = object : OutputDirectoryCreator {
3535
private val path = File.createTempFile("empty-output", ".nop").toPath()
3636
override fun getRootDirectory() = path
3737
override fun createOutputDirectory(testDescriptor: TestDescriptor?) = path

instrumentation/sample/build.gradle.kts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import org.gradle.api.tasks.testing.logging.TestLogEvent
2+
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
23

34
plugins {
45
id("com.android.application")
@@ -48,9 +49,11 @@ android {
4849
sourceCompatibility = javaVersion
4950
targetCompatibility = javaVersion
5051
}
52+
}
5153

52-
kotlinOptions {
53-
jvmTarget = javaVersion.toString()
54+
kotlin {
55+
compilerOptions {
56+
jvmTarget = JvmTarget.fromTarget(javaVersion.toString())
5457
}
5558
}
5659

plugin/CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ Change Log
22
==========
33

44
## Unreleased
5+
- Update to Kotlin 2.3
6+
- Internal: Replace deprecated `OutputDirectoryProvider` with its correct replacement
57

68
## 1.14.0.0 (2025-10-10)
79
- JUnit 5.14.0

0 commit comments

Comments
 (0)