Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump kotlin to 2.1.0 #1777

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ bytebuddy = "1.15.11"
compose = "1.7.6"
coroutines = "1.10.1"
javaTarget = "17"
kotlin = "2.0.21"
ksp = "2.0.21-1.0.28"
kotlin = "2.1.0"
ksp = "2.1.0-1.0.29"
layoutlib = "15.1.1"
moshi = "1.15.2"

Expand Down Expand Up @@ -37,7 +37,7 @@ guava = { module = "com.google.guava:guava", version = "33.4.0-jre" }

kotlin-bom = { module = "org.jetbrains.kotlin:kotlin-bom", version.ref = "kotlin" }
kotlinpoet-ksp = { module = "com.squareup:kotlinpoet-ksp", version = "2.0.0" }
kotlin-compile-testing-ksp = { module = "com.github.tschuchortdev:kotlin-compile-testing-ksp", version = "1.6.0" }
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is needed as it supports kotlin 2.0. The previous version used kotlin 1.9.x

kotlin-compile-testing-ksp = { module = "dev.zacsweers.kctfork:ksp", version = "0.7.0" }
kotlinx-coroutines-android = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-android", version.ref = "coroutines" }
kotlinx-coroutines-test = { module = "org.jetbrains.kotlinx:kotlinx-coroutines-test", version.ref = "coroutines" }

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@ package app.cash.paparazzi.preview.processor
import com.google.common.truth.Truth.assertThat
import com.tschuchort.compiletesting.KotlinCompilation
import com.tschuchort.compiletesting.SourceFile
import com.tschuchort.compiletesting.kspAllWarningsAsErrors
import com.tschuchort.compiletesting.kspArgs
import com.tschuchort.compiletesting.configureKsp
import com.tschuchort.compiletesting.kspIncremental
import com.tschuchort.compiletesting.symbolProcessorProviders
import com.tschuchort.compiletesting.kspProcessorOptions
import org.jetbrains.kotlin.compiler.plugin.ExperimentalCompilerApi
import org.junit.Rule
import org.junit.Test
Expand Down Expand Up @@ -204,11 +203,15 @@ class PreviewProcessorProviderTest {
sources =
sourceFiles.asList() + COMPOSE_SOURCES + PAPARAZZI_ANNOTATION_SOURCE + PAPARAZZI_PREVIEW_DATA_RUNTIME_SOURCE
verbose = false

kspAllWarningsAsErrors = true
kspArgs["app.cash.paparazzi.preview.namespace"] = TEST_NAMESPACE
kspIncremental = true
symbolProcessorProviders = listOf(PreviewProcessorProvider())
// Needed for @PreviewParameterProvider annotation that uses `@JvmDefaultWithCompatibility`
kotlincArguments = listOf("-Xjvm-default=all")

configureKsp(useKsp2 = true) {
allWarningsAsErrors = true
kspProcessorOptions += "app.cash.paparazzi.preview.namespace" to TEST_NAMESPACE
kspIncremental = true
symbolProcessorProviders += PreviewProcessorProvider()
}
}

private companion object {
Expand Down
Loading