diff --git a/core/testing/build.gradle.kts b/core/testing/build.gradle.kts index a24c78d48..f8f7a4210 100644 --- a/core/testing/build.gradle.kts +++ b/core/testing/build.gradle.kts @@ -30,5 +30,4 @@ dependencies { implementation(libs.composablePreviewScanner) implementation(libs.composablePreviewScannerJvm) implementation(libs.roborazziPreviewScannerSupport) - implementation(libs.kotlinReflect) } diff --git a/core/testing/src/main/java/io/github/droidkaigi/confsched/testing/DroidKaigiKmpPreviewTester.kt b/core/testing/src/main/java/io/github/droidkaigi/confsched/testing/DroidKaigiKmpPreviewTester.kt index bce6c2fc2..492460c82 100644 --- a/core/testing/src/main/java/io/github/droidkaigi/confsched/testing/DroidKaigiKmpPreviewTester.kt +++ b/core/testing/src/main/java/io/github/droidkaigi/confsched/testing/DroidKaigiKmpPreviewTester.kt @@ -4,19 +4,12 @@ import com.github.takahirom.roborazzi.ComposePreviewTester import com.github.takahirom.roborazzi.captureRoboImage import sergio.sastre.composable.preview.scanner.core.preview.ComposablePreview import sergio.sastre.composable.preview.scanner.jvm.JvmAnnotationScanner -import kotlin.reflect.jvm.kotlinFunction class DroidKaigiKmpPreviewTester : ComposePreviewTester { override fun previews(vararg packages: String): List> { return JvmAnnotationScanner("org.jetbrains.compose.ui.tooling.preview.Preview") .scanPackageTrees(*packages) .getPreviews() - .filter { preview -> - System.getProperties() - Class.forName(preview.declaringClass).declaredMethods.first { - it.name == preview.methodName - }.kotlinFunction?.visibility == kotlin.reflect.KVisibility.PUBLIC - } } override fun test(preview: ComposablePreview) { diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 182052337..fa8d790c1 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -175,7 +175,6 @@ roborazziRule = { module = "io.github.takahirom.roborazzi:roborazzi-junit-rule", roborazziPreviewScannerSupport = { module = "io.github.takahirom.roborazzi:roborazzi-compose-preview-scanner-support", version.ref = "roborazzi" } composablePreviewScanner = { module = "com.github.sergio-sastre.ComposablePreviewScanner:android", version.ref = "composablePreviewScanner" } composablePreviewScannerJvm = { module = "com.github.sergio-sastre.ComposablePreviewScanner:jvm", version.ref = "composablePreviewScanner" } -kotlinReflect = { module = "org.jetbrains.kotlin:kotlin-reflect", version.ref = "kotlin" } [plugins] androidGradlePlugin = { id = "com.android.application", version.ref = "androidGradlePlugin" }